2025-05-30 1:24 AM
I like to use the CubeMx 6.14.1 generated code (up2date firmware packages) to use DAC 1+2 with GPDMA in circular mode (Standard-Request-Mode)
The 1st thing that makes me wonder: Although I selected "Standard Request Mode" in CubeMX a configuration for Linked-ListMode is generated. Nevertheless this seems to work with ADC.
On DAC Channels 1+2 I get a Data-Transfer-Error although I can't figure out a CubeMX missconfiguration for now.
See my attached .ioc File for Reference.
Expectation: CubeMx generated Standard Request code when selecting this in the GUI.
Expectation: DAC generates HAL_DAC_CH1_COMPLETE instead of HAL_DAC_CH1_ERROR with DTE bit set.
DMA-Start-Code:
HAL_DAC_Start_DMA(&hdac1, DAC_CHANNEL_1, (uint32_t*)output_buffer[0], SAMPLE_BLOCK_SIZE * 2, DAC_ALIGN_12B_R);
HAL_DAC_Start_DMA(&hdac1, DAC_CHANNEL_2, (uint32_t*)output_buffer[1], SAMPLE_BLOCK_SIZE * 2, DAC_ALIGN_12B_R);
with output_buffer being a global:
int16_t output_buffer[3][2*SAMPLE_BLOCK_SIZE];
Maybe one may give me a hint what I've been done wrong.
FYI: Same application code runs on a STM32G4 cubemx, so I suppose it's due to a CubeMX missconfiguration or a CubeMX errata.
Thanks in advance. Best Regards
Pascal Speck
2025-05-30 9:34 AM
Hello @stst9180,
What's the Linked-ListMode configuration that is generated?
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.