Skip to main content
Associate II
August 19, 2026
Question

CubeMX2: Double buffering on USB endpoint 0

  • August 19, 2026
  • 4 replies
  • 83 views

If i type in 1 as endpoint number, enable double buffering and then later switch to endpoint 0, double buffering is still enabled. Code generator will also generate code with double buffering on endpoint 0.

 

4 replies

ST Technical Moderator
August 20, 2026

Hi ​@G5658 

Double buffered endpoints are available for bulk and isochronous transfers (not for EP0). Check this article How to configure the packet memory area in STM32 USB controllers | Community

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
G5658Author
Associate II
August 20, 2026

Yes, i know, but cubemx2 is generating code with double buffering on endpoint0, its a bug in cubemx2.

ST Technical Moderator
August 20, 2026

Hi ​@G5658 

In my understanding, by default, EP0 is not configured in double buffer mode.

However, if the endpoint number is changed to a non zero value and set to double buffer mode, then later switched back to EP0, CubeMX2 may retain the double buffer setting. In that case, the generated code can incorrectly reflect a doubl buffer configuration on EP0.

This behavior appears to be an issue, since double buffering is not supported on EP0.

An internal ticket is submitted to dedicated team CDM0065230 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL