DAC OUTPUT differs DAC 1 & DAC 2 on STM32F429ZI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-12-21 5:40 PM
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?
- Labels:
-
DAC
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-12-21 5:58 PM
Custom board or known hardware? How is the pin connected? You haven't shown any initialization, so problem could be there as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-12-21 6:16 PM
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 */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-12-21 6:40 PM
Discovery kit with STM32F429ZI MCU - User manual
As TDK pointed out, probably PA4 is connected to LCD screen VSYNC:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-12-21 7:04 PM
Hi, the datasheet PA4 pin is DAC_OUT1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-12-21 7:14 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-12-21 7:46 PM
You have several options:
- 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.
- 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
- or design custom board
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-12-21 8:25 PM
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-12-21 8:25 PM
Thank you
