How fast is event_change?


#1

Hi,
I need to read 0,1ms pulses. How fast is event_change? Does WP7502 have interrupt pins and how to use them?


#2

Hi,
WP7502 has got CF3 GPIOs, so I would use one to dedect pulse/interrupt.

For example:
void TestFun()
{
le_gpioPin7_SetInput(LE_GPIOPIN7_ACTIVE_LOW);
le_gpioPin7_ChangeEventHandlerRef_t Ref = le_gpioPin7_AddChangeEventHandler(LE_GPIOPIN7_EDGE_FALLING, EventInterrupted, NULL, 0);
}

void EventInterrupted(bool state, void *ctx)
{
//pulse
//to grab time you can use le_clk_GetRelativeTime (void) or le_clk_GetAbsoluteTime (void)
//both returns microseconds
}

Reaction should be under 1ms but Im not sure if it is <=0.1ms.