DAC interfere with ADC

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Cusko on Tue Nov 26 02:05:44 MST 2013
I use ADC pin on P4_3 and DAC pin on P4_3. When I set bit DMA_ENA with DAC_ConfigDAConverterControl() the ADC0_0 show some value even if there is none. If DMA_ENA is not set then the ADC0_0 works fine. Why is this happening?
scu_pinmux(4,3, MD_PLN, FUNC0);
LPC_GPIO_PORT->DIR[2] &= ~(1UL<<3);
LPC_SCU->ENAIO0 |= 1<<0;
ADC_Init(LPC_ADC0, 2000, 10);
//Start burst conversion

DAC_CONVERTER_CFG_Type DAC_ConverterConfigStruct;
scu_pinmux(4,4, MD_PLN, FUNC0);
LPC_SCU->ENAIO2 |= 1<<0;
DAC_ConverterConfigStruct.CNT_ENA = 0;
DAC_ConverterConfigStruct.DMA_ENA = 1;
DAC_ConfigDAConverterControl (LPC_DAC, &DAC_ConverterConfigStruct); 

If I comment the line  [u]DAC_ConfigDAConverterControl (LPC_DAC, &DAC_ConverterConfigStruct)[/u] ADC works fine, but then DAC_UpdateValue() don't work.
Any idea? Thank you!