磊 殷

If I want to use 8-channel SDADC, in addition to modifying these parameters, but also need to pay attention to what aspects

Discussion created by 磊 殷 on Oct 16, 2017
Latest reply on Oct 24, 2017 by Peter Vlna

MCU  is MPC5775K

void sdadc_init( void )
{
/* OSR is set in SDPLL_INIT() in MCU_INIT.c */
// Enable ADC Channels,
//enable ADC7,Reference Manual p210.
AFE.ADCCTRL1.R =0x31;
// Enable ADC4-ADC7 (RX1-RX4)
AFE.ADCCTRL7.B.PWRDN = 0x0F;        //     --->0xFF   
SPT.ACQ_GBL_CTRL_0.R = 0x55000000;      //      --->0x55550000

//SDMA Setup
SPT.SDMA_CTRL0.R = ADC_START_MEM;
SPT.SDMA_CTRL1.B.SDMA_BUF_LEN = 128; /* Write 128 chirps */
SPT.SDMA_CTRL1.B.DATA_ORG_CFG = 0x1; /* Tile4 Memory organization*/         //       --->2
SPT.ACQ_GBL_CTRL_1.B.NUM_CHRP = NUM_CHIRPS; /* Number of chirps in frame */
SPT.ACQ_GBL_CTRL_1.B.NUM_SMPL = NUM_SAMPLES; /* Number of samples in a chirp, given by (NUM+1)*8 */
}

Outcomes