AnsweredAssumed Answered

Is DMA Circular mode working in STM32F746G-Disco?

Question asked by nikolaou.christos on Sep 13, 2015
Latest reply on Oct 26, 2015 by Nesrine M
I have a project in STM32F746G-Disco with its SPDIFRX interface.

I was able to use STM32CubeMX to generate the intializations and the sceleton project.

As it is right now, I can receive the half and complete interrupts but only once each.
The HAL_SPDIFRX_RxHalfCpltCallback and the HAL_SPDIFRX_RxCpltCallback, are called only once each and then no more calls to them are send.
That means the DMA is working and retrieves samples from the SPDIFRX interface but it is not reloading the DMA transfer size or the other DMA parameters, in order to continue from the start again.
It runs only once.
/* Peripheral DMA init*/
hdma_spdif_rx_dt.Instance = DMA1_Stream1;
hdma_spdif_rx_dt.Init.Channel = DMA_CHANNEL_0;
hdma_spdif_rx_dt.Init.Direction = DMA_PERIPH_TO_MEMORY;
hdma_spdif_rx_dt.Init.PeriphInc = DMA_PINC_DISABLE;
hdma_spdif_rx_dt.Init.MemInc = DMA_MINC_ENABLE;
hdma_spdif_rx_dt.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
hdma_spdif_rx_dt.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
hdma_spdif_rx_dt.Init.Mode = DMA_CIRCULAR;
hdma_spdif_rx_dt.Init.Priority = DMA_PRIORITY_LOW;
hdma_spdif_rx_dt.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
hdma_spdif_rx_dt.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
hdma_spdif_rx_dt.Init.MemBurst = DMA_MBURST_SINGLE;
hdma_spdif_rx_dt.Init.PeriphBurst = DMA_PBURST_SINGLE;

And that is the portion of code generated from CubeMX, it clearly shows the
"Mode = DMA_CIRCULAR" but for some reason it stops at only one iteration.

Anyone has a hint on this?