HAL_Program_Flash not writing
Hello! I'm using the STM32F767ZI Nucleo board. I'm trying to test an IAP using LwIP. Since I can only get LwIP working in a FreeRTOS environment., that's what I'm using, I have the following code which I cannot get to even do a simple mass write of FF's in the Flash area..
/* init flash */
FLASH_If_Init();
/* erase user flash area */
FLASH_If_Erase(0x8020000);
temp_address = 0x8020000;
for(int j = 0; j < len; j++)
{
ret_cnt += HAL_FLASH_Program(FLASH_TYPEPROGRAM_BYTE, temp_address, 0XFF);
temp_address += 4;
}
temp_address = 0x8020000;
for(int j = 0; j < count; j++)
{
ret_cnt += HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD, temp_address, 0XFFFFFFFF);
temp_address += 4;
}Count is 200, len is 800. Nothing is being written to the memory area. But the value of the call always return 0. As you can see I'm attempting the same write twice. But it does not change any memory.
Any ideas?
Thanks
