cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f4 Discovery board UART DMA interrupt is not being serviced.

anuja
Associate II
Posted on May 28, 2014 at 00:02

Hi,

I'm trying to configure the UART in DMA mode, but I cannot get the interrupts to work.

I have attached my code.

Any help will be appreciated.

Thanks
4 REPLIES 4
Posted on May 28, 2014 at 02:55

C++ with code/definitions missing

Have the IRQHandler names gotten mangled? Check the .MAP file, check the linkage to the vector table. extern ''C'' ??

// Clear DMA Transfer Complete interrupt pending bit. DMA_ClearITPendingBit(DMA1_Stream3, DMA_IT_TCIF1);

DMA_IT_TCIF3?

DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)mpoRxQueue; // Pointer to Reception Queue.

Are you sure this is the buffer address and not the object?

// Enable DMA Stream Half Transfer interrupt. DMA_ITConfig(DMA1_Stream1, DMA_IT_HT, ENABLE);

You are not servicing the HT interrupt.

If you still have problems, make sure that the DMA isn't signalling any errors.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
anuja
Associate II
Posted on May 28, 2014 at 18:47

Thanks Clive.

I corrected the code to point to the correct bit.

I was concentrating on the Tx code and had not looked into the Rx part. Thanks for debugging that it was pointing to an object instead of an array.

I added the Interrupt for Transfer Error, none of the interrupts are getting triggered.

The mapping in the vector table is correct. I have externed ''C'' the entire stm32f4xx_it.c file.

I cannot figure out why the interrupts are not getting serviced. 

 

Posted on May 29, 2014 at 08:44

Read out and post value of USART3 registers and the DMA registers of relevant streams' + LISR/HISR.

JW

anuja
Associate II
Posted on May 29, 2014 at 22:39

Thanks for pointing me towards the registers Jan. 

Turns out the register values were not getting updated because I had not set the RCC clock value correctly.