write flash memory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-30 3: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-programming- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-30 4: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?Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-30 6: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:A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-30 7: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...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-30 9: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?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-11-13 6:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-11-13 4: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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-11-19 7: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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-05-29 1: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();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-05-29 1: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.Up vote any posts that you find helpful, it shows what's working..
