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:
What I want:
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
Hello! Thank you for your work and your example
This almost exactly what I need!
It misses the part where you can change the PDB delay time from the code.
Do you have any example to do it pls?
Hi@Anthony_PAT_EFI
I did not find any API to adjust PDB Delay in the API provided by MCAL.
The PDB Delay setting is determined when the ADC is initialized.
If you need to modify the PDB configuration, I think it may be easier to use bare metal code.
Ok thank you, I'll deal with this
Hello !
Unfortunatly, this project has been done for S32k116! I'm using a S32K144 which doesn't have the MCAL named PDB (or something like this) so I can't use the project you gave me
In the SDK, there is the Low Level driver PDB but I'd like to use only High Level Driver.
Do you have the same example but for the S32K144? Pls
Hi@Anthony_PAT_EFI
I guess you are using the RTD driver of S32K1,right? Your previous reply was a bit confusing for me, because S32K1 provides two SDKs: RTM and RTD
This pacakge made base on RTD1.0.1 and with S32K148 used, you can refer to it.
https://community.nxp.com/t5/S32K/S32K148-RTD-Example-Use-cases-Projects/m-p/1633067#M22078
After you download this package, you may find below demos and you can refer to hightlight demo.
Hello!
Thank you for your answer.
Thank you also for the package you gave me it can be really helpful for the following project. However, in the example you highlighted, we indeed use everything I asked except the part where we can change dynamically the PDB timings.
Do you have any other example about this? Or maybe make one?
I could see on the web that I'm not the only one asking for this so it can help more than one
Thank you