2023-07-31 09:11 AM
Good Day,
Is it possible to write a Word using HAL_FLASH_Program? If I use the TypeProgram = FLASH_TYPEPROGRAM_DOUBLEWORD in the function (shown below) it will write to flash. If I use FLASH_TYPEPROGRAM_WORD it will not write to flash and I receive an error.
HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data);
Regards,
SJC
Solved! Go to Solution.
2023-07-31 10:00 AM
Per the reference manual, the STM32C0 series can only program double-words in flash. Writes less than that will fail.
2023-07-31 10:00 AM
Per the reference manual, the STM32C0 series can only program double-words in flash. Writes less than that will fail.
2023-08-07 02:01 PM
Also there is no FLASH_TYPEPROGRAM_WORD defined in HAL:
Therefore it's not even clear how the code is compiled in that case.