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

Again about Single Edge Nibble Transmission (SENT) protocol realization

I didn't recieve answer to my second question in this topic, so I start new one.

Is there any way to get usec time measurement with softdevice?

I need to analyze SENT protocol. For example here on page 12 is nibble timing.

SoftDevice's timing critical processing is very big for this protocol. May be there can be any solutions with ppi?

Parents
  • Hi 

    The easiest way to do this would probably be to run a TIMER module at 1MHz, giving you a timing resolution of 1us. Then you could connect the input pin to the TIMER over PPI, and have a capture register in the timer updated every time there is a transition on the pin. 

    The problem with this method is that you need to read out the value of the capture register between each pin change, and if you are in the middle of a SoftDevice interrupt you will not be able to do it in time. 

    Another trick is to use the SAADC module to sample the pin continuously. The SAADC has a DMA controller that allows you to pipe data continuously to the RAM even during SoftDevice interrupts, and as such you don't have to worry about interrupts. 

    The drawback of this method is that it is quite complex, and will be quite power intensive while running. It will also require some processing to decode the ADC data after read out. 

    Best regards
    Torbjørn

Reply Children
Related