2025-08-13 11:49 PM
Hello,
I'm using STM32G0B1RCT6
use cubemx generate cdc project works ok
but when I edit endpoint to 0x03 it Not working properly
USB packet capture endpoint 0x03 returns stall
ny Idea about this issue and how to fix it please?
Thanks.
Solved! Go to Solution.
2025-08-15 2:10 AM
Thank you for your feedback!
I assume, in this project you are not affecting EP1 and EP1 to any Tx or Rx FIFO which is not expected from the stack. I assume you can't skip EP1 and EP2 and configure only EP3. Using our current stack, it can cause USB peripheral misbehavior. You need to ensure PMA addresses do not overlap and are properly aligned.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-08-14 3:24 AM
You need to be careful not to overlap one fifo with another, otherwise you will get unexpected behavior.
Do you have over endpoints to be configured ? Share with me EP0 configuration as well to provide a working configuration.
Soon we will provide an article about how to configure packet memory area.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-08-14 5:13 AM
I am using the demo generated by cubemx, but I have only modified the endpoint because I need to use endpoint 3 in other projects. This is just a test, but it doesn't work. I don't know what the problem is
2025-08-15 1:30 AM
EP0
2025-08-15 2:10 AM
Thank you for your feedback!
I assume, in this project you are not affecting EP1 and EP1 to any Tx or Rx FIFO which is not expected from the stack. I assume you can't skip EP1 and EP2 and configure only EP3. Using our current stack, it can cause USB peripheral misbehavior. You need to ensure PMA addresses do not overlap and are properly aligned.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-08-15 7:49 AM
I assume you can't skip EP1 and EP2 and configure only EP3. Using our current stack, it can cause USB peripheral misbehavior.
I hope this is documented elsewhere. I can't say I would do this myself (use EP3 without EP1/EP2 or use EP2 without EP1), but I could see someone try.
2025-08-29 9:41 AM
When selecting endpoint x (EPx) directly, the user must ensure that memory space is also allocated for the descriptors and buffer areas of the preceding endpoints (e.g., EP(x-1) .. EP1) to avoid overlapping in the Packet Memory Area (PMA). Note that each endpoint descriptor occupies 7 bytes in the USB descriptor table. New article will be pushed soon on ST community explaining this!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-08-29 3:54 PM
If you remember, please post a link to that new article when it becomes available.
2025-08-31 12:21 AM
It looks like the issue is with the endpoint configuration. On STM32 CDC projects, usually endpoint 1 IN/OUT and endpoint 2 IN are enabled by default. If you change the endpoint to 0x03, you also need to update the endpoint definitions in both usbd_cdc.c and the USB descriptor file.
Make sure that:
The endpoint address matches its type (IN or OUT)
The USB descriptor and the USBD_LL_OpenEP() function call are updated consistently
The host application is actually requesting data on that endpoint
If there is any mismatch between the descriptor and the firmware, the USB core will return a STALL, which is why you are seeing this issue.