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
=============================================================================
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);
BestRegards
Qiu
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
Hello,
Sorry for jumping in.
With IcuSignalMeasureWithoutInterrupt setting, we need to invoke Icu_GetPulseWidth twice for SAIC and IPWM mode, right?
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.