Hi All,
I have modified the example project - Emios_Icu_Ip_BlinkLed_S32K344 for period measurement. I have configured an emios input pin and connected function generator output to it. Then, tried reading period by using Emios_Icu_Ip_GetTimeElapsed api. But period is always read as 0. I have also tried generating PWM output on one pin and connecting it to the emios input pin instead of using the function generator. In that case also, period is read as 0. Could you please help on this?
Hi @AManikandan
Could you please share your configurations and the RTD version you are working with? In the meantime, I suggest you better use the Emios_Icu_Ip_GetDutyCycleValues() function which provides the Active Time and Period Time of a PWM signal.
B.R.
VaneB
Hi @AManikandan
If possible, please share your configurations.
Hi @dpc
You configured the IcuSignalMeasurementProperty as ICU_PERIOD_TIME and IcuSubModeforMeasurement as SAIC; however, the User Manual for S32K3 ICU Driver states that IcuSubModeforMeasurement will be enabled in configuration only when IcuSignalMeasurementProperty is ICU_DUTY_CYCLE.
Hi VaneB,
Where can I get these documents? I can't find them
- Integration Manual for S32K3 ICU Driver (RTD_ICU_IM.pdf)
- User Manual for S32K3 ICU Driver (RTD_ICU_UM.pdf)
(referenced in post https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/SIUL2-external-interrupt-example-proje...
I have tried changing to duty cycle and the result is still reading value 0.
Debugging in Emios_Icu_Ip_GetDutyCycleValues() function
instance=1 (emios_1)
hwChannel=20
I have found that the measurement value that it reads is EMIOS_ICU_NO_MEASUREMENT when it is defined as EMIOS_ICU_DUTY_CYCLE.
I'm thinking about removing the pwm I generate with channel 23 and trying just the input capture mode (ch20), in case they interfere somewhere
Hi @dpc
The Integration Manual and the User Manual can be found for example at C:\NXP\S32DS.3.5\S32DS\software\PlatformSDK_S32K3\RTD\Icu_TS_T40D34M40I0R0\doc (S32DS path) or C:\NXP\SW32K3_RTD_R21-11_3.0.0_P07\eclipse\plugins\Icu_TS_T40D34M30I0R0\doc.
thanks a lot VaneB!