STM32F407 memory layout
Asked Answered
I

1

6

I am trying to use Percepio trace lib for FreeRTOS in Snapshot recorder mode. After compilation and running it on my discovery board I need to somehow dump entire RAM to file. I've started ST-LINK utility but I am puzzled on how to dump entire RAM. Could some give hint on that matter?

Incapacity answered 6/10, 2015 at 10:54 Comment(0)
T
10

You can find the memory layout on page 71 of the STM32F407xx Rev8 datasheet.

As ejohnso49 pointed out the SRAM of this chip is not contiguous. So you need address them twice (green and yellow area in the picture) to read out the whole data.

enter image description here

In STM32 ST-LINK Utility connect to device and enter 0x20000000 for address (start of SRAM, first section). For size enter 0x20000 0x30000 (128kB 192kB).

Now you can see the contents of the RAM in the window. For dumping the current view either click on the save icon or in the file menu on Save file as.

Do this also for the other CCM RAM section if you want.

Toluidine answered 6/10, 2015 at 18:6 Comment(4)
Why did you choose 192KB?Incapacity
Because all versions of the STM32F407XX and STM32F417XX provides 192kByte of RAM as default. On other types the size and maybe the start address can vary. You should always check the datasheet.Toluidine
This is not completely correct because technically RAM in this chip family is not continuous in the address space. The main blocks of SRAM do start at 0x20000000, but only extend to 0x2001FFFF, which is 128 kB (0x20000). The remaining 64 kB (0x10000) is part of the CCM RAM and starts at 0x10000000 and ends at 0x1000FFFF.Gorizia
Hey ejohnso49 thank you for this clarification. I wonder that this was not noticed earlier. Anyway i updated the answer.Toluidine

© 2022 - 2024 — McMap. All rights reserved.