Skip to main content
ABasi.2
Senior
March 11, 2025
Solved

USBX endpoint address error , UX_MAX_DEVICE_ENDPOINTS

  • March 11, 2025
  • 4 replies
  • 1072 views

Hi!

with cube IDE i'm trying to develop a USB device with 3 classes using  a STM32H523 with USBX and threadX.

If i select USB HID,USB MSC and USB ACM (virtual com port) the code is succesfully generated but if i close and reopen the .ioc GUI i have this message error:

the value of UX_MAX_DEVICE_ENDPOINTS can't be less then number of endpoints used.(used endpoints: 7). it will be set to 6.

what does it mean? is not possible to have 3 classes? or i have to change something in the endpoints and it can be done?

there is an example like this? or a guide to understande the endspoint manage

thank you

 

This topic has been closed for replies.
Best answer by Mohamed_AYED

Hi @ABasi.2 

in stm32h5 the max endpoint is 8 

In your project you are using 

  • ep 0 for controll (mondatory)
  • ep 1 for hid class 
  • ep 1 for storage in 
  • ep 2 for storage out
  • ep 3 for cdc acm ctl 
  • ep 4 for cdc acm in 
  • ep 5 for cdc acm out 

if you define this endpoints config the problem will dispparate in Mx

ensure that UX_DEVICE_BIDIRECTIONAL_ENDPOINT_SUPPORT is enbled 

  • ep 0 for controll 
  • ep 1 for hid
  • ep 2 for storage in
  • ep 2 for storage out
  • ep 3 for ctl
  • ep 4 for cdc acm in
  • ep 4 for cdc acm out 
  • total is 5 endpoints < max enpoints availble in this product

4 replies

ST Technical Moderator
March 11, 2025

Hi @ABasi.2 

Would you attach ioc file to reproduce? Make sure to use latest version.

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
ABasi.2
ABasi.2Author
Senior
March 11, 2025

Thankyou!

sure i can attach the ioc file

 

my cube ide is 1.17.0 

Mohamed_AYEDBest answer
Explorer
March 12, 2025

Hi @ABasi.2 

in stm32h5 the max endpoint is 8 

In your project you are using 

  • ep 0 for controll (mondatory)
  • ep 1 for hid class 
  • ep 1 for storage in 
  • ep 2 for storage out
  • ep 3 for cdc acm ctl 
  • ep 4 for cdc acm in 
  • ep 5 for cdc acm out 

if you define this endpoints config the problem will dispparate in Mx

ensure that UX_DEVICE_BIDIRECTIONAL_ENDPOINT_SUPPORT is enbled 

  • ep 0 for controll 
  • ep 1 for hid
  • ep 2 for storage in
  • ep 2 for storage out
  • ep 3 for ctl
  • ep 4 for cdc acm in
  • ep 4 for cdc acm out 
  • total is 5 endpoints < max enpoints availble in this product
ABasi.2
ABasi.2Author
Senior
March 13, 2025

Hello Mohamed

thank you! 

threre is a manual / video guide ecc about this topic that you know? i 'm new in USB and a want to learn

 

Is it possible to use the same end point for 2 different classes?

i saw a video from ST : https://www.youtube.com/watch?v=wCRIpp-OHY4&t=167s

where it seems possible if you respect the in and out configuration of endpint

 

thank you