dear NXP experts:
I met a problem while using eMIOS for ICU.
the MCU I am now taking use is S 32K312 and I take use of eMIOS_1 for both PWM output and ICU capture. the detail information is that I take use of eMIOS_1 channel0 as BUS B for PWM output and take use of eMIOS_1 channel22 as BUS F for ICU.
the pin for PWM output is PTE21 and it is related with eMIOS_1 channel 1,so I think eMIOS_1 channel 0 can provide BUS B for PTE21 for the PWM output.
the pin for ICU capture is PTC7 and it is related with eMIOS_1 channel 7, so I think eMIOS_1 channel22 can provide BUS F for the ICU capture.
now I set a clock divider as 20 for eMIOS_1 and I think the clock for eMISO_1 is 6M . I also set the PWM period value as 6000 so the actual period time is 1ms and I get the actual PWM period in oscilloscope。
But the ICU value is not expected . by analysis :BUS F provide a base for ICU and the BUS F is 6M, SAIC mode in ICU should also get 6000 tick by calling "
Hi,
Thank you so much for your interest in our products and for using our community.
Could you please share your project (working on the S32K312EVB-Q172) so I can test such issue from my side?
Please specify which versions of S32DS and RTD and refer to RTD example projects for PWM and ICU with eMIOS.
Have a nice day!
hi _Leo_
I take use of "S32K3xx_SBC_FS23_R21-11_1.0.0" and "SW32K3_S32M27x_RTD_R21-11_4.0.0_P04" for EB config and the attached file is EB pjt.
if the whole project is necessary , pls let me know.
thx a lot.
Due to limited resources, we are currently unable to review your configuration. Sorry for the inconvenient.
If more extensive support is required, please contact field application engineer assigned to you - either NPX FAE and distribution FAE. If don’t have such contact yet, please contact our local distributor:
https://www.nxp.com/support/sample-and-buy/distributor-network:DISTRIBUTORS
On the other hand, and regarding your main question "one eMIOS instance cannot be used for both PWM and ICU if BUS is used?".
It is possible to perform PWM and ICU with the same eMIOS instance. Please refer to AN13767 (4.2.3. Center-aligned PWM and 4.2.5. Quadrature decoder sections) and its respective SW in MCSPTE1AK344.
Hope it help you.
Have a nice day!