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

Polling-Response Signal on One Wire

I am trying to capture a signal that transmits upon receiving a polling signal along the same wire. 

I have frequented this example but still not having any luck (LED toggles as expected but no log information is showing up). How might I update this example on an nRF52840 for SDK 16?

Also, I am quite inexperienced with how to setup the timers and ppi channels for my specific needs. If someone could offer an approach on capturing these data after sending the polling signal, that would be very much appreciated. Right now the poll signal is generated externally at 2MHz, but end goal is to only use the nRF52840. 

Parents
  • Hi,

    I ported the example to SDK 16.0.0 for you: gpiote_pulse_width_sdk1600.zip

    If your goal is to capture the pulse widths of a 2 MHz input signal, I'm not sure you will be able to achieve this, at least not if the chip will do other things simultaneously (BLE, etc). There is no other way to read the timer counter registers than through a CPU interrupt. If these happens at an interval of 2 MHz, the CPU (running at 64 MHz) will have only 32 cycles to handle each interrupt. If the CPU is not able to read out the capture register during this time, a new pulse may arrive, clearing the timer and giving you incorrect readings.

    Best regards,
    Jørgen

Reply
  • Hi,

    I ported the example to SDK 16.0.0 for you: gpiote_pulse_width_sdk1600.zip

    If your goal is to capture the pulse widths of a 2 MHz input signal, I'm not sure you will be able to achieve this, at least not if the chip will do other things simultaneously (BLE, etc). There is no other way to read the timer counter registers than through a CPU interrupt. If these happens at an interval of 2 MHz, the CPU (running at 64 MHz) will have only 32 cycles to handle each interrupt. If the CPU is not able to read out the capture register during this time, a new pulse may arrive, clearing the timer and giving you incorrect readings.

    Best regards,
    Jørgen

Children
Related