S32K344 MCAL IPWM ICU CAPTURE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K344 MCAL IPWM ICU CAPTURE

Jump to solution
1,399 Views
JAY_SUN1
Contributor II

Hi NXP team,

We would like to develope EMIOS ICU on S32K344 EVM with NXP MCAL. But we didn't find the example code for IPWM. Could you provide to us for reference? Thanks.

Wade

 

0 Kudos
1 Solution
1,370 Views
nxf78987
NXP Employee
NXP Employee

Hi JAY_SUN1,

When you call "Icu_GetDutyCycleValues", there is no value because you are using the "EMIOS1_1_IRQn_customized" (your interrupt function) instead of "EMIOS1_1_IRQ" of the driver.

In the driver, The EMIOS1_1_IRQ function will call to Emios_Icu_Ip_IrqHandler(1, 16); to update values to variables available in the driver, and when you call Icu_GetDutyCycleValues(),  you can get results in this situation.

So that when you use EMIOS1_1_IRQn_customized, to call Icu_GetDutyCycleValues() and get results successfully, you must work as image below:

nxf78987_0-1666751171404.png

Best regards,

Dan

View solution in original post

0 Kudos
5 Replies
1,355 Views
nxf78987
NXP Employee
NXP Employee

Hi JAY_SUN1,

This is an example code for IPWM.

To run this example, you need to connect PTA29 with PTD15(IcuChannel_2).

Best regards,

Dan

0 Kudos
1,378 Views
JAY_SUN1
Contributor II

Hi NXP team,

We are still wating for your reply!

Attached is my project, it can enter in ISR, but when I call "Icu_GetDutyCycleValues", there is no value. Please help to check it and let us know the solution. Thanks.

Please note that I use Emiso 1 CH12(PTA29) to produce PWM(period 1K / Duty 25%), and use Emiso 1 CH16(PTG0) to receive PWM signal.  

Wade

0 Kudos
1,371 Views
nxf78987
NXP Employee
NXP Employee

Hi JAY_SUN1,

When you call "Icu_GetDutyCycleValues", there is no value because you are using the "EMIOS1_1_IRQn_customized" (your interrupt function) instead of "EMIOS1_1_IRQ" of the driver.

In the driver, The EMIOS1_1_IRQ function will call to Emios_Icu_Ip_IrqHandler(1, 16); to update values to variables available in the driver, and when you call Icu_GetDutyCycleValues(),  you can get results in this situation.

So that when you use EMIOS1_1_IRQn_customized, to call Icu_GetDutyCycleValues() and get results successfully, you must work as image below:

nxf78987_0-1666751171404.png

Best regards,

Dan

0 Kudos
1,351 Views
JAY_SUN1
Contributor II

Hi Dan,

Thanks for your reply and it can work now.

Wade

188 Views
James123
Contributor II
hello in the icu get dutycycle function it is not getting any values do we need partition on icu can you also send some sample code of it working
0 Kudos