S32K344 emios pwm measurement: active time equals period time

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K344 emios pwm measurement: active time equals period time

ソリューションへジャンプ
645件の閲覧回数
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 解決策
633件の閲覧回数
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 返信
634件の閲覧回数
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 件の賞賛
返信