cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H5 GPDMA Timer circular buffering interrupt issue

alessioschisano
Associate

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

0 REPLIES 0