cancel
Showing results for 
Search instead for 
Did you mean: 

DAC OUTPUT differs DAC 1 & DAC 2 on STM32F429ZI

지한.1
Associate II

Hi, I used STM32F429ZI

I want to check the output of DAC channel 1 and DAC channel 2.

But, the output of DAC channel 1 and DAC channel 2 were different.

HAL_DAC_SetValue( &hdac, DAC_CHANNEL_1, DAC_ALIGN_12B_R, 0 )

HAL_DAC_SetValue( &hdac, DAC_CHANNEL_2, DAC_ALIGN_12B_R, 0 )

I measured the voltage DAC channel 1 and DAC channel 2, the values were different.

DAC channel 1 => 2.1V

DAC channel 2 => 0V

Could you tell me what the problem is?

8 REPLIES 8
TDK
Guru

Custom board or known hardware? How is the pin connected? You haven't shown any initialization, so problem could be there as well.

If you feel a post has answered your question, please click "Accept as Solution".
지한.1
Associate II

Hi, I used 23F429IDISCOVERY kit.

I connected PA4​ pin and GND and measured the DAC channel 1 voltage.

PA5 pin and GNC and measured the DAC channel 2 voltage.

Here is my main code.

/* USER CODE BEGIN 2 */

HAL_DAC_Start( &hdac, DAC_CHANNEL_1);

HAL_DAC_Start( &hdac, DAC_CHANNEL_2);

/* USER CODE END 2 */

/* Infinite loop */

/* USER CODE BEGIN WHITE */

while( 1 )

{

/* USER CODE END WHILE */

/* USER CODE BEGINE 3 */

HAL_DAC_SetValue( &hdac, DAC_CHANNEL_1, DAC_ALIGN_12B_R, 0 )

HAL_DAC_SetValue( &hdac, DAC_CHANNEL_2, DAC_ALIGN_12B_R, 0 )

}

/* USER CODE END 3 */

Discovery kit with STM32F429ZI MCU - User manual

As TDK pointed out, probably PA4 is connected to LCD screen VSYNC:

0693W00000HpSOBQA3.png

0693W00000HpSQgQAN.jpgHi, the datasheet PA4 pin is DAC_OUT1.

STM32F429ZI datasheet

TDK
Guru

It is DAC_OUT1. However, it's already connected to something on that board (VSYNC) which is driving that pin. When two things drive a pin, only one of them can win. In this case, looks like VSYNC is winning.

If you feel a post has answered your question, please click "Accept as Solution".

You have several options:

  1. cut/disconnect/de-solder whole LED screen or VSYNC line. Investigate possibility to connect VSYNC to other MCU pin if you need LED screen to operate properly.
  2. or find and buy some generic board with same MCU series, with minimal external components on board, possibly replace MCU with exact part number you need
  3. or design custom board

Thank you.

Thank you​