External count

Hello, I am using 52832. There is an external interrupt count with a maximum frequency of 1kHz. I have two hardware. One I transmit to the mobile phone at an interval of 50ms. Don't connect another hardware to the mobile phone. Finally, I check that the data connected to the mobile phone is 5-7 less than the hardware data I don't connect to the mobile phone. Gpiote interrupt priority is 3 and timer timer is 5 Is the gpiote interrupt preempted by Bluetooth. Is there any way to deal with it? I can count accurately and check it on my mobile phone at the same time.

Parents Reply
  • There may still be ways to handle this. You could use a timer as counter, and do the counting with a GPIOTE input connected to a TIMER in counter mode. That way, no CPU intervention is needed to count. Then you would only need the CPU for configuration, and to read the counter value  (trigger capture task and read captured value). You can even do that from another timer via PPI in order to do this in HW, so that this is accurate even if there are interrupts at the "wrong" times. See an example of that in this old thread.

Children
Related