Page 1 of 1

DMA driver issue with STM32L011  Topic is solved

Posted: Sat May 01, 2021 1:26 pm
by dflogeras
Hi,

Running ChibiOS-20.3.3, I'm playing with a board based around an STM32L011. I started with the template project in demos/STM32/NIL-STM32L011K4-NUCLEO32.

If I enable I2C1, the following compile error happens:

Code: Select all

In file included from ../os/hal/ports/STM32/STM32L0xx/stm32_isr.c:55:
../os/hal/ports/STM32/LLD/DMAv1/stm32_dma1_ch4567.inc: In function ‘Vector6C’:
../os/hal/ports/STM32/LLD/DMAv1/stm32_dma1_ch4567.inc:71:21: error: ‘STM32_DMA1_STREAM6’ undeclared (first use in this function); did you mean ‘STM32_DMA1_STREAM1’?
   71 |   dmaServeInterrupt(STM32_DMA1_STREAM6);
      |                     ^~~~~~~~~~~~~~~~~~
      |                     STM32_DMA1_STREAM1
../os/hal/ports/STM32/LLD/DMAv1/stm32_dma1_ch4567.inc:71:21: note: each undeclared identifier is reported only once for each function it appears in
../os/hal/ports/STM32/LLD/DMAv1/stm32_dma1_ch4567.inc:74:21: error: ‘STM32_DMA1_STREAM7’ undeclared (first use in this function); did you mean ‘STM32_DMA1_STREAM1’?
   74 |   dmaServeInterrupt(STM32_DMA1_STREAM7);
      |                     ^~~~~~~~~~~~~~~~~~
      |                     STM32_DMA1_STREAM1


The device datasheet sates this one has only DMA 5 channels, so I'd guess there's just a missing #ifdef somewhere? If I comment out the two offending calls in os/hal/ports/STM32/LLD/DMAv1/stm32_dma1_ch4567.inc I can move forward, but that's obviously not the correct fix.

Re: DMA driver issue with STM32L011

Posted: Fri Aug 20, 2021 10:30 am
by Giovanni
Hi,

Fixed as bug #1181. Not tested on HW.

Giovanni