Skip to main content
Graduate
August 18, 2024
Solved

STM32H7B0 DMA locked after first start

  • August 18, 2024
  • 1 reply
  • 916 views

Hi,

I use a STM32H7B0 100 pins and we would use a DMA to transfer data from 1 memory location to another.
Therefore we use DMA1 stream 3 with a datasize of "Half word".
What is very strange is that we cannot disable the option "Use Fifo" in stm32Cube.

Now when we start the DMA with:

 

 

HAL_DMA_Start_IT(&hdma_memtomem_dma1_stream3,
 (uint32_t)&srcBuffer,
 (uint32_t)&DestBuffer,
 1000);

 

The transfert is done and we seen the data in de destination buffer, but when we restart the
DMA again there isn't no transfert more to the destination buffer.

When we look in the registers of the DMA, we seen that the DMA was locked / HAL_DMA_STATE_BUSY and no error status
The HAL_DMA_Start_IT() was called from the HAL_ADC_ConvCpltCallback() (~ every 1 ms)


We had also tried to start the DMA only when he was unlocked, but with the same issue

 

if (hdma_memtomem_dma1_stream3.Lock == HAL_UNLOCKED) {
 HAL_DMA_Start_IT(&hdma_memtomem_dma1_stream3,
 (uint32_t)&srcBuffer,
 (uint32_t)&DestBuffer,
 1000);​
}

 


Why stops the DMA after the first transfer?

btw: The CPU iCache / CPU Dcache and MPU control mode are disable.

    This topic has been closed for replies.
    Best answer by OGhis

    Hi,

    Issue resolved.
    forgot to enable the Interrupt of the DMA

    OGhis_0-1723986180662.png

     

    1 reply

    OGhisAuthorAnswer
    Graduate
    August 18, 2024

    Hi,

    Issue resolved.
    forgot to enable the Interrupt of the DMA

    OGhis_0-1723986180662.png

     

    Technical Moderator
    August 18, 2024

    Nice to see you fixed it !