Please or Register to create posts and topics.

S32k312 board

Good Afternoon,

I am currently working on a PWM operation with the s32k312 evaluation board.  The one potential error that I am continuously facing is the issue of duty cycle value that cannot be changed with the Simulink variables. This problem arises when I configure the PWM block parameter to set_duty-cycle and period (as in the first image). when I change the value of the period, it gets reflected in the target, however when change the value of the duty cycle. the duty cycle value does not get reflected in the target. I did an inspection with the c code that was generated from the model. The code seems to have the updated value and somewhere or the other, particularly, the duty cycle value seems to have the value that has been set in the tool (mcl section component under peripherals).

Set_dutycycle and period pwm config block with c codeSet_dutycycle and period pwm config block with c code
The duty cycle value only seems to change when I change it in the tools section as mentioned earlier  below image is available for reference.

paul_ephraim_13_1-1728541478471.png

 

This issue is completely eradicated when the set the PWM block to only "set_duty-cycle" (as in the image below)

paul_ephraim_13_0-1728541394311.png

Kindly clarify the issue.  suggest some outline configuration details for the duty cycle value to be updated under any pwm block.

 

Stay Updated With Us

Error: Contact form not found.