circuitpython/ports
Damien George ea81bcf1c0 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>
2021-05-21 00:46:01 +10:00
..
bare-arm bare-arm: Switch to use MICROPY_ERROR_REPORTING_NONE to reduce size. 2021-04-27 23:52:40 +10:00
cc3200 all: Rename mp_keyboard_interrupt to mp_sched_keyboard_interrupt. 2021-04-30 15:13:43 +10:00
esp32 esp32/boards: Fix spelling mistakes in comments for UM_xxx boards. 2021-05-14 22:26:29 +10:00
esp8266 all: Rename mp_keyboard_interrupt to mp_sched_keyboard_interrupt. 2021-04-30 15:13:43 +10:00
javascript all: Rename mp_keyboard_interrupt to mp_sched_keyboard_interrupt. 2021-04-30 15:13:43 +10:00
mimxrt mimxrt: Improve ticks and sleep functions using GPT. 2021-05-18 22:36:32 +10:00
minimal ports: Disable MICROPY_PY_ASSIGN_EXPR in bare-arm and minimal ports. 2020-06-16 22:06:21 +10:00
nrf nrf/boards: Add support for evk_nina_b3 board. 2021-05-18 12:14:57 +10:00
pic16bit pic16bit/Makefile: Make the XC compiler version user-configurable. 2021-04-28 00:18:04 +10:00
powerpc ports: Remove def of MP_PLAT_PRINT_STRN if it's the same as the default. 2021-02-04 22:39:17 +11:00
qemu-arm tests: Rename run-tests to run-tests.py for consistency. 2021-03-12 19:56:09 +11:00
rp2 rp2/CMakeLists.txt: Include tinyusb_common in PICO_SDK_COMPONENTS. 2021-05-11 12:46:18 +10:00
samd all: Rename mp_keyboard_interrupt to mp_sched_keyboard_interrupt. 2021-04-30 15:13:43 +10:00
stm32 stm32/mboot: Leave bootloader from thread mode, not from IRQ. 2021-05-21 00:46:01 +10:00
teensy all: Replace busses with buses. 2021-05-20 23:22:03 +10:00
unix unix/modffi: Use a union for passing/returning FFI values. 2021-05-06 12:17:10 +10:00
windows all: Rename mp_keyboard_interrupt to mp_sched_keyboard_interrupt. 2021-04-30 15:13:43 +10:00
zephyr zephyr/boards: Add config for nucleo_wb55rg board. 2021-04-30 15:32:16 +10:00