Hi,
I am new to the S32K Environment. I have bought an S32K116 Evaluation Board on which i am trying to sample 6 ADC Channels at a sample rate of 20ksps. In the end i'd like to pass thoose raw values to another microcontroller via UART, but i am currently stuck at setting the sample rate.
I have enabled the first 6 PDB0 channels (conversions are triggered back to back) and ADC0 channels. The PDB is triggered by Software and supposed to run in continuous mode and trigger the adc conversion every 50us. I calculated the conversion time to be around 1us per channel(~6us). The ADC Clock and PDB Clock are both 48MHz.
Somehow my timing is not right. I do get a PDB Channel Sequence Error. If i change the PDB->MOD to a higher value the error disappears and conversion works. Why cant I trigger the Conversion every 50us?
Also I am quite confused with all of the pre trigger stuff. Do I need to change some of the Delays?
I have attached my code below. Thanks in advance for your help.
Max