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

Can i use a pin change interrupt to count the number of pulses in a pwm signal in nrf51xx

I JUST NEED TO KNOW NUMBER OF ON PULSES PRESENT IN THE PWM OUTPUT CAN I USE PIN CHANGE INTERRUPT TO COUNT THE NUMBER OF ON PULSES OR SOME OTHER METHOD IS AVAILABLE

Parents
  • If I were you I would look into using Timer/Counters, PPI channels, and GPIO Tasks and Events (GPIOTE). Using PPI channels you can configure the Timer/Counter to count positive and/or negative edges on a GPIO. That way everything works autonomously and you don't have to use interrupts and processing power on each PWM period. Instead you can configure the timer to trigger an interrupt every 100 pulses for example.

Reply
  • If I were you I would look into using Timer/Counters, PPI channels, and GPIO Tasks and Events (GPIOTE). Using PPI channels you can configure the Timer/Counter to count positive and/or negative edges on a GPIO. That way everything works autonomously and you don't have to use interrupts and processing power on each PWM period. Instead you can configure the timer to trigger an interrupt every 100 pulses for example.

Children
No Data
Related