diff options
| author | Jan Staal <info@janstaal.com> | 2021-09-15 15:08:16 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-09-16 12:29:28 +1000 |
| commit | 9e2423e730ae32cd82e5c06099e6a847a2020f6a (patch) | |
| tree | 5bb13b0dc8e1d800263ce39c75c532639ad4249c /ports/stm32/flash.c | |
| parent | d9749f90ad6aecbebffe09a9e252a81624750ceb (diff) | |
stm32: Add support for H7A3(Q)/H7B3(Q), and STM32H73B3I_DK board defn.
This commit is based upon prior work of @dpgeorge and @koendv.
MCU support for the STM32H7A3 and B3 families MCUs:
- STM32H7A3xx
- STM32H7A3xxQ (SMPS)
- STM32H7B3xx
- STM32H7B3xxQ (SMPS)
Support has been added for the STM32H7B3I_DK board.
Signed-off-by: Jan Staal <info@janstaal.com>
Diffstat (limited to 'ports/stm32/flash.c')
| -rw-r--r-- | ports/stm32/flash.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/stm32/flash.c b/ports/stm32/flash.c index d399ece86..b926679f9 100644 --- a/ports/stm32/flash.c +++ b/ports/stm32/flash.c @@ -253,7 +253,11 @@ int flash_erase(uint32_t flash_dest, uint32_t num_word32) { #endif EraseInitStruct.TypeErase = TYPEERASE_SECTORS; + #if defined(FLASH_CR_PSIZE) EraseInitStruct.VoltageRange = VOLTAGE_RANGE_3; // voltage range needs to be 2.7V to 3.6V + #else + EraseInitStruct.VoltageRange = 0; // unused parameter on STM32H7A3/B3 + #endif #if defined(STM32H7) EraseInitStruct.Banks = get_bank(flash_dest); #endif |
