This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PPI Timer2 weird behavior on Bluetooth connect

Hello!

We're using PPI to connect one pin to clear and capture events on Timer2. On pin low-to-high we're clearing the timer and on pin high-to-low, we're capturing the timer. We have S110 enables and inited on PCA10001 board.

The application works great until we connect the PCA10001 to the PCA10000 (via master control panel) at which moment the values from the timer become erratic and random. It stays the same after Bluetooth disconnect.

Parents
  • Hmm this seems similar to your last question.

    How are you using one pin to do two different tasks? You can only have one GPIOTE channel per physical pin (according to the documentation). If you're reconfiguring the GPIOTE and PPI mapping after the CLEAR event happens, you may be running into the same interrupt latency you found with the last question.

    That's why I suggested in my last answer that you use two pins, just connected to the same source input, the pulse output from your distance measuring device. Then you can set up both GPIOTEs and both PPIs before you start and it should work.

Reply
  • Hmm this seems similar to your last question.

    How are you using one pin to do two different tasks? You can only have one GPIOTE channel per physical pin (according to the documentation). If you're reconfiguring the GPIOTE and PPI mapping after the CLEAR event happens, you may be running into the same interrupt latency you found with the last question.

    That's why I suggested in my last answer that you use two pins, just connected to the same source input, the pulse output from your distance measuring device. Then you can set up both GPIOTEs and both PPIs before you start and it should work.

Children
No Data
Related