Hi Frank, Please find below for my reply for your Queries. Q1: only add Step 3 & ADC channel 2 Only Step 3 & ADC channel 2 Source Code Section: /* Initialize ADC configuration params */ adcConfig.mode = ADC_OPERATION_MODE_SINGLE_SHOT; // Refer this "hw_adc.h" file. If configure ADC ch 3 means, it actually configured ADC Channel 2.Since in system has ADC channel from '0' But in code ADC channel start from '1' adcConfig.channel = ADC_CHANNEL_3; adcConfig.openDelay = 0x1U; adcConfig.sampleDelay = 0U; adcConfig.rangeCheckEnable = 0U; adcConfig.averaging = ADC_AVERAGING_16_SAMPLES; adcConfig.fifoNum = ADC_FIFO_NUM_0; /* step 2 configuration */ configStatus = TSCADCSetStepParams(pCfgAdc->instAddr, ADC_STEP_4 , &adcConfig); //If mention ADC_STEP_4 then it actually refer step 3. Refer "hw_adc.h" file if (STW_SOK != configStatus) { UART_printf("Error in ADC step configuration.\n"); } Debug Log: >>> ADC Test Start... StarterWare ADC voltage measure application!! ADC Step configuration. Done!! ISR :[0] ISR RISED.... Success Number of samples in FIFO: 1 FIFO Data: Step ID: 3 Voltage Level: 2107mV Stop ADC Power Down ADC ADC Exit..!! Q2: only add Step 3, but with ADC channel 0 or 1 instead of channel 2? Only Step 3 & ADC channel 0 Source Code Section: /* Initialize ADC configuration params */ adcConfig.mode = ADC_OPERATION_MODE_SINGLE_SHOT; // Refer this "hw_adc.h" file. If configure ADC ch 1 means, it actually configured ADC Channel 0.Since in system has ADC channel from '0' But in code ADC channel start from '1' adcConfig.channel = ADC_CHANNEL_1; adcConfig.openDelay = 0x1U; adcConfig.sampleDelay = 0U; adcConfig.rangeCheckEnable = 0U; adcConfig.averaging = ADC_AVERAGING_16_SAMPLES; adcConfig.fifoNum = ADC_FIFO_NUM_0; /* step 2 configuration */ configStatus = TSCADCSetStepParams(pCfgAdc->instAddr, ADC_STEP_4 , &adcConfig); //If mention ADC_STEP_4 then it actually refer step 3. Refer "hw_adc.h" file if (STW_SOK != configStatus) { UART_printf("Error in ADC step configuration.\n"); } Debug Log: >>> ADC Test Start... StarterWare ADC voltage measure application!! ADC Step configuration. Done!! ISR :[0] ISR RISED.... Success Number of samples in FIFO: 1 FIFO Data: Step ID: 3 Voltage Level: 2070mV Stop ADC Power Down ADC ADC Exit..!! ADC Test End... Only Step 3 & ADC channel 1 Source Code Section: /* Initialize ADC configuration params */ adcConfig.mode = ADC_OPERATION_MODE_SINGLE_SHOT; // Refer this "hw_adc.h" file. If configure ADC ch 2 means, it actually configured ADC Channel 1.Since in system has ADC channel from '0' But in code ADC channel start from '1' adcConfig.channel = ADC_CHANNEL_2; adcConfig.openDelay = 0x1U; adcConfig.sampleDelay = 0U; adcConfig.rangeCheckEnable = 0U; adcConfig.averaging = ADC_AVERAGING_16_SAMPLES; adcConfig.fifoNum = ADC_FIFO_NUM_0; /* step 2 configuration */ configStatus = TSCADCSetStepParams(pCfgAdc->instAddr, ADC_STEP_4 , &adcConfig); //If mention ADC_STEP_4 then it actually refer step 3. Refer "hw_adc.h" file if (STW_SOK != configStatus) { UART_printf("Error in ADC step configuration.\n"); } Debug Log: >>> ADC Test Start... StarterWare ADC voltage measure application!! ADC Step configuration. Done!! ISR :[0] ISR RISED.... Success Number of samples in FIFO: 1 FIFO Data: Step ID: 3 Voltage Level: 2083mV Stop ADC Power Down ADC ADC Exit..!! Q3: For ADC channels beyond ADC0_AIN1, have you checked the settings for YPPSW, YPNSW, etc.? Need to configure the YPPSW, YPNSW registers in GP mode of ADC0?. I Thanks & Regards, Suresh
↧