3.3.4.9 EMAFE_GetDataChannel Function

C

uint32_t EMAFE_GetDataChannel(EMAFE_CHANNEL_ID channel);

Summary

Get the last sample of the corresponding low-pass filter. Only supported if DMA is not enabled in EMAFE component in MCC configuration.

Description

Get the last sample of the corresponding low-pass filter.

Precondition

Low-pass filter must be enabled and DMA must be disabled.

Parameters

ParamDescription
channelChannel index to get the data sample.

Returns

The 24-bit value of the data sample.

Example


/* Read data value from channel 2 (V1) */
uint32_t value = EMAFE_GetDataChannel(EMAFE_CHN_2_ID);

Remarks

Table 3-10. Channel identifiers
ChannelSignalChannel Identifier
Channel 0Temperature SensorEMAFE_CHN_0_ID
Channel 1I1EMAFE_CHN_1_ID
Channel 2V1EMAFE_CHN_2_ID
Channel 3I2EMAFE_CHN_3_ID
Channel 4V2EMAFE_CHN_4_ID