cancel
Showing results for 
Search instead for 
Did you mean: 

In what exact condition does the DMA half transfer interrupt is triggered?

highrice
Associate
Posted on September 14, 2016 at 09:59

Hello,

I have something unclear about the DMA.

From the datasheet(

http://www.st.com/content/ccc/resource/technical/document/reference_manual/cf/10/a8/c4/29/fb/4c/42/DM00091pdf/files/DM00091pdf/jcr:content/translations/en.DM00091pdf

). It says,

Once half of the bytes are transferred, the half-transfer flag (HTIF) is set and an interrupt is generated if the Half-Transfer Interrupt Enable bit (HTIE) is set.

It is obvious that if I set

DMA_CNDTRx

to 48 and than enable the DMA channel half-transfer flag will be set when

DMA_CNDTRx

becomes

But what if I set

DMA_CNDTRx

to an odd number like 15, when does the half-transfer interrupt is triggered? When

DMA_CNDTRx

becomes 7? or when it becomes 8?

#!stm32 #!dma
2 REPLIES 2
Walid FTITI_O
Senior II
Posted on September 15, 2016 at 19:29

Hi lee.seungwon,

It is mentiooned in reference manual:

''

Once half the data have been transferred on the AHB destination port, the half-transfer flag

 

(HTIF) is set and an interrupt is generated..''

So, in case of X data to be transferrred , after X/2 transfer complete the HT is set . In case of odd number like 15 , HT is set after the 7 th has been transferred.

-Hannibal-

highrice
Associate
Posted on September 16, 2016 at 03:26

Hi Hannibal,

Thank you for your interest in my post.