Question
usb bootloader in cortex-m3
Posted on October 16, 2014 at 12:50
Hi everybody,
this is my first post on STe2e, so be patient with me. I've read a good amount of threads related to bootloaders/interrupt/VTOR but I cannot find a final word to my problem so I decided to start a new thread. I'm working on stm32f103 and my application is using USB for communication. I wrote a simple bootloader based on AN2557 for application update through USB. For various reasons I must start the application code without resetting the MCU and after using USB. Once jumped to application code, the USB_IRQHandler is never executed, leading to usb fault. NOTE: before jumping I successfully shut down USB interface and disable all interrupts and the vector table is remapped at beginning of user application. After trying different approaches I disabled USB interrupts in bootloader and manage USB by polling. So USB_IRQHandler is correctly executed in user application now.. but I don't like this solution so much. Is there a way to use the same interrupt in booltloader AND in application? Thank you for your kind help, Nicola