2011-05-30 03:36 AM
hello,
I have a STM32F107 and I'm programming with IAR embedded workbench. I have seen on the stm32f107 datasheet that the flash memory adress is between 0x08000000 and 0x0803FFFF. How sould I program if I want to write a .txt on the flash memory? Could anyone give me a sample of program? Any help is welcomes. Thanks to everybody #flash #rtfm #iar #stm32 #flash-programming2011-05-30 04:15 AM
Aren't there some flash programming examples within the ST firmware releases? Have you reviewed the flash app note?
The flash is programmable 16-bits (half-word) at a time. How to you plan on delivering the .TXT file to your part?2011-05-30 06:06 AM
''Aren't there some flash programming examples within the ST firmware releases?''
Yes, there are.''Have you reviewed the flash app note?'' Also the Flash Programming Manual:2011-05-30 07:42 AM
I want to write and read as easy as on window. I need to store some datas and then transfert it to usb.
So I need to write in the flash memory, but I don't know if with write() it will be done automaticaly...2011-05-30 09:24 AM
''I want to write and read as easy as on window.''
Please explain what you mean by that: - what do you want to read and write? - why do you want in on a window?''I need to store some datas and then transfer it to usb.'' What do you mean by, ''transfer it to usb'' ?''So I need to write in the flash memory'' Why? How does that follow?''I don't know if with write() it will be done automaticaly'' That depends on precisely what ''write()'' you are talking about! What does the documentation for this ''write()'' tell you?? Have you actually studied any of the documents mentioned in previous posts?
2011-11-13 06:37 AM
2011-11-13 04:13 PM
If
i
use the same
utility
link
and loaded into an
SRAM memory
,erasing
and writing to
flash memory
does not work (read from SD card works).
Well without seeing how you are writing the flash I can't give a specific reason why it might fail. There is no intrinsic limitation that would prevent it working from SRAM. If you have software timing/timeout loops, these may expire faster when running from SRAM. The flash unit is not going to permit writing to memory that is not erased, and expects aligned 16-bit units to be written. How does it fail, does the flash unit return an error, or does it not write the correct data, you'll need to be more specific. There are issues with how code in SRAM boots, but again without knowing more details I can't say if they impact you.
2011-11-19 07:16 AM
Thanks for your answer.
Problems writing
to
flash
is
resolved
.The above
problem
occurs when
not running
HSI :--).New query
:
As
with
flash
utilities
disable
FLASH_ReadOutProtection
bit
and write
a new program.
It is normal
, to protect
the content
from reading
flash
firmware
?
Thanks for any advise.2015-05-29 01:09 PM
Dear clive1,
I have same problem, when i erase to all flash, i can change flash one time, if i not erase to flash i cant change. what is wrong colud you help me. code part is this. regardsHAL_FLASH_Unlock();
HAL_FLASH_Program(TYPEPROGRAM_HALFWORD, 0x0800fff0, 0x01); // 0x01 is dummy write
HAL_FLASH_Lock();
2015-05-29 01:16 PM
Well that's how flash memory works.
''The flash unit is not going to permit writing to memory that is not erased, and expects aligned 16-bit units to be written.
''You seem to ignore any error returned from the function. If you can't do the erase then you'll have to journal your writes. ie advance to the next unwritten location, and write the new value there, and when reading go through the list until you know what was more recent write was.