Cannot read DAC output value using the internal connection to ADC on STM32U073
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?
