Sectioning STM32F779II Flash Memory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-08 12:23 AM
I'm trying to allocate 768KB For the Flash for the user program. at address 0x08000000
And also save constant data starting from address 0x08100000 consuming 1024 K bytes
Now from my understanding I should have free space for example sector 10,11.
I'm trying to erase and write to these sections, but there are write protections error, sector 11 can be erased sucessfully but data can not be written to, section 10 can neither be erased nor written to it.
What would be the problem ?
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = 0x20080000; /* end of RAM */
/* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0x1000; /* required amount of heap */
_Min_Stack_Size = 0x2000; /* required amount of stack */
/* Specify the memory areas */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 768K
FLASH2 (r) : ORIGIN = 0x08100000, LENGTH = 1024K
SRAM1 (xrw) : ORIGIN = 0x20020000, LENGTH = 368K
SRAM2 (xrw) : ORIGIN = 0x2007C000, LENGTH = 16K
DTCMRAM (wal) : ORIGIN = 0x20000000, LENGTH = 128K
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
}
- Labels:
-
Flash
-
STM32F7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-08 6:48 AM
That's strange that no one answered, is it that hard question ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-08 7:07 AM
Lacking in usable information.
​
The flashing tools reporting the error, or your own code?
If your own code, nothing here to review.
​
Check .MAP to confirm linker​ is building what you expect.
​
Check flash banking settings.​
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
‎2019-09-08 7:15 AM
My own code can't erase the flash, it says write protection error. The flash is configured in dual banking code.
The erase and writing flash is correct. I really don't know what's wrong.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-08 7:24 AM
Hard to guess from here.
You'll need to instrument your code, and dump out memory and register contents as the code is encountering them. Confirm your expectations and reality.
Ideally test outside of debugger.​
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
‎2019-09-08 7:25 AM
Which steps do I need to make for testing outside the debugger ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-08 7:28 AM
is it possible to erase, program, erase program, at runtime many times ? or it's just one time possible ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-08 7:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-08 7:30 AM
and flash operations here is it https://github.com/trezor/trezor-firmware/blob/master/core/embed/trezorhal/flash.c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-08 7:50 AM
Outside debugger you'd use a serial channel, and instrument code to see what it is doing, and the memory/register context is sees.
​
The memory should permit page/sector level erase and write, multiple times, and depending on the settings/options selected.
​
Dump out the write protect bits, and follow the logic returning the write protect error. You're trying to understand why, so you need to look at what the code is looking at and doing.​
Up vote any posts that you find helpful, it shows what's working..
