summaryrefslogtreecommitdiff
path: root/tools/pydfu.py
diff options
context:
space:
mode:
authorAndrew Leech <andrew.leech@planetinnovation.com.au>2020-07-01 15:06:14 +1000
committerDamien George <damien@micropython.org>2020-07-01 16:54:03 +1000
commit494bcad8aba37966297470419b3c690a362495bb (patch)
treeebd987087adfe323c6cf7155a96c49cd906fd2ff /tools/pydfu.py
parent95ec0debec1064695b9b0ecdbfa2146f17f898bb (diff)
stm32/mboot: Disable polling mode by default and use IRQ mode instead.
Polling mode will cause failures with the mass-erase command due to USB timeouts, because the USB IRQs are not being serviced. Swiching from polling to IRQ mode fixes this because the USB IRQs can be serviced between page erases. Note that when the flash is being programmed or erased the MCU is halted and cannot respond to USB IRQs, because mboot runs from flash, as opposed to the built-in bootloader which is in system ROM. But the maximum delay in responding to an IRQ is the time taken to erase a single page, about 100ms for large pages, and that is short enough that the USB does not timeout on the host side. Recent tests have shown that in the current mboot code IRQ mode is pretty much the same speed as polling mode (within timing error), code size is slightly reduced in IRQ mode, and IRQ mode idles at about half of the power consumption as polling mode.
Diffstat (limited to 'tools/pydfu.py')
0 files changed, 0 insertions, 0 deletions