summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-05-17 23:57:45 +1000
committerDamien George <damien@micropython.org>2021-05-21 00:46:01 +1000
commitea81bcf1c0ddeb8be34192cbededecfa425c039b (patch)
treec8debef5d356eb0290749c531a5d2b75b46d6e41 /tools
parent748339b28126e69fd2dc2778b2a182901d0a4693 (diff)
stm32/mboot: Leave bootloader from thread mode, not from IRQ.
Leaving the bootloader from an IRQ (eg USB or I2C IRQ) will not work if MBOOT_LEAVE_BOOTLOADER_VIA_RESET is disabled, ie if mboot jumps directly to the application. This is because the CPU will still be in IRQ state when the application starts and IRQs of lower priority will be blocked. Fix this by setting a flag when the bootloader should finish, and exit the bootloader always from the main (top level) thread. This also improves the USB behaviour of mboot: it no longer abruptly disconnects when the manifest command is sent. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions