Hello to all NXP community,
I am currently working with the ADC reading on the S32k358 to achieve the closed loop current control on the contactor driver. However, I was unable to retrieve any readings from the ADC port.
The ADC port that I am using is the PTE_21 and PTE_2. I have enabled the interrupt in Platform section, defined AdcHwUnit, AdcHwTrigger, and BctuHwUnit. The clock in the MCU section is also enabled. I tried to stick to the configuration pattern in the example for S32k396 (ADC CTU S32k396). However, the interrupt callback is not triggered once and there is no ADC value. I tried the same way with the single read example, still nothing working.
Considering that there is not error when compiling, I am assuming this is is a software issue, but i could not tell where was wrong or missing. The matlab code snippet is attatched in the screenshot. I have also included the configuration file if that helps.
Thank you for your patience.
Sincerely
Primo
Thank you so much @primo ,
I would like to know whether you used dma or interrupt, and also how did you decide adc group hardware trigger source, is there any other way than CTU function, i would like to know whether you made with work without CTU function.
Basically, I have to read analog values in my s32 board. "So can you please attach an example or mex file" which would be helpful for me
Thank you in advance
Kalcorpse
Hi @primo
Could you let me know if this issue has been solved?
Hello, I did manage to solve it. It turns out that you will need to manually initialize some ports in the "configure board initialization" config. You can see the screenshot for my configurations.