Hello everyone,
I come here because after a lot of tries, I cannot successfully trigger the sampling of the ADC with the PDB using the MCALs drivers.
What I have:
- I'm using an S32K144 demoboard
- I program it with S32DS using the SDK for easier configuration of the driver
What I want:
- Let's say I want to sample 3 channels with the ADC0 at 10kHz
- I would like to trigger the samples with the PDB, but each channel is triggered with its specific timing
For exemple, if the PDB counter goes from 0 to 8000 ; I would like the ADC0CH0 to be triggered when the counter value is 2000, ADC0CH1 at 4000 and ADC0CH2 at 6000.
The idea is then to program those timings dynamically so that we can change the moment when the samples are done.
Could you help me setting up all of this? For now, after my tries, I could trigger the ADC using the GPT MCAL with the LPIT0 timer but all the samples are done at the same time, I cannot add a delay between them.
I saw this topic in the forum: https://community.nxp.com/t5/S32K/How-to-config-PDB-in-S32K144-using-MCAL/m-p/1722130
But I can't open the project since it seems it hasn't been done with S32DS, or at least not with the config tool I'm using (I need a .mex file in the project)
Thank you for your time