PWM Duty Cycle Doesn't Change When Rotating the Potentiometer on EVB

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

PWM Duty Cycle Doesn't Change When Rotating the Potentiometer on EVB

跳至解决方案
635 次查看
simon98
Contributor III

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

标记 (5)
0 项奖励
回复
1 解答
598 次查看
simon98
Contributor III

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

在原帖中查看解决方案

0 项奖励
回复
2 回复数
606 次查看
FlorinCiuca
NXP Employee
NXP Employee

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:

FlorinCiuca_0-1728337666038.png

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!

0 项奖励
回复
599 次查看
simon98
Contributor III

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

0 项奖励
回复