Skip to main content
Visitor II
October 2, 2024
Question

STM32H5 GPDMA Timer circular buffering interrupt issue

  • October 2, 2024
  • 1 reply
  • 1268 views

Hi, 

I am using linked list mode for circular buffering DMA with Timer1 in burst mode. The expectation is that after 300 transfer from memory to timer 1 CCR register, the DMA should start again with the buffer. To do that I need to use Half Trasfer interrupt and Transfer complete interrupt to elaborate the buffer. 

 

It happen something strange, I receive interrupt for each data transferred from memory to peripheral, instead of the half/complete transfer, so I cannot process the buffer. 

Here is my configuration:

 

 

 //Setting of DMA Burst for Timer 
 dmacfg.Request = req; 
 dmacfg.DestAddress = dest; 
 dmacfg.Direction = LL_DMA_DIRECTION_MEMORY_TO_PERIPH;
 dmacfg.BlkHWRequest = LL_DMA_HWREQUEST_BLK;//LL_DMA_HWREQUEST_SINGLEBURST;
 dmacfg.DataAlignment = LL_DMA_DATA_ALIGN_ZEROPADD;
 dmacfg.SrcBurstLength = srclen;
 dmacfg.DestBurstLength = dstlen;
 dmacfg.SrcDataWidth = LL_DMA_SRC_DATAWIDTH_HALFWORD;
 dmacfg.DestDataWidth = LL_DMA_DEST_DATAWIDTH_HALFWORD;
 dmacfg.SrcIncMode = LL_DMA_SRC_INCREMENT;
 dmacfg.DestIncMode = LL_DMA_DEST_FIXED;
 dmacfg.Priority = LL_DMA_HIGH_PRIORITY;
 dmacfg.SrcAllocatedPort = LL_DMA_SRC_ALLOCATED_PORT0;
 dmacfg.DestAllocatedPort = LL_DMA_DEST_ALLOCATED_PORT1;
 dmacfg.Mode = LL_DMA_NORMAL;//LL_DMA_PFCTRL;

 

I am using Channel 0 and 1 of GPDMA2. I did some test and I can get it working with Channel 0 and 7. 

The linked list is made of only one item for updating the source address. 

 

Have someone already experienced this kind of issue?

 

Thank you

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    October 3, 2024

    Hello @alessioschisano ,

    Did you check the related DMA units/channels and trigger sources.

    I advise you to refer to this STM32H5 MOOC: - GPDMA - Basic configurationThe purpose of this part is demonstration of GPDMA simple configuration on NUCLEO-H563ZI board.

    You can also refer to this article on how to configure the GPDMA using STM32CubeIDE: 

    How to configure the GPDMA - STMicroelectronics Community and to this AN5593: How to use the GPDMA for STM32 MCUs application note.

    Hope this helps you!