2024-04-25 12:24 PM
We need to store some of our application data in BKPSRAM block so we can persist it during power down. Here is the code that we created to write to the BKPSRAM block, could you please help me to define what is wrong. Thanks.
2024-05-02 11:49 PM
Hi @asydhom ,
Not diiging into your code yet.
Would be very good to get some description of the behavior first .. any logs to share ?
Else I also point to this page BKPSRAM internal memory - stm32mpu
By default BKPSRAM is SECURED and so not accessible to write operation. It require a change in TF-A to set it back to non-secure.
Hope it help
Olivier
2024-05-08 05:25 AM
Hi Olivier,
I forwarded your reply to our customer and here its response with the changes he did to make the BKPSRAM block non-secure.
======================================================================================
There aren't any logs, all I am trying to do is write to the BKPSRAM. When I use mmap in a write.c and then mmap read.c, I cannot read back what I have written.
I have already done DECPROT(STM32MP1_ETZPC_BKPSRAM_ID, DECPROT_NS_RW, DECPROT_UNLOCK) in optee.dts
and I have already done
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
/* USER CODE BEGIN reserved-memory */
optee_framebuffer@dd000000 {
reg = <0xdd000000 0x1000000>;
no-map;
};
optee@de000000{
reg = <0xde000000 0x2000000>;
no-map;
};
bkpsram@54000000 {
reg = <0x54000000 0xBB8>;
no-map;
};
/* USER CODE END reserved-memory */
};
in kernel.dts