2021-05-06 09:01 PM
I have added the USB device via the CubeMX within STM32CubeIDE, however it have not automatically add the MX_USB_DEVICE_Init() function call at the main function. Do I have to enable something for this ? Or I'll have to manually add them myself?
Solved! Go to Solution.
2021-05-06 11:29 PM
Is your application enabling FreeRTOS? If yes, check on the function task, it seems cubemx put it there instead of main body.
In fact from your snippet, it might me in TouchGFX task function where they put it as __weak. But since TouchGFX task override it, that is why it was not called and therefore you have to manually add it
2021-05-06 11:29 PM
Is your application enabling FreeRTOS? If yes, check on the function task, it seems cubemx put it there instead of main body.
In fact from your snippet, it might me in TouchGFX task function where they put it as __weak. But since TouchGFX task override it, that is why it was not called and therefore you have to manually add it
2021-05-06 11:47 PM
Yes you're right, the MX_USB_DEVICE_Init call is placed inside the weak TouchGFX task. So it seems theres no other way but to manually add the init code ..