2021-03-02 04:33 AM
The private variable "FLASH_ProcessTypeDef pFlash" in stm32h7xx_hal_flash.c is used in some functions I notice that it is not initialize by any function.
So for example the first time a call is made to: FLASH_Program(uint32_t TypeProgram, uint32_t FlashAddress, uint32_t DataAddress)
the result of the line is __HAL_LOCK(&pFlash); is undefined. So it will only work by chance on the first call, successive calls are granted to succeed as __HAL_UNLOCK(&pFlash); has been called
Solved! Go to Solution.
2021-03-02 06:01 AM
I have done a bit more research and as HAL_UNLOCKED = 0x00 and pFlash fields will be set to '0' as it a global variable; So it is not undefined and there is no issue
2021-03-02 06:01 AM
I have done a bit more research and as HAL_UNLOCKED = 0x00 and pFlash fields will be set to '0' as it a global variable; So it is not undefined and there is no issue