iMX6 persistent data storage

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

iMX6 persistent data storage

跳至解决方案
1,703 次查看
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.

标签 (3)
0 项奖励
回复
1 解答
1,224 次查看
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 项奖励
回复
3 回复数
1,225 次查看
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 项奖励
回复
1,224 次查看
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,224 次查看
Maddis
Contributor IV

Seems to be just what I was looking for! Thanks

0 项奖励
回复