Hi
We would like to obtain the ADC value with a sampling rate of 256 Hz.
Regarding the method #1, we use the RTC tick interval to set the Sensor Control task tick interval. When Sensor Control collects the 256 ADC samples, it will notify the main application, in the main application, we check the notification time, it always keep 1 Second.
//Main application uint32_t rtc_Hz = 256; // 256Hz RTC scifStartRtcTicksNow(0x00010000 / rtc_Hz);
Regarding the method #2, we use the timer0 to trigger ADC.
//Sensor Control adcEnableSync(ADC_REF_FIXED, ADC_SAMPLE_TIME_2P7_US, ADC_TRIGGER_AUX_TIMER0); // Generate timer events at every 3906.25 us(1/256) timer0Start(TIMER0_MODE_PERIODICAL, 46875, 1);
When Sensor Control collects the 256 ADC samples, it will notify the main application, in the main application, we check the notification time, it always keep 998 mS.
Regarding Sensor Control timer, how to get the accurate time? do you have any suggestions to us???
Thanks.
BR
Trevor