AnsweredAssumed Answered

DAC offset problem

Question asked by panduro.soeren.002 on Oct 18, 2013
Latest reply on Oct 23, 2013 by panduro.soeren.002
HI

I have a small issue with the DAC in a stm32F103, there Is a small offset between DAC_DHR12R1 and DAC_DOR1 registers
The code is pretty simple:
DAC_InitStructure.DAC_Trigger = DAC_Trigger_Software;
DAC_InitStructure.DAC_WaveGeneration = DAC_WaveGeneration_None;
DAC_InitStructure.DAC_OutputBuffer = DAC_OutputBuffer_Enable;
DAC_Init( DAC_Channel_1, &DAC_InitStructure );

DAC_SetChannel1Data( DAC_Align_12b_R, value );
DAC_SoftwareTriggerCmd(DAC_Channel_1, ENABLE);

And the test result:

DAC_DHR12R1          DAC_DOR1
40                         41
409                         411
1023                    1026
2047                    2051
3071                    3076
4095                    5

Has anyone else seen the same problem?

Another thing is that I can’t get it to work with DAC_Trigger_None. any ideas?


Outcomes