diff options
| author | Damien George <damien@micropython.org> | 2022-02-03 13:21:57 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-02-03 13:21:57 +1100 |
| commit | 26faf74d52e3e953c9ddbcd800a2f9e117477ce7 (patch) | |
| tree | 5e7212cd8c71a939bfa41d824d6f9ccd7c32df28 | |
| parent | 4f918f4b26ec2c949f6832b972cdab80506b7038 (diff) | |
stm32/mboot: Add support for F469/479 MCUs in fwupdate.py.
And don't assert on the sector number in sector_erase, so it can support
erasing arbitrary sectors.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | ports/stm32/mboot/fwupdate.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/stm32/mboot/fwupdate.py b/ports/stm32/mboot/fwupdate.py index 3b8dc51e1..0e7ea0141 100644 --- a/ports/stm32/mboot/fwupdate.py +++ b/ports/stm32/mboot/fwupdate.py @@ -105,10 +105,11 @@ class Flash: dev_id = 0 # Configure flash parameters based on MCU. - if dev_id in (0x413, 0x419, 0x431, 0x451, 0x452): + if dev_id in (0x413, 0x419, 0x431, 0x434, 0x451, 0x452): # 0x413: STM32F405/407, STM32F415/417 # 0x419: STM32F42x/43x # 0x431: STM32F411 + # 0x434: STM32F469/479 # 0x451: STM32F76x/77x # 0x452: STM32F72x/73x self._keyr = stm.FLASH + stm.FLASH_KEYR @@ -155,7 +156,6 @@ class Flash: stm.mem32[self._cr] = self._cr_lock def erase_sector(self, sector): - assert 0 <= sector <= 7 self.wait_not_busy() stm.mem32[self._cr] = self._cr_init_erase(sector) stm.mem32[self._cr] |= self._cr_start_erase |
