Question
SPC560D40L1 - ADC does not finish sampling
Posted on April 03, 2014 at 12:21
Hi,
I'm trying to setup an analog conversion on SPC560D40L1. I activated the ADC in HAL configuration, defined a adc-conversion-group that consists of channel 0 (ADC1_P[0] on Pin PB4). The ADC does not finish the sample. The ADCD2 state is ADC_ACTIVE and the ADC_MSR.ADCSTATUS is 0x4(Sample). The values in the buffer stay unchanged. My Settings for the conversion group ''Precision'': - Linear, Max Sequential: 4 - Watchdog functions are all disabled - Channel Settings: Inital: 0, Number of channels: 1 - Timing: CTR0_INPLATCH = 1, OFFSHIFT = 0, INPCMP = 2, INPSAMP = 9, CTR1,2 the same - No callbacks are used In the eDMA_MUX_Settings, ADC uses DMA2. My Programm looks like this: int main(void) { uint16_t adcBuffer[4]; componentsInit(); osalIsrEnable(); adcStart(&ADCD2, NULL); adcStartConversion(&ADCD2, &adc1_group_precision, &adcBuffer[0], 4); while(1) { } } The registers of ADC and eDMA seems to be right, the Clock Settings should be right, I can't find register ME_PCLT33 in the PLS-Debugger (32 and 44 are there). Thanks for help. StefanP By the way, ADC-Channel 44 can not be selected in the Conversion Group Setup.