Skip to main content
Associate II
June 11, 2026
Question

Cannot read DAC output value using the internal connection to ADC on STM32U073

  • June 11, 2026
  • 2 replies
  • 22 views

Hi all,

I'm trying to read the DAC output value using the integrated ADC and the connection to it (channel 19). However, I only read random values between [0;2] units. The DAC works properly using the integrated buffer. I route the DAC output to the external pin and to on-chip analog peripherals, so I can confirm the output with a multimeter. 

The ADC seems to work properly too: I can read internal temperature, VrefInt, and 2 input pins with scan mode. However, when I enable the VDAC_OUT1 and add it to scan mode, I get random values between 0 and 2 (only for VDAC_OUT1, the other readings are fine). Sample times are abondant (few us); I have tried different sampling values, but, as expected, it doesn’t change anything.

I configure this setup with the latest version of CubeMX. Readings and DAC configuration are performed using basic HAL (no interrupt and no DMA).

Does anyone have an idea to fix this issue? 

 

2 replies

waclawek.jan
Super User
June 11, 2026

Read out and check/post the DAC and ADC registers. This actually is a situation where you can stop the mcu and play with the peripherals “manually” in debugger, observing voltages at PA4 and the ADC results.

Note the MODE-related erratum; check if the software you use does implement the workaround.

JW

fabrAuthor
Associate II
June 11, 2026

I will investigate!

In the meantime, I had discovered that I can share PA4 pin between DAC and ADC channel 8. In this configuration, I can read the DAC value. However, I will continue to investigate to avoid the usage of an additional ADC channel.

 

ST Technical Moderator
June 11, 2026

Hello ​@fabr 

Please refer to the article below: 

Getting started with ADC - stm32mcu

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om