cancel
Showing results for 
Search instead for 
Did you mean: 

EEPROM emulation in STM32F40x/STM32F41x microcontrollers (AN3969) - Needs to be updated!

Not applicable

Software obtained at this address, cannot be used directly with the STM32CubeIDE.

Strangely, current functions no longer have error control.

For example (Code available in the year: 2012:(

FLASH_Status FLASH_EraseSector(uint32_t FLASH_Sector, uint8_t VoltageRange)

Code available in the year: 2017 (From STM32CubeIDE, file: stm32f4xx_hal_flash_ex.c):

void FLASH_Erase_Sector(uint32_t Sector, uint8_t VoltageRange)

When trying to adapt the code, I realized that there was a very significant reduction in the code, is this really necessary? Is it currently necessary to disregard the error tracking code that already existed?

1 REPLY 1
TDK
Guru

They are different functions from different libraries.

FLASH_EraseSector is from the SPL.

https://github.com/wds315/stm32f4_extboard_iap_eth/blob/6db9b7cdfb1f9f498084f1577720eca063d5a6ea/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c#L341

In HAL, FLASH_Erase_Sector is not meant to be called by the user. You should be calling HAL_FLASHEx_Erase.

If you feel a post has answered your question, please click "Accept as Solution".