Linux user applications access the i.mx RT1020 SRC Reset Status register

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

Linux user applications access the i.mx RT1020 SRC Reset Status register

726 次查看
kevin_zhao
Contributor I

Hi, I want to access the restart status register and read out its corresponding value to analyze the cause of the restart. By referring to the manual, the corresponding address is 0x400F8008, but using devmem and test Demo to access respectively, the return is SEGV. Could you please tell me how to access this register and get the corresponding value.

0 项奖励
回复
2 回复数

705 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi @kevin_zhao ,

Maybe you can access the register by direct accessing

val = (*(unsigned int*)0x400F8008);

 

Regards,

Jing

0 项奖励
回复

692 次查看
kevin_zhao
Contributor I

Hi  @jingpan,

Thanks for you suggestion, I have try the method as you said,  Maybe there  is  memory access protetcted by linux core, that also can't access the value of register, but I have solved this question by use the file named "dev/mem" with lseek and read operation

Regards~

 

0 项奖励
回复