cancel
Showing results for 
Search instead for 
Did you mean: 

not getting DMA interrupts for some reason

chichvarin
Associate II
Posted on May 15, 2012 at 17:13

i've faced a couple of problems, trying to launch a MT9D111 camera along with STM32F217ZG microcontroller through DCMI interface.

 I've got all the interrupts from DCMI, but i can't catch any interrupt from DMA, although in the debugger window i can see that it is writing some thing into the buffer. May be you have seen this before. What can cause such a behaviour. I'm adding the initialisation code  for dma interrupts.

 DMA_ITConfig(DMA2_Stream1, DMA_IT_HTIF1, ENABLE);

 DMA_ITConfig(DMA2_Stream1, DMA_IT_TCIF1, ENABLE);

 DMA_ITConfig(DMA2_Stream1, DMA_IT_TEIF1, ENABLE);

 DMA_ITConfig(DMA2_Stream1, DMA_IT_FEIF1, ENABLE);

 DMA_ITConfig(DMA2_Stream1, DMA_IT_DMEIF1, ENABLE);

   // Enable the DMA Stream IRQ Channel

 NVIC_InitStructure.NVIC_IRQChannel = DMA2_Stream1_IRQn;

 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;

 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;

 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;

 NVIC_Init(&NVIC_InitStructure);
2 REPLIES 2
Posted on May 15, 2012 at 20:27

Thoughts of the top of my head :

The DMA2 clock isn't enabled?

The interrupt routine's name doesn't match the one in the vector table? DMA2_Stream1_IRQHandler()

You're supposed to use the DMA_ITConfig(DMA2_Stream1, DMA_IT_TC, ENABLE); form? Not DMA_IT_TCIF1

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
chichvarin
Associate II
Posted on May 15, 2012 at 21:02

Thank you, the last one helped.