2020-05-11 05:40 AM
Hi everyone.
At this moment I'm working in an integration on an old project which used Standard Peripherals Library instead of HAL libraries.
Here, when I try to write in FLASH memory I find the next line:
assert_param(IS_FLASH_ADDRESS(Address));
Which basically is checking if the given address is inside the range [0x08000000, 0x080FFFFF). In my particular case, I'm trying to write inside the range [0x00000000, 0x0003FFFF], that is also flash memory for user when BOOT pins are set in a certain way.
Is possible to write in this positions using this libraries?
I'm working with a STM32F105VC, and the line I talked you about is inside the function FLASH_ProgramWord(...) of this lib.
Thank you. My best regards.
Areify.
Solved! Go to Solution.
2020-05-11 06:09 AM
The flash is still accessible at 0x08000000 even when mapped to 0x0. Just write to it in it's original location.
That or redefine IS_FLASH_ADDRESS, but that seems like a bad idea.
2020-05-11 06:09 AM
The flash is still accessible at 0x08000000 even when mapped to 0x0. Just write to it in it's original location.
That or redefine IS_FLASH_ADDRESS, but that seems like a bad idea.
2020-05-11 06:29 AM
Redefinition is a bad idea because is an existing project (if not, I would use HAL) and other parts of code are working with this library.
Do you mean that if I write at 0x08000000 it will apply to 0x00000000? Are you sure that BOOT pins configuration work as a mapping activation/deactivation?
2020-05-11 06:31 AM
2020-05-14 06:09 AM
Can I write a halfword value in a position which has not value FF FF?
I'm getting FLASH_ERROR_PG, I suppose this is the problem.