Hi NXP Team,
I'm trying to learn PWM on S32K358EVB-Q289.
I'm folllowing this guide https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/Controlling-LED-intensity-with-ADC-and-PWM...
I reconfigured all the pins in order to match my hardware.
When i flash the model on the board the RGBLED RED turns on but when i move the potentiometer the brightness doesn't change.
As i'm using MBDT i configured Freemaster over uart, setting an oscilloscope and i could see that the values of the adc chage over time when i rotate the potentiometer.
How could i fix this? I repeatedly checked the steps of the guide and i'm pretty sure i've correctly implemented.
Thanks
Simon
Solved! Go to Solution.
Hi @FlorinCiuca
As you can see in the project i was not using the REDLED0 but the REDLED1 that is routed to emios2_ch21_y as you can see in the attached screen.
The problem i found was teh frequency too high that couldn't ever have shown me the blinking of the led.... So i modified the Dafault Period of the EMIOS bus and then worked fine
Hello @simon98,
Thank you for your interest in Model-Based Design Toolbox for S32K3!
I analyzed the attached project and I can say that most of the ADC configuration options are performed correctly, the only exception being the Last Mile Regulator which is still enabled (please re-visit Step 2.4 from the linked article). However, when looking in the schematics of the S32K358-Q289 EVB, it can be observed than neither of the RGB LEDs can be routed as eMIOS channels:
Unfortunately, this means that the dimming effect desired cannot be achieved and the configurations performed for eMIOS in the attached project have no effect.
If you want to further explore the ADC and PWM capabilities of the board, I suggest using different pins that fully support them.
I hope this explanation clarifies the current issues you have, and, if further issues occur please don't hesitate to contact us again.
Best regards,
Florin!
Hi @FlorinCiuca
As you can see in the project i was not using the REDLED0 but the REDLED1 that is routed to emios2_ch21_y as you can see in the attached screen.
The problem i found was teh frequency too high that couldn't ever have shown me the blinking of the led.... So i modified the Dafault Period of the EMIOS bus and then worked fine