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

Re: Interfacing SPI ADC with nRF52840 SPIM

Would like to interface a SPI ADC – MCP3461 via the nRF52840 serial peripheral interface master with EasyDMA (SPIM). I was not able to find whether or not there is an available external trigger for the data acquisition, that can be driven via the ADC data ready pin. Would you be able to recommend optimal way to do sequential readings from the ADC ?

  • Hello,

    I was not able to find whether or not there is an available external trigger for the data acquisition, that can be driven via the ADC data ready pin.

    You could do this by using the PPI peripheral to connect a GPIOTE in event to the SPIM TASKS_START task, to have the external interrupt trigger a transaction start on the SPIM.
    The PPI peripheral's fundamentals are demonstrated in the SAADC example, where a TIMER CC Event is connected to a TASKS_SAMPLE sampling task in the SAADC. Whenever the TIMER CC event is generated, the TASKS_SAMPLE is started in the SAADC.
    The dedicated PPI example goes a little further, and demonstrates using multiple PPI channels.

    Best regards,
    Karl

Related