DMA driver issue with STM32G431 Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
MasterSpoon
Posts: 3
Joined: Fri Aug 27, 2021 7:43 am
Has thanked: 1 time
Been thanked: 2 times

DMA driver issue with STM32G431  Topic is solved

Postby MasterSpoon » Thu Sep 16, 2021 2:50 am

Very similar to this issue viewtopic.php?f=35&t=5838

However on the STM32G431, also trying to enable I2C1.
The STM32G431xx, STM32G441xx, STM32G471xx are the outliers in the G4xx series as the rest all seem to have 2 x 8 DMA streams where they only have 2 x 6 DMA streams.

Code: Select all

Compiling: lib/chibios/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.c                                    lib/chibios/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.c: In function 'Vector84':
lib/chibios/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.c:398:21: error: 'STM32_DMA1_STREAM7' undeclared (first use in this function); did you mean 'STM32_DMA1_STREAM1'?
  398 |   dmaServeInterrupt(STM32_DMA1_STREAM7);
      |                     ^~~~~~~~~~~~~~~~~~
      |                     STM32_DMA1_STREAM1
lib/chibios/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.c:398:21: note: each undeclared identifier is reported only once for each function it appears in
lib/chibios/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.c: In function 'Vector1C0':
lib/chibios/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.c:414:21: error: 'STM32_DMA1_STREAM8' undeclared (first use in this function); did you mean 'STM32_DMA1_STREAM1'?
  414 |   dmaServeInterrupt(STM32_DMA1_STREAM8);
      |                     ^~~~~~~~~~~~~~~~~~
      |                     STM32_DMA1_STREAM1
lib/chibios/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.c: In function 'Vector1C8':
lib/chibios/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.c:526:21: error: 'STM32_DMA2_STREAM7' undeclared (first use in this function); did you mean 'STM32_DMA2_STREAM1'?
  526 |   dmaServeInterrupt(STM32_DMA2_STREAM7);
      |                     ^~~~~~~~~~~~~~~~~~
      |                     STM32_DMA2_STREAM1
lib/chibios/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.c: In function 'Vector1CC':
lib/chibios/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.c:542:21: error: 'STM32_DMA2_STREAM8' undeclared (first use in this function); did you mean 'STM32_DMA2_STREAM1'?
  542 |   dmaServeInterrupt(STM32_DMA2_STREAM8);
      |                     ^~~~~~~~~~~~~~~~~~
      |                     STM32_DMA2_STREAM1
 [ERRORS]


Wrapping the defines in stm32_isr.h for channel 7 and 8 to not apply to these fixes the problem and I can compile but not sure if this is the correct way to go about it.

Thank you

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

Re: DMA driver issue with STM32G431

Postby Giovanni » Thu Sep 16, 2021 8:06 am

Hi,

Thanks for finding, this will require some extra preprocessor tricks in that module.

Giovanni

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

Re: DMA driver issue with STM32G431

Postby Giovanni » Sun Sep 26, 2021 7:23 am

Hi,

Which version are you using? I think this has already been solved in stable branches as bug #1181.

Giovanni

MasterSpoon
Posts: 3
Joined: Fri Aug 27, 2021 7:43 am
Has thanked: 1 time
Been thanked: 2 times

Re: DMA driver issue with STM32G431

Postby MasterSpoon » Wed Sep 29, 2021 2:25 pm

I had a look and I was on 20.3.3
Updated to 20.3.4 to include the bug fix #1181 and appears to have fixed the issue for the G431 also.

Thank you for your help


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 6 guests