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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

725件の閲覧回数
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 返答(返信)

704件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @kevin_zhao ,

Maybe you can access the register by direct accessing

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

 

Regards,

Jing

0 件の賞賛
返信

691件の閲覧回数
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 件の賞賛
返信