Skip to main content
Associate
March 24, 2024
Solved

Why DAC output nothing in software trigger?

  • March 24, 2024
  • 1 reply
  • 972 views

I am use STM32L431RCT6,and my CubeMX config is this:

Wshuo1_0-1711240505296.png

And my code is:

```

uint32_t data = 128;
ret = HAL_DAC_SetValue(&hdac1, DAC_CHANNEL_1, DAC_ALIGN_8B_R, data);
if(ret) {
HAL_Delay(10);
}
ret = HAL_DAC_Start(&hdac1, DAC_CHANNEL_1);
if(ret) {
HAL_Delay(10);
}

```

And if my Trigger method use None, measure is OK(middle with VCC).

I do not know why.

Best answer by waclawek.jan

Read out and check/post content of DAC and relevant GPIO registers.

JW

1 reply

waclawek.jan
waclawek.janBest answer
Super User
March 24, 2024

Read out and check/post content of DAC and relevant GPIO registers.

JW

Wshuo.1Author
Associate
September 21, 2024

[BUG] DAC software trigger at STM32L431 have not s... - STMicroelectronics Community

I have learn DAC reg, and I have find CubeMX question. Thank you.