iMX6 persistent data storage

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX6 persistent data storage

Jump to solution
1,700 Views
Maddis
Contributor IV

Hi,

The subject might be bit misleading. What I'm looking for is some way to store data (32bit is enough) that will survive reboot from Linux to U-boot on iMX6Q.

On iMX5 based product I reserved part of the iRAM for that and it worked fine. I tried same on iMX6Q and it seems that data won't survive reboot to U-boot but is cleared. 

I'm using Yocto 2.1 with Linux 4.1.15 with NXP patches. U-boot is 2016.03.

I found out that for whatever reason iRAM is called now OCRAM in code and I changed the ocram definition size if devicetree so I have last 4kB free. I then used my driver to reserve that part and I can read/write the iRAM just fine from Linux side. I'm using the same base code I've used in iMX5 based product so that is known to work.

Does anyone else know what could cause the iRAM to be cleared on reboot and/or what other (better?) ways there are to transfer data (32-bits is enough) from Linux to U-boot? It helps if it's something that clears on power off ie. RAM based and also to avoid any flash etc.. wearing out overtime if being written at every reboot.

Labels (3)
0 Kudos
Reply
1 Solution
1,221 Views
b36401
NXP Employee
NXP Employee

You can use general purpose registers of System Reset Controller.
Please refer i.MX 6Dual/6Quad Applications Processor Reference Manual starting from chapter 60.7.7 "SRC General Purpose Register 1 (SRC_GPR1)".

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
3 Replies
1,222 Views
b36401
NXP Employee
NXP Employee

You can use general purpose registers of System Reset Controller.
Please refer i.MX 6Dual/6Quad Applications Processor Reference Manual starting from chapter 60.7.7 "SRC General Purpose Register 1 (SRC_GPR1)".

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
1,221 Views
Maddis
Contributor IV

I might have been bit too hasty on my reply. It seems that Linux is already using those registers. For a test I tried to stop it from using them and I was able to read/write them just fine, but content didn't survive reboot.

Interestingly enough manual does list a reset - value for those registers although it also states that value will persist across system resets.

It might as well be that I wasn't able to remove all Linux use from those registers, but looking at the description it might be that those functions are used when CPU resumed from suspend(low power mode) so in that case I don't think I can/should be using them if I want to be able to suspend the unit.

1,221 Views
Maddis
Contributor IV

Seems to be just what I was looking for! Thanks

0 Kudos
Reply