Hello NXP Team,
Thank you for your invaluable support and assistance. We truly appreciate your efforts and dedication in helping us achieve our goals.
Currently, we are facing one issue with integration of ADC peripherals with PWM configuration.
1. First with the help of Solved: Pwm_delay_in_trigger_pulse - NXP Community this post we can be able to generate PWM pulse using LCU logic.
But, in that model we are trying to integrate ADC peripherals.
while integrating the ADC peripherals, we are seeing that one ADC channel is working but other channels are not working in that particular model with PWM.
ADC0GROUP0 is used for channel 0 for getting the ADC counts value from pin PTE15
ADC0GROUP1 is used for channel 1 for getting the ADC counts value from pin PTE10
And the result is;
We can't able to see the output in Cnts 2 (PTE10).
We set the same configuration for both the channels 1 & 2.
We cannot be able to find the error in this.
We tried with other pins also; we are getting the same error.
Kindly help us with this.
I have attached the model with this post.
Thanks & Regards,
Vijay
Hello @Vijay98 ,
Thank you for your appreciation, and a Happy New Year!
Regarding your attached project, i have tried to build and run on my S32K312EVB but it goes to a Hard Fault:
It seems to be a problem with the FreeMASTER over CAN.
Can you send me the latest working project ?
To help with your ADC problem i will take a closer look into s32k3xx_adc_single_read_s32ct.mdl example:
Here you can open the two instances of S32 Configuration Tools from C:\MathWorks\Toolboxes\NXP_MBDToolbox_S32K3xx_150\tools\S32ConfigTools.2024.R1.7\tools.exe
Then you can compare the two configurations side by side:
I will recommend to use the settings from s32k3xx_adc_single_read_s32ct.mdl and modify them in your configuration.
Also i saw in your model , that you are not using Hardware Interrupts for the ADC reading functions:
So let me know how the ADC works after you test your model with the settings from s32k3xx_adc_single_read_s32ct.mdl,
And send your the latest working model, not the one that goes into Hard Fault.
Thank you,
Stefan V.
Hello @stefanvlad,
Sorry for the late reply,
I have tested the ADC example and integrated a new model. The new ADC integrated model (located in the Adc_integration folder) is functioning correctly without any issues.
However, in the 'S323K312_pwm_Icu_mod_carrier_s32ctmodel' file, we are encountering a problem,
We are unsure of the root cause of this issue and would appreciate any insights.
We have attached both the files with this post.
Kindly help us regarding this issue.
Thanks & Regards,
Vijay
Hi @Vijay98 ,
I have checked the models you have attached and i found the following:
Integration_sen_adc
s32k312_pwm_lcu_s32ct
The issues is in the schematic of the S32K312EVB-Q172:
We can see that both pins PTE16, PTE15 are connected to the FS26 chip, FCCU1 FCCU2 pins.
That means that we cannot use this pins as inputs for ADC, that is why in both cases we see the values are not good for both models:
My advice is to change the pins, and check the S32K312EVB-Q172 board schematic, to see if that ADC pin is free and not connected to anything else on the board.
Best regards,
Stefan V.
Hi @stefanvlad
Thanks for your reply.
But the problem not solved.
Like to brief for better clarity.
Board Used: custom S32k312 board, FS26 not used.
Problem: After integrating LCU, PWM only generating. ADC group only Group0 working, configure to Group1- not working.
Two model configured:
Integration_sen_adc-all works fine. (LCU was not configured model)
s32k312_pwm_lcu_s32ct_initialize: ADC group only Group0 working, if any pin configure to Group1- not working.(LCU Configured model).
Observation and doubt:
We seen BCTU configured in s32k312_pwm_lcu_s32ct_initialize model only for Emios. Not for ADC. is it problem?.
For two model we seen, model configuration setting are different, can you look it may be the problem. refer image.
Please suggest solution or will set a teams call for better understanding, this issue was open for long.
Thanks
Dr. Karthi
I have modified the ADC configuration for s32k312_pwm_lcu_s32ctConfig.mex and looking into the issue with ADC0Group1,
Updated the ADC0Group1 with all the settings as in the Integration_sen_adcConfig.mex, but for some reason there is no update in the Cnts_2 variable.
There is also the problem with the pin PTE15:
Because this is connected to FS26 chip on the S32K312EVB-Q172 board and is pulled low.
I am investigating further this problem and will let you know, when I have a solution,
Best regards,
Stefan V.
Hello @stefanvlad ,
Sorry for the late reply.
I have tested the ADC example and integrated a new ADC model. The new ADC integration model (located in the Adc_Integration folder) is functioning correctly without any issues.
However, in the s32k312_pwm_lcu_mod_carrier_s32ct model file, we are encountering a problem.
We are unsure of the root cause of this issue and would appreciate any insights
We have attached both the files with this post.
Kindly help us regarding this issue.
Thanks & Regards,
Vijay
Hello @stefanvlad,
Sorry for the late reply.
I have tested the ADC example and integrated a new ADC model. The new ADC integration model (located in the Adc_Integration folder) is functioning correctly without any issues.
However, in the s32k312_pwm_lcu_mod_carrier_s32ct model file, we are encountering a problem.
We are unsure of the root cause of this issue and would appreciate any insights.
We have attached both the files with this post.
Kindly help us regarding this issue.
Thanks & Regards,
Vijay
Hello @stefanvlad,
Sorry for the late response.
I have tested the ADC example and integrated a new ADC model. The new ADC integration model (located in the Adc_Integration folder) is functioning correctly without any issues.
However, in the s32k312_pwm_lcu_mod_carrier_s32ct model file, we are encountering a problem.
We are unsure of the root cause of this issue and would appreciate any insights.
I have attached both the files with this post.
Kindly help us on this issue ASAP.
Thanks & regards,
Vijay