I’m working on a design where ADC sampling is triggered through an eMIOS → BCTU → ADC chain. The BCTU receives triggers from eMIOS PWM channels configured in OPWMT mode to create precise timing offsets between trigger events.
Timing sequence:
Time (µs): 0 1.3 2.6 3.6 4.9 6.2 7.2
|----------|----------|----------|----------|----------|----------|----------|
eMIOS_0_CH1 ---> adc_ch1 (start at 0 µs)
---> adc_ch2 (after 1.3 µs)
eMIOS_0_CH2 (offset by 3.6 µs)
---> adc_ch1 (start at 3.6 µs)
---> adc_ch2 (after 1.3 µs → ~4.9 µs)
eMIOS_0_CH4 (offset by 7.2 µs)
---> software trigger for ADC0 self-testWhen I toggle a GPIO in the CH4 callback, it fires as expected. However, running the ADC self-test for a single ADC instance takes about 13 µs (measured in software).
Goal: Ensure periodic self-test on ADC0 without disturbing the real-time sampling of other ADCs.
I have attached my project so you can have a look.
s32k344
RTD_6.0.0
Thank you for your interest in our products and for contributing to our community.
According with 60.3.17.2 Self-test section: Individual steps can take up to 1 µs at 80 MHz ADC clock frequency.
Please find attached example. In practice, I cannot get less than 14us per instance.
For safety applications, it is important to verify correct operation at regular intervals. But also consider that the ADC Self-Test function should be called at any time after driver was initialized and there are no ongoing conversions.
When you suspend debug session, in Expressions tab you can observe results: g_fifo1Result, which corresponds to the BCTU list measurements, meanwhile g_fifo1Volts corresponds to the conversion in volts.
We hope this resolves your issue.
For more questions, please help me creating a new post.