S32K344 MCAL IPWM ICU CAPTURE

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

S32K344 MCAL IPWM ICU CAPTURE

ソリューションへジャンプ
1,595件の閲覧回数
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 件の賞賛
1 解決策
1,566件の閲覧回数
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 件の賞賛
5 返答(返信)
1,551件の閲覧回数
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 件の賞賛
1,574件の閲覧回数
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 件の賞賛
1,567件の閲覧回数
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 件の賞賛
1,547件の閲覧回数
JAY_SUN1
Contributor II

Hi Dan,

Thanks for your reply and it can work now.

Wade

384件の閲覧回数
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 件の賞賛