Hello, I want to use the Backup SRAM for writing non-volatile-Data. How can I do that, using Keil, I now that it should happen through the D3 domain’s AHB matrix, according to RM0433. But I have no clue which libraries to use.
Greetings
Are you trying to put read-only (RO) data that doesn't change into RAM? Maybe consider a device that has a lot of internal flash, enough room for your data, and define the data which doesn't change with "const" in C. Because if the device ever powers down, and you put important data in RAM, then you wouldn't have that data, after power recovery, right? Only RW(read-write) data should go into RAM, in every use case I can think of.
Anyways, the linker should tell you if the application's data fits into the available memory space.
If you want to specify a group of RW data into a specific area of RAM, consider using a named section and a scatter file:
developer.arm.com/.../--attribute----section--name-----variable-attribute
https://developer.arm.com/documentation/dui0474/m/scatter-loading-features/example-of-how-to-explicitly-place-a-named-section-with-scatter-loading?lang=en
Use the address given in the RM0433 manual from ST. 0x3800 0000 ... Maybe... it looks like there are a few memory areas to choose from!
Look in the MDK User guide:
https://www.keil.com/support/man/docs/mdk_gs/
Search the word "scatter". That will show you visually where to find the scatter file in the IDE. ((It's in Options for Target (wand icon), Linker tab.))
I'd also highly recommend backing up the scatter file. If you make too many changes to a project (accidentally change the device, eeek!), it may override the scatter file back to its default. It would be diligent to document that a custom scatter file is used in your project notes, location of backup, etc.