MCAL-ICU-PWM-TAS using polling/dma ( checked IcuSignalMeasureWithoutInterrupt )

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

MCAL-ICU-PWM-TAS using polling/dma ( checked IcuSignalMeasureWithoutInterrupt )

1,157件の閲覧回数
YanyiQiu
Contributor III

hello

AUTOSAR  4.4 V2.0.1 RTD ,S32K344 , EB

when capture pwm (period and duty ) signal using interrupt in ICU module , it is ok .  the period and duty data are correct .  In this case, the configuration item "IcuSignalMeasureWithoutInterrupt" is dsiabled, like the following picture

YanyiQiu_0-1692007439283.png

=============================================================================

it is large resource consumption when using interrupt , so i try to enable the configuration item "IcuSignalMeasureWithoutInterrupt" ,  but the captured pwm (period and duty ) signal are abnormal , the data is jumping .

The question are:

1. when using polling in ICU , it must use/configure DMA meanwhile?

2. for capturing the pwm correctly, the following usage is all right ?

    a, interrupt ( "IcuSignalMeasureWithoutInterrupt" is disabled)

    b, polling only ("IcuSignalMeasureWithoutInterrupt" is enabled), It isn't necessary to configure DMA

    c, polling ( "IcuSignalMeasureWithoutInterrupt" is enabled ) and DMA

 

may you share some demo about ICU (capture the pwm using polling only, polling and DMA )

 

following codes are used in test :

initial::::Mcl_SetDmaChannelCommand(0, MCL_DMA_CH_ACK_ERROR);Icu_Init(&Icu_Config_VS_0); Icu_StartSignalMeasurement(IcuChannel_0); 

period calling : Icu_GetPulseWidth(IcuChannel_0); 

YanyiQiu_1-1692009731145.png

YanyiQiu_2-1692009738915.png

 

 

BestRegards

Qiu

0 件の賞賛
返信
3 返答(返信)

1,007件の閲覧回数
cuongnguyenphu
NXP Employee
NXP Employee

Hi,
1. If you use Icu in polling mode, you can select to use either Dma or non-Dma

2. These 3 way are correct

 

0 件の賞賛
返信

950件の閲覧回数
MyLV
Contributor I

Hello, 

Sorry for jumping in.

With IcuSignalMeasureWithoutInterrupt setting, we need to invoke Icu_GetPulseWidth twice for SAIC and IPWM mode, right?

 

 

0 件の賞賛
返信

840件の閲覧回数
cuongnguyenphu
NXP Employee
NXP Employee

As description of this function, this function returns the signals High time, Low time and Period without using the channel interrupt.
The Emios can be set to IPWM or SAIC mode one at a time.
So based on the current mode of Emios, this function will update pulseWitdth corresponds.