Hi,
Configured IRQ Control Register (IRQCRi) rising and falling edge discovery (IRQMD{10}).
When the interrupt of the edge discovery is raised, where to find out which edge falling or rising is detected, I need to know what’s the pin position of the GPIO input pin when an edge is detected.
The used CPU is RA2E1.
Thanks for posting your question! You could check your IRQ- pin's level when entering your interrupt message function in order to check if a rising or falling edge is detected. In case your pin's level was initially low and when entering your message function it became high then a rising edge was deRead more
Thanks for posting your question!
You could check your IRQ- pin’s level when entering your interrupt message function in order to check if a rising or falling edge is detected. In case your pin’s level was initially low and when entering your message function it became high then a rising edge was detected. If your pin was initially high and also became low then a falling edge was detected. You could read your pin level by accessing the register shown in the picture below.
For example, if your IRQ pin is P110, you could check its level in the interrupt message function like this:
R_PORT1->PIDR_b. PIDR10 and check if it’s 1 (HIGH) or 0 (LOW).
Another way is by using the already given API
1.fsp_err_tR_IOPORT_PinRead(ioport_ctrl_t * constp_ctrl,bsp_io_port_pin_t pin,bsp_io_level_t *p_pin_value);
Kind Regards,
See lessAlex