Skip to main content
Associate III
Nov 24, 2026 9:20 AM UTC
Question

STM32CubeMX USBX 6.4.0 – USBX System Stack Size validation bug

Hi support team,

In STM32CubeIDE 2.1.0 (STM32U5G9, USBX 6.4.0 standalone Host MSC), I set USBX memory pool size to 32768. When I try to set USBX System Stack Size to 24576 (which is smaller than 32768), CubeMX still shows the error:

"The value of USBX System Stack Size must be less than USBX memory pool size"

Because of this, app_usbx.h is always generated with USBX_MEMORY_STACK_SIZE = 1024, even USBX_APP_MEM_POOL_SIZE is 32768, which is too small for ux_system_initialize() in Host MSC mode.

CubeMX USBX Screenshot
​​​​​

Please fix the validation check in CubeMX. Thanks!

3 replies

ST Technical Moderator
Nov 24, 2026 9:23 AM UTC

Hello ​@mcagriaksoy 

What version of STM32CubeMX are you currently using?

KR, Souhaib

 

To give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Associate III
Nov 24, 2026 9:28 AM UTC

Version 6.19.0

ST Technical Moderator
Nov 24, 2026 10:08 AM UTC

Hello ​@mcagriaksoy 

Thank you for reporting this behavior. This is a known issue and has been escalated to the relevant team under Internal ticket number: CDM0064608 (This is an internal tracking number and is not accessible or usable by customers.).While it is being investigated, you can find a workaround in this post.

BR, Souhaib

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