F072: DMA1.5 TC IRQ does not work if DMA1.7 setup first Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
User avatar
kreyl
Posts: 59
Joined: Sun Jan 13, 2013 11:46 pm
Been thanked: 4 times
Contact:

F072: DMA1.5 TC IRQ does not work if DMA1.7 setup first  Topic is solved

Postby kreyl » Mon Sep 18, 2017 6:59 pm

OS: chibios v 17.6.0
MCU: stm32f072c8t6
Board: custom
DMA1_STREAM5 used for SPI2 TX, Transmission Complete interrupt required
DMA1_STREAM7 used for USART3 TX, Transmission Complete interrupt NOT required

If Stream7 initialized before Stream5, TC IRQ of Stream5 does not fire.
If Stream5 initialized before Stream7, TC IRQ of Stream5 works ok.

Data transmission works ok in both scenarios.
USART3 works non-stop (circulary), feeding LCD with data. SPI2 works time after time to control WS2812 LEDs.

Here is initialization code (very similar):

Code: Select all

#define LCD_DMA         STM32_DMA1_STREAM7  // USART3 TX
#define LEDWS_DMA       STM32_DMA1_STREAM5  // SPI2 TX
...
    dmaStreamAllocate     (LEDWS_DMA, IRQ_PRIO_LOW, LedTxcIrq, NULL);
    dmaStreamSetPeripheral(LEDWS_DMA, &LEDWS_SPI->DR);
    dmaStreamSetMode      (LEDWS_DMA, LED_DMA_MODE);
...
    dmaStreamAllocate     (LCD_DMA, IRQ_PRIO_LOW, nullptr, nullptr);
    dmaStreamSetPeripheral(LCD_DMA, &USART3->TDR);
    dmaStreamSetMemory0   (LCD_DMA, IBuf);
    dmaStreamSetTransactionSize(LCD_DMA, LCD_VIDEOBUF_SIZE);
    dmaStreamSetMode      (LCD_DMA, LCD_DMA_TX_MODE);
    // Start transmission
    dmaStreamEnable(LCD_DMA);

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: F072: DMA1.5 TC IRQ does not work if DMA1.7 setup first

Postby Giovanni » Sun Oct 01, 2017 3:12 pm

Hi,

Could you verify if it is related to the problems fixed in this thread?

viewtopic.php?f=35&t=4207

If not then probably there are more similar errors in the F0 registry.

Giovanni

steved
Posts: 823
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

Re: F072: DMA1.5 TC IRQ does not work if DMA1.7 setup first

Postby steved » Fri Oct 06, 2017 8:15 am

Worth trying this fix

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: F072: DMA1.5 TC IRQ does not work if DMA1.7 setup first

Postby Giovanni » Sat Oct 07, 2017 1:26 pm

Hi,

I committed the fix from steved, could you confirm if it fixes your problem too?

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: F072: DMA1.5 TC IRQ does not work if DMA1.7 setup first

Postby Giovanni » Sun Nov 05, 2017 2:11 pm

Closing.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 13 guests