Issues about GPIO debug

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

Issues about GPIO debug

611 Views
tony_l_cai
Contributor III

Hi,all

     Now I want to "cat /sys/kernel/debug/gpio", but I found "debugfs_create_file" was called but didnt reate the path "sys/kernel/debug/gpio",and both the CONFIG_DEBUG_FS and CONFIG_DEBUG_FS are open. but when debugfs_create_file was to create the gpio node, it failed to  create the node. and I want to use the dump_stack to trace, and the dump_stack cannot be used, in another word, it cannot dump the log.

     So, I have the 2 questions: 1. how to create the GPIO node? Can I use mount the debugfs before entering to kernel? where to add the cmd?

2. how to use dump_stack? why cant I dump the log?

help,plz,3Q!

Labels (2)
0 Kudos
2 Replies

421 Views
igorpadykov
NXP Employee
NXP Employee

Hi tony

for gpio node usage please look below links

https://community.freescale.com/docs/DOC-1459

http://falsinsoft.blogspot.com/2012/11/access-gpio-from-linux-user-space.html

for debugging purposes one can look at appnote below

http://cache.freescale.com/files/32bit/doc/app_note/AN4553.pdf

regarding debugfs please check below and post on kernel.org

https://www.kernel.org/doc/Documentation/filesystems/debugfs.txt

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

421 Views
tony_l_cai
Contributor III

Dear igor,

Now Iwant to tell you my steps for GPIO test,

Firstly, I change the high/low signal in codebase, after I measured I found it was right

Secondly, I change the high/low signal in console by echo cmd, after I measured I found it cannot change it

I also found the GPIO value after “cat /sys/kernel/debug/gpio” is not right.

So Please help me,3Q!

发件人: igorpadykov

发送时间: 2015年2月12日 8:59

收件人: Tony L Cai

主题: Re: - Issues about GPIO debug

<https://community.freescale.com/>

Issues about GPIO debug

reply from igorpadykov<https://community.freescale.com/people/igorpadykov?et=watches.email.thread> in i.MX Community - View the full discussion<https://community.freescale.com/message/480080?et=watches.email.thread#480080>

0 Kudos