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);