Skip to main content
chichvarin
Associate
May 15, 2012
Question

not getting DMA interrupts for some reason

  • May 15, 2012
  • 2 replies
  • 674 views
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);
    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    May 15, 2012
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    chichvarin
    Associate
    May 15, 2012
    Posted on May 15, 2012 at 21:02

    Thank you, the last one helped.