cancel
Showing results for 
Search instead for 
Did you mean: 

Azure RTOS USBX device descriptor errors

jbramble
Associate II

I'm trying to recreate one of the example projects from https://github.com/STMicroelectronics/x-cube-azrtos-f4/tree/main/Projects/STM32469I-Discovery/Applications/USBX/Ux_Device_CDC_ACM

I have a nucleo-F446ZE board for this test.

I created the bare project in CubeMX and added the Azure RTOS software components. I then added the methods from the above example and compiled. Running this on the board fails with a memory error unless I increase the ux static memory size to 74*1024. After that I can connect the USB port to my laptop and get a device appearing but it has 'device descriptor' errors.

I'm confused about the dynamic memory comment in the example readme, even though the example itself suggests static allocation for the ux components. I'm not sure what to look at next to debug this further, any suggestions are welcome.

My project code is here: https://github.com/jonbramble/rtos_usbx_barebones

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @jbramble​ 

Welcome to ST Community 😊

I checked your example and identified the problem.

The USART3_IRQHandler() and OTG_FS_IRQHandler() interrupt handlers are missing from the stm32f4xx_it.c file.

You must therefore configure the NVIC Interrupt Table and enable the USART3 and USB interrupts.

Please follow this configuration :

0693W00000HoXeCQAV.png 

Please click on Select as Best if my post fully answered your question. This will help other customers with the same issue to find the solution faster!

BeST Regards,

Walid

View solution in original post

5 REPLIES 5

Hello @jbramble​ 

Welcome to ST Community 😊

I checked your example and identified the problem.

The USART3_IRQHandler() and OTG_FS_IRQHandler() interrupt handlers are missing from the stm32f4xx_it.c file.

You must therefore configure the NVIC Interrupt Table and enable the USART3 and USB interrupts.

Please follow this configuration :

0693W00000HoXeCQAV.png 

Please click on Select as Best if my post fully answered your question. This will help other customers with the same issue to find the solution faster!

BeST Regards,

Walid

jbramble
Associate II

Dear Walid,

Thanks for taking the time to look through my example code. I have added those with cubemx and made progress, the device descriptor errors are gone. I now have a USB Serial Device in device manager that says "failed to start" error code 10. I will try to do some debugging from here.

I reduced the USBX_MEMORY_SIZE to 15kB, less than this results in a memory allocation error.

So not totally working yet, but a step forward,

Best Regards

Jonathan

Hello @jbramble​ 

I have tested your example with the update described above and the USB works well for me.

This is a bit strange. Try to follow the README and let me know if your problem has been resolved.

BeST Regards,

Walid

jbramble
Associate II

Hi Walid,

I changed the USB end point address and that fixed it.

I pushed the changes should this be of use to others.

Thanks for the help, I can now continue with my project ideas.

Jonathan

Good news 😊 Glad to hear that.