DMA to DAC peripheral causes DMA error on STM32G474 Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
skidude240
Posts: 2
Joined: Sun Jan 23, 2022 5:19 pm

DMA to DAC peripheral causes DMA error on STM32G474  Topic is solved

Postby skidude240 » Mon Jan 24, 2022 8:01 pm

Setup:
ChibiOS version : 20.3.4
Compiler: arm-none-eabi-gcc 9.2.1
Platform: STM32G474 on a custom board.

Problem:
Using the DAC driver with an error callback configured results in me entering the error callback every time. Adding some breakpoints i can see that the DMA channel is reporting a bus error. Digging through the code and the Ref man i can see that in hal_dac_lld.c the DMA is configured to be half-word sized while the Ref man indicated that the access should be Word sized, section 22.7.

Looking through the forum i can see this thread where this problem is discussed. viewtopic.php?f=3&t=5122&start=20#p36415 but that changes appears to have been reverted to solve bug #1100 viewtopic.php?f=35&t=5529#p37873.

I have locally reverted that fix and the DAC is working as expected.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: DMA to DAC peripheral causes DMA error on STM32G474

Postby Giovanni » Mon Jan 24, 2022 8:06 pm

Hi,

Thanks for finding, the DAC driver needs a serious review.

Giovanni

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: DMA to DAC peripheral causes DMA error on STM32G474

Postby Giovanni » Sat Jan 29, 2022 11:54 am

Hi,

Reverted bug #1100, It broke the driver as you described.

Changes committed to trunk, 21.11.x, 20.3.x.

Giovanni

skidude240
Posts: 2
Joined: Sun Jan 23, 2022 5:19 pm

Re: DMA to DAC peripheral causes DMA error on STM32G474

Postby skidude240 » Sun Jan 30, 2022 12:09 pm

Thanks Giovanni.

Ill pick this up as soon as possible.

If the DAC driver is reworked in the future, i'm happy to test it on the STM32G474.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 9 guests