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
| Param | Description |
|---|---|
| channel | Channel 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
| Channel | Signal | Channel Identifier |
|---|---|---|
| Channel 0 | Temperature Sensor | EMAFE_CHN_0_ID |
| Channel 1 | I1 | EMAFE_CHN_1_ID |
| Channel 2 | V1 | EMAFE_CHN_2_ID |
| Channel 3 | I2 | EMAFE_CHN_3_ID |
| Channel 4 | V2 | EMAFE_CHN_4_ID |
