2024-11-23 08:03 PM - edited 2024-11-23 08:48 PM
Good morning to all,
I was wanting to save data in the non volatile memory of my STM32H745i-Disk with the STM32H745XL micro.
It is only to save the following structure to read it every time the microcontroller is turned on and modify it from time to time:
typedef struct {
char date1[11];
char date2[11];
unsigned int id;
} DateStruct;
Researching about it I found the following video:
https://www.youtube.com/watch?v=dqfgxS3D1k0
It makes it look easy to use, at minute 5:08 it shows the memory addresses it can use and how the sectors are divided.
In my case I found that my microcontroller has not only sectors but also 2 banks with 7 sectors each.
(page 158 and 159 of the attached pdf).
when trying to write bank 1 an error occurs, it does not let write (as expected by what is indicated in the image). if I put the start address of bank 2 writes (because when debugging I see it in memory at address 0x08100000) but then does not work any code of my board until uploading a code that I did some time ago in which uses both cores ie M4 and M7.
Also if it serves as extra information when debugging again the code stays in this part of code which waits for the other core to start but in theory as I do not use the other core I could save data in that bank but I can not if M7 is waiting for the other core. what I have to do?
I think the code of the M7 core is saved in bank 1 and the M4 in bank 2, how am I supposed to save something in memory if I have the code saved in those memories?
Would I have to use another non volatile memory to store data?
UPDATE:I did not know that there was a 4gb emmc memory, I did not find much on how to use it, if you can guide me a little on how to use the emmc in stm32H7 I would be very grateful.