Showing results for 
Search instead for 
Did you mean: 

USB graceful shutdown before a software reset


I have written a bootloader that is used to update the application code via a Modbus interface over USB.

I'm still working on the code to start the bootloader when new firmware is to be uploaded to the custom board.  My board has a buck and an inverting buck-boost converter that are being controlled by the MCU application code.

Right now, I'm planning on generating a software reset to restart the bootloader so that it can start receiving and programming the new application firmware.  If I generate the software reset, I need the USB port to be quickly usable again so that the firmware update utility can continue to use it to transfer the new firmware.

Is there a proper and graceful way to stop USB communication in the application code, generate a software reset, then restart USB communication in the bootloader?