Description: I’m working on an nRF52 project where I need the SAADC to sample at a specified interval (5000 ms in this example) using a timer and PPI to trigger sampling. However, I’m observing that the sampling does not follow the timer’s rate, the initial trigger works as expected, but subsequent samples do not follow the timer rate, even though I set the sampling rate as 5000ms the samples are continuously being printed. I suspect the issue may lie with the PPI setup between the SAADC END
and START
events, but I haven’t been able to pinpoint the exact cause.
Setup:
-
Timer Configuration: Set up with
nrfx_timer_extended_compare
to trigger every 5000ms( example) -
PPI Channels: Configured two PPI channels:
m_saadc_sample_ppi_channel
connects the timer compare event to theNRF_SAADC_TASK_SAMPLE
.m_saadc_start_ppi_channel
connects the SAADCEND
event to the SAADCSTART
task, as shown in this example by nordic - ncs-inter/lesson6/inter_less6_exer3_solution at main · NordicDeveloperAcademy/ncs-inter · GitHub- .
-
Issue: The SAADC samples does not follow the 5000 ms interval set by the timer.
The code:-
The prj.conf:-
Project Details:
DK- nrf52832
SDK - nrf connect sdk for vs code (v2.5.2) on ubuntu