S32K344 emios pwm measurement: active time equals period time

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

S32K344 emios pwm measurement: active time equals period time

跳至解决方案
601 次查看
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. 

标记 (1)
0 项奖励
回复
1 解答
589 次查看
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 项奖励
回复
1 回复
590 次查看
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 项奖励
回复