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.
解決済! 解決策の投稿を見る。
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.
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.