S32K344 emios pwm measurement: active time equals period time

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

S32K344 emios pwm measurement: active time equals period time

Jump to solution
327 Views
lluo
Contributor III

Hi, 

I am currently trying to use the emios module to generate pwm signal and measure the duty cycle of the pwm respectively. During testing, I am using the following function to get the duty cycle:

Emios_Icu_Ip_GetDutyCycleValues(EMIOS1, EMIOS_ch1, &ic_result_temp);

The period of the generated pwm is set to be 1000, and the duty cycle is set to be 500 by using the followng functions:

Emios_Pwm_Ip_SetPeriod(EMIOS1, EMIOS_ch0, 1000);
Emios_Pwm_Ip_SetDutyCycle(EMIOS1, EMIOS_ch0, 500);

I found out that the measured duty cycle equals the measured period as shown in the screenshot. I verified the generated PWM by osciloscope and found out that the PWM was generated correctly. 

Do you probably know the reason for this?  

I am using S32DS 3.5 and I have attached the project for your reference. 

Tags (1)
0 Kudos
1 Solution
315 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@IIuo

you can take a look at the demo in the attachment, the demo build with older RTD version, but you can  still refer to it.

 

View solution in original post

0 Kudos
1 Reply
316 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@IIuo

you can take a look at the demo in the attachment, the demo build with older RTD version, but you can  still refer to it.

 

0 Kudos