Hi everybody,
what's the exact size of the FIFO memory for the USB on ESP32-S3?
The Technical reference (version 1.7) states that "The portion of SPRAM that can be used for FIFO allocation has a depth of 256 and a width of 35 bits (32 data bits plus 3 control bits)" at page 1231.
So It seems that there are 256 WORDS of memory ( 1024 bytes) available for endpoints.
I made several tests with usb audio (using CherryUSB version 1.5.0) , and it seems that if I go over 800 bytes (200 words) things stop working. This is coherent with the cherryUSB code where you can see (in the part regarding the DWC2 portion of the chip regarding USB) that the limit read from some configurations registers is 200 words.
But this is in contrast with what is stated in the technical reference, that says 256.
Is there an error in the documentation or are there really 256 words?
Where is it possible to find more documentation on the USB FIFO memory and its usage? Thank you.
ESP32-S3 USB FIFO ram size
Re: ESP32-S3 USB FIFO ram size
From memory it's indeed 256 words, otherwise we'd have issues supporting anything above two bulk endpoints. However, partitioning that space between endpoints and other things using that is a task of the driving software; maybe CherryUSB doesn't allocate more than 200 bytes to it for your endpoint?
Re: ESP32-S3 USB FIFO ram size
Itried to remove the 200 words limitation, that is related to a configuration register of the dwc2 subsystem.
From the value in the register, the developers of cherryusb assume that the limit is 200. I asked to them if this applies to esp32-s3,
and they replied that it's like that.
So again my question: is there really a limit of 200 words and so is the official technical reference wrong?
I would really like an answer from somebody inside Espressif to finally clarify the matter.
From the value in the register, the developers of cherryusb assume that the limit is 200. I asked to them if this applies to esp32-s3,
and they replied that it's like that.
So again my question: is there really a limit of 200 words and so is the official technical reference wrong?
I would really like an answer from somebody inside Espressif to finally clarify the matter.
Re: ESP32-S3 USB FIFO ram size
200 *words* I can believe; the RAM inside the USB hardware is also used for other things and that eats up a few words, so you cannot use the entirety of 256 words for FIFOs. You were talking about 200 *bytes*, and if that is a limit, it is one within software.
Re: ESP32-S3 USB FIFO ram size
Thank you for the note, but I stated 200 WORDS and not bytes.
What I would like to know from somebody inside Espressif is if the limit for FIFOs is 200 or 256.
I searched all over internet and the conclusion is that there is some misterious document regarding DWC2 that is impossible to find.
Also in the Espressif's "USB Host Maintainers Notes (DWC_OTG Controller)" (https://docs.espressif.com/projects/esp ... c_otg.html) you can read:
This section only summarizes the operation of the DWC_OTG in Host Mode at a high level. For full details of the DWC_OTG, please refer to the DWC_OTG Databook and Programming Guide.
Now this guide is impossible to find, due to copyright and NDA issues.
But surely inside Espressif it must be available.
The only thing I would like to know is regarding this 200 or 256 word limit.
The point is I'm developing usb audio applications of the esp32-s3, and this makes a lot of difference. 200 words allow only for 16 bit audio in rec/play usb audio at 48Khz, while 256 would allow 24 bits per sample that is a much more interesting resolution.
Thank you.
What I would like to know from somebody inside Espressif is if the limit for FIFOs is 200 or 256.
I searched all over internet and the conclusion is that there is some misterious document regarding DWC2 that is impossible to find.
Also in the Espressif's "USB Host Maintainers Notes (DWC_OTG Controller)" (https://docs.espressif.com/projects/esp ... c_otg.html) you can read:
This section only summarizes the operation of the DWC_OTG in Host Mode at a high level. For full details of the DWC_OTG, please refer to the DWC_OTG Databook and Programming Guide.
Now this guide is impossible to find, due to copyright and NDA issues.
But surely inside Espressif it must be available.
The only thing I would like to know is regarding this 200 or 256 word limit.
The point is I'm developing usb audio applications of the esp32-s3, and this makes a lot of difference. 200 words allow only for 16 bit audio in rec/play usb audio at 48Khz, while 256 would allow 24 bits per sample that is a much more interesting resolution.
Thank you.
Re: ESP32-S3 USB FIFO ram size
Ah, sorry, I thought that the logic was that you tried to set the fifo to more than 200 bytes, and that failed. Reading back I have no idea how I got there.
Anyway, I have a copy of that pdf here. Issue is that the amount of actual FIFO memory available depends heavily on how the DWC system is used (and I don't know how CherryUSB does that), but in all modes the start of the memory is actually reserved for other things (some register contents, scatter/gather descriptors, ...) so while I can't give you the exact details of how much memory is available, I can tell you that there's no chance to get those 256 words all to yourself, sorry.
FWIW, the ESP32-P4 has an upgraded USB-OTG device. It can do usb2.0 high speed and has 1024 words of FIFO memory. Might be worth to look into switching to that.
Anyway, I have a copy of that pdf here. Issue is that the amount of actual FIFO memory available depends heavily on how the DWC system is used (and I don't know how CherryUSB does that), but in all modes the start of the memory is actually reserved for other things (some register contents, scatter/gather descriptors, ...) so while I can't give you the exact details of how much memory is available, I can tell you that there's no chance to get those 256 words all to yourself, sorry.
FWIW, the ESP32-P4 has an upgraded USB-OTG device. It can do usb2.0 high speed and has 1024 words of FIFO memory. Might be worth to look into switching to that.
Who is online
Users browsing this forum: Qwantbot and 3 guests
