Pwm_delay_in_trigger_pulse

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pwm_delay_in_trigger_pulse

Jump to solution
11,382 Views
Vijay98
Contributor II

Hello NXP team,

Currently we are generating the pwm pulse for two channels.

and with pwm channel 1 pulse, we are triggering the pwm channel 2 pulse with edge triggering.

Esakki_0-1726550630893.jpeg

but with triggering, there is some delay in Pwm channel 2 pulse and that delay is not constant it is getting varying from one pulse to another pulse.

Photo - 1: 820uS delay for pwm 2.

Esakki_4-1726551336086.png

Photo - 2: no delay for pwm 2.

Esakki_5-1726551406656.png

Photo - 3: 520uS delay for pwm 2.

Esakki_6-1726551459604.png

we don't know how to reduce this delay, and it is not constant delay.

We have attached the configuration settings for this pwm pulse below,

Emios_0 - Channel_0 for pwm2 pulse

Esakki_7-1726551591729.png

Esakki_9-1726551786268.png

 

Emios_1 - Channel_0 for pwm1 pulse

Esakki_8-1726551759125.png

Esakki_10-1726551802652.png

 

Mcl_configuration for Pwm2 pulse

Esakki_11-1726551854311.png

Kindly help us to resolve this issue related to pwm delay.

Thanks, and regards,

Esakki.P

 

@Irina_Costachescu @dragostoma 

@DrKarthi 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
Reply
1 Solution
9,498 Views
stefanvlad
NXP Employee
NXP Employee

Hi @Vijay98 ,

 

I'm not sure what do you mean having an issue on PTC10, since on this thread  Re: Pwm_delay_in_trigger_pulse - NXP Community, the solution works well and tested on logic analyzer.

Can you provide pictures of the model that you modified based on the steps i provided in the thread above, instead of reposting my screenshots.

 

Once again to use another pin to output the signal from PTA3 to PTC10 there are only two options, one is presented above by using PTC10 as emios_0_ch6 and the other solution is to use PTC10 as lcu1_out11:

stefanvlad_0-1733937742783.png

Then you need to route the signal from PTA3 (lcu0_out2) to PTC10 (lcu1_out11) using TRGMUX:

stefanvlad_1-1733937895546.png

Then we need to update the LCU configuration for the new input:

stefanvlad_2-1733937955577.png

And then we update the LCU output config:

stefanvlad_3-1733938011056.png

Also PTC10 pin needs to be added into the Port peripheral:

stefanvlad_4-1733938099707.png

and the last step is to update the model with the new LCU output:

stefanvlad_5-1733938321744.png

After this, clean up the local Matlab folder, delete the .slxc file, and the folders 32k312_pwm_lcu_mod_carrier_s32ct_ert_rtw, and slprj:

stefanvlad_6-1733939601313.png

Then rebuild and flash the project on the S32K312 board, and check the pins with logic analyzer:

stefanvlad_7-1733939679624.png

And to summarize the complete application, how all the peripherals are connected, I have created this diagram:

s32k312_pwm_lcu_mod_carrier_s32ct.png

 

This are all the steps needed, please read them carefully and replicate them on your model,

Best regards,

Stefan V.

View solution in original post

21 Replies
1,728 Views
DrKarthi
Contributor II

@stefanvlad 

kindly update the solution for above issue.

or it will be helpful if we discuss in a teams call.

Tags (1)
0 Kudos
Reply