This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Interrupt capture time on High and Low Accuracy using GPIO

So what I want to ask is what is the scan latency during high accuracy and low accuracy?

nrf_drv_gpiote_in_config_t in_1_config = GPIOTE_CONFIG_IN_SENSE_HITOLO(0);

//or

nrf_drv_gpiote_in_config_t in_1_config = GPIOTE_CONFIG_IN_SENSE_HITOLO(1);

Also if an insight regarding power consumption can be given would be great (we are really tight in regards to power constraints)

Parents
  • Hi,

    The difference between high and "low accuracy" is that high accuracy use GPIOTE (p)IN event, while "low accuracy" use the GPIOTE PORT event. The PORT event can be shared between multiple GPIOs, meaning that the application/driver needs to check which pin generated the event in the interrupt handler.

    The events are generated in the hardware, meaning that the latency will depend on interrupt priority, and if other higher priority tasks are blocking the handling of the interrupt. This is not a general question we can give you a definite answer to. You can use the IN event to control tasks in HW with PPI, which will have very low latency (Device startup times).

    Best regards,
    Jørgen

  • As I said, this will depend on the application and the state the CPU is in. If you connect the event to a task using PPI, the latency is given in the table I linked above (Time from HW event to PPI event in Low Power System ON mode - 0.0625 us). If the CPU is in idle (System ON sleep mode), the wakeup is 3 us (Time from IDLE to CPU execute). If using the PORT event (low accuracy), the CPU needs to run some code to check which pins generated the event.

    You can easily test the timing in your application using a logic analyzer. Connect the signal that generates the GPIOTE event, and a second GPIO to the analyzer, toggle the second GPIO in the GPIOTE event handler, and measure the timing difference between the two signals.

Reply
  • As I said, this will depend on the application and the state the CPU is in. If you connect the event to a task using PPI, the latency is given in the table I linked above (Time from HW event to PPI event in Low Power System ON mode - 0.0625 us). If the CPU is in idle (System ON sleep mode), the wakeup is 3 us (Time from IDLE to CPU execute). If using the PORT event (low accuracy), the CPU needs to run some code to check which pins generated the event.

    You can easily test the timing in your application using a logic analyzer. Connect the signal that generates the GPIOTE event, and a second GPIO to the analyzer, toggle the second GPIO in the GPIOTE event handler, and measure the timing difference between the two signals.

Children
No Data
Related