cancel
Showing results for 
Search instead for 
Did you mean: 

Bootloader and Application use both USB as serial port: how to deinit?

christophschwarz9
Associate II
Posted on October 16, 2015 at 14:17

Hello,

I have a bootloader communicating over USB and the application which is loaded and started uses the same USB port. When I use the bootloader and start the application the USB port isn't working inside the application. When I use the application without the bootloader flashed with SWD the USB is working.

I have no special de-init function for the USB port. How do I have to de-init it, before starting the application that it can use the same port?

Regards,

Chris

#stm32 #bootloader #usb #cdc
3 REPLIES 3
Posted on October 21, 2015 at 17:43

Hi Chris_31543,

You did not mention which package you are using. However, you can refer to USB examples provided within ST firmware packages.

-Shahrzad-

christophschwarz9
Associate II
Posted on October 22, 2015 at 11:47

Hello,

I use the CubeMX with its middleware drivers, there are some deinit functions but they doesn't change the fact that I have to replug the USB cable after jumping from bootloader to the main application or vice versa

Regards,

Chris

Posted on October 22, 2015 at 16:39

Hi Chris_31543,

Maybe section 3 of 

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/CD00167594.pdf?s_searchtype=keyword

 may guide you to the real causes of the problem.

-Shahrzad-