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

Continuous Cyclic SAADC on NRF52

Hello All,

I want to use SAADC with BLE working Mode. In my application, I will be using Image transfer Example for full blazing speed so I don't want to use any CPU resource during the ADC process. I want to send one buffer via ble while the other buffer is preparing. In SSADC documentation, it is stated that,  if only one channel is used, EasyDMA could automatically start processing using the second buffer if PPI is used to bind SAADC END events with the SAADC START task.

MY Questions is how can I bind the saadc end event with start task. for the start task I can get the address using nrf_drv_saadc_sample_task_get(); but how could I get the address of end event to bind it using PPI.

My 2nd question is if I do that is this would be a cyclic process. I mean after the 2nd buffer gets completed the saadc automatically shifts towards first buffer.

Thank you so much for your help in advance

best regards,

Parents
  • Hi,

    MY Questions is how can I bind the saadc end event with start task. for the start task I can get the address using nrf_drv_saadc_sample_task_get(); but how could I get the address of end event to bind it using PPI.

    The reason for the nrf_drv_saadc_sample_task_get() function is that it handles differences between the driver normal and low power mode (see implementation). For all other tasks and events, you should simply use the enum in nrf_saadc.h (for instance NRF_SAADC_EVENT_END).

    My 2nd question is if I do that is this would be a cyclic process. I mean after the 2nd buffer gets completed the saadc automatically shifts towards first buffer.

    There is no way to do this in a cyclic way. the SAADC peripheral hardware will write samples to memory using DMA for as many samples as configured. After that, you must use software to process the samples before you start a new sampling sequence.

Reply
  • Hi,

    MY Questions is how can I bind the saadc end event with start task. for the start task I can get the address using nrf_drv_saadc_sample_task_get(); but how could I get the address of end event to bind it using PPI.

    The reason for the nrf_drv_saadc_sample_task_get() function is that it handles differences between the driver normal and low power mode (see implementation). For all other tasks and events, you should simply use the enum in nrf_saadc.h (for instance NRF_SAADC_EVENT_END).

    My 2nd question is if I do that is this would be a cyclic process. I mean after the 2nd buffer gets completed the saadc automatically shifts towards first buffer.

    There is no way to do this in a cyclic way. the SAADC peripheral hardware will write samples to memory using DMA for as many samples as configured. After that, you must use software to process the samples before you start a new sampling sequence.

Children
Related