AnsweredAssumed Answered

S32K118 how to read all 16 ADC channels

Question asked by Jani Reunanen on Mar 12, 2020
Latest reply on Mar 16, 2020 by Jani Reunanen



I am creating a software for S32K118 (S32 Design Studio 2018.R1 in Windows 10) and one part of it requires reading ADC inputs.
Seems that S32K118 has only one ADC unit (ADC0) and one PDB unit (PDB0), this ok.
But the problem is how to actually read all those 16 ADC.


I have tried to using the ADC PDB back-to-back mode.
So when ADC0-ch0 is first SW triggered and its measurement is completed, it will trigger ADC0-ch1 and so on up to ADC0-ch7.
How do I now continue reading the rest, ADC0-ch8 to ADC0-ch15?


I been reading "S32K1xx Series Reference Manual S32K1XXRM, Rev 11. 06/2019", but it's not quite clear how to do this.
Not sure is it even possible to link all this 16 together, or is it only possible to link 2 different loops of 8 channels.


Preferred way for me would be
1) SW trigger the loop
2) when loop of 16 channels have finished measurement, then ADC_IRQ is triggered
3) read all 16 channels result inside the ADC_IRQ
4) re-trigger this full 16 channel again (with some function in coder or automatically as in "continuous mode", both ways are ok)


Attachment pdb-01: this loop looks good (S32K1xx Manual, page 1166), but there are PDB0 and PDB1, and S32K118 seem to have only PDB0?
Attachment pdb-02, 03, 04: PDB configuration