2014-05-27 03:02 PM
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.Thanks2014-05-27 05:55 PM
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.2014-05-28 09:47 AM
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.2014-05-28 11:44 PM
Read out and post value of USART3 registers and the DMA registers of relevant streams' + LISR/HISR.
JW2014-05-29 01:39 PM
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.