Edge interrupt detection on GPIO

3 posts / 0 new
Last post
CD
Offline
Last seen:3年10个月前
加入:2015-11-18 02:51
Edge interrupt detection on GPIO

Hello,

Please let me ask the interruption behavior on GPIO especially edge detection.

I would like to detect the rising edge for GPIO, and I configure the GPIO_EnableIRQ() function as followings:

GPIO_EnableIRQ( GPIO_PORT_x, GPIO_PIN_x, GPIO1_IRQn,
false, // logic-High detection
true, // wait for key release after interrupt ( use as edge detection)
0 );

If the target Port/Pin has been already "High-signal" when I call above function, I get the interruptionimmediately.
Is this behavior expected? It works like as level-interruption...
(Regarding on the manual, the description for EDGE_LEVELNx register is defined as "wait for key release after interrupt was reset for IRQx." <-- there are no edge describing... but name is EDGE_LEVEL...)

Perhaps, I made a mistake for configuration before I call GPIO_EnableIRQ() function.

I would like to know whether this is a correct behavior or not. If you could feed any comments to me, it would be much helpful.

Best regards,
CD

Device:
MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi DV,

Hi DV,

既然你已经configured your interrupt to be triggered with logic-high if the pin is allready high the interrupt will be triggred immidiatelly. The interrupts on the 580 are level triggered. With the true setting //wait for key release after interrupt, in the enable function your device is going to wait until the release of the line and then issue the interupt again. Please check the UM-B-004.pdf for more info regarding the peripheral drivers.

Thanks MT_dialog

CD
Offline
Last seen:3年10个月前
加入:2015-11-18 02:51
Thank you very much for your

Thank you very much for your reply.

I understand that DA1458x have level interruption on GPIO, and NOT edge detection. And I also got the reason why your instruction manual describes as "Wait Key release."

Thanks as always,
CD