Jumping to bootloader while keeping USB connected
Posted: Thu Mar 05, 2015 2:06 pm
Hello,
I'm building an application for a STM32F405 where I have my flash divided into 3 sections. Main part (sector 0-9) is the main application, sector 10 contains the bootloader and sector 11 non volatile parameters.
The bootloader is also ChibiOS based and support firmware transfer using both Serial USB and CAN. The jump to the bootloader is initialized by sending a command either over CAN or USB and works like a charm, the firmware flashing as well. The problem I have is that the USB serial port is lost and reconnected during the jump from main application to bootloader. This can be handled in the PC-application, but it would be very nice if I could manage to keep the connection between the two Chibios applications.
Could this be, safely, achieved by for example, skipping the shutdown procedure for the USB module before jumping to the bootloader? Then skipping the initialization of the USB in the bootloader, just setting up a few threads for communicating through the SDU1 device
I'm building an application for a STM32F405 where I have my flash divided into 3 sections. Main part (sector 0-9) is the main application, sector 10 contains the bootloader and sector 11 non volatile parameters.
The bootloader is also ChibiOS based and support firmware transfer using both Serial USB and CAN. The jump to the bootloader is initialized by sending a command either over CAN or USB and works like a charm, the firmware flashing as well. The problem I have is that the USB serial port is lost and reconnected during the jump from main application to bootloader. This can be handled in the PC-application, but it would be very nice if I could manage to keep the connection between the two Chibios applications.
Could this be, safely, achieved by for example, skipping the shutdown procedure for the USB module before jumping to the bootloader? Then skipping the initialization of the USB in the bootloader, just setting up a few threads for communicating through the SDU1 device