How can I add interrupt in uboot to detect my gpio pin

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

How can I add interrupt in uboot to detect my gpio pin

3,762 次查看
wangvictor
Contributor III

Hi All

I'm using Android 6.0 to build my image.

And the CPU that I developing is i.MX 6 sabresd DL.

Now I'm trying to design a button that will detect during uboot.

If the button be pressed than will get into recovery mode.

So I need to make an interrupt in uboot.

How to do it?

标签 (4)
标记 (2)
0 项奖励
回复
2 回复数

2,827 次查看
andrewdyer
Contributor III

I was just looking at this in the NXP distribution of Android 8.  The uboot for mx6sabresd already has support for entering fastboot/recovery mode.  They don't use an interrupt, just read the state of the switch at a point during boot time, so it requires the user to press and hold through the time the switch is read, but from what I understand that is normal behaviour.

see mx6sabresd.c\mx6sabresd\freescale\board - uboot-imx - i.MX U-Boot 

and look for CONFIG_FSL_FASTBOOT

0 项奖励
回复

2,827 次查看
igorpadykov
NXP Employee
NXP Employee

Hi victor

please look on

arm - Handling gpio Interrupts in u-boot - Stack Overflow 

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

0 项奖励
回复