Single word flash programming is not properly write the memory and disturbed multi write
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-11 12:12 AM
- Labels:
-
STM32H5 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-11 5:11 PM
In context of writing the internal flash, word means the "flash word" which for STM32H503 is 128 bits (16 bytes). You can write less than 16 bytes to a "flash word" (see the RM for details) but then you cannot write other bytes in the same flash word, because of ECC (see the RM for details again). Typically you want to fill entire 16-byte "flash words", maybe except of the last incomplete "word".
Bottom line, the internal flash is special and not friendly to byte-granular (or even bit-granular) writes, as possible with some other memories.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-19 10:18 PM - edited ‎2024-04-19 10:20 PM
Hi all,
@Pavel A. Thank you, buddy. but
Still, I have that issue, I can't find the proper solution, anyone guide me to get the proper solution
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-20 3:13 AM
Here you can find help for your project.
Somebody who will drill into your requirements, study documentation and examples, find proper design and help writing code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-20 3:43 AM
Hi,
>works well in multi-word write only, single word write is not working
Single word write is not possible . Just accept this.
Full 16-byte "flash words" have to be written. Thats it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-20 3:53 AM
Hi @AScha.3
Can you explain that, why single word write method is not working?
I want to know about reason.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-20 4:50 AM
Hi,
see rm :
So every write, that not generates a valid ECC will give a exception - "flash corrupted" or so .
You can set just one bit - but only when writing a full 16-byte "flash word" with this bit and all other zero or what you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-20 5:21 AM
Thanks, Buddy. for your update:smiling_face_with_smiling_eyes:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-20 5:53 AM - edited ‎2024-04-20 5:54 AM
The ECC by itself is not the problem. Some flash chips have ECC as well but they are designed to allow more granular writes. (This invalidates ECC on the block, but write succeeds TL;DR) It's just the ST implementation choice. If you want to write by small pieces, use suitable external memory chip. No external chip? then comply with ST limitation.
