2017-06-29 05:22 AM
7There is a potential bug in the HAL library ver 1.0 for the STM32H7:
Functions FLASH_Erase_Sector and FLASH_MassErase (file stm32h7xx_hal_flash_ex.c,) change the PSIZE value in the FLASH->CRx register according to the VoltageRange argument. The function HAL_FLASH_Program (stm32h7xx_hal_flash.c) seems to expect the default PSIZE value (64-bit).
In other words: calling FLASH_Erase_Sector or FLASH_MassErase functions with a VoltageRange argument other than FLASH_VOLTAGE_RANGE_4, changes the behaviour of the HAL_FLASH_Program function.
Separate questions:
Is there any plan to support 8, 16 or 32-bit programming parallelisms in the HAL_FLASH_Program API?
#flash #hal #stm32h72018-10-08 03:17 AM
Hello,
We have already passed this issue along to our development team.
A new API __HAL_FLASH_SET_PSIZE() will be added to Flash driver to set the Flash parallelism parameter for Program and Erase operations.
Please, keep an eye out for the next update !
Kind Regards,
Imen
2019-12-05 01:24 AM
can you please send me the application code
2020-02-15 06:22 PM
I'm using the default linker script (Auto-generated by STM32CubeIDE for the STM32H743) and it shows the various sections getting mapped to the 2MB of flash. However, how do I know which memory/sector is unused and therefore safe to FLASH_Erase_Sector / HAL_FLASH_Program ? I don't have too much data that I need in NVM, but according to UM2217, it sounds like you have to erase an entire 128Kbytes sector, but flashing is done in 32-byte chunks only (256-bit).. ?
2020-02-16 11:45 AM
> how do I know which memory/sector is unused
Usually one can be pretty sure that the very first sector at 0x08000000 (bank 1 sector 0) is occupied by user application or bootloader.
About the rest, you can only check whether a whole page is erased (all bytes are FFs) or not.
> it sounds like you have to erase an entire 128Kbytes sector, but flashing is done in 32-byte chunks only (256-bit).
Correct.
-- pa
2021-08-16 11:33 PM
Hi Volker Bremauer,
Can you provide the project in public?
Thanks in advance.