cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f103 DMA receive

prasad2
Associate II
Posted on December 22, 2009 at 08:00

stm32f103 DMA receive

3 REPLIES 3
prasad2
Associate II
Posted on May 17, 2011 at 13:34

Hello,

In STM32 library for DMA related interrupts I can only see following interrupt sources.

- DMA_IT_TC: Transfer complete interrupt mask

- DMA_IT_HT: Half transfer interrupt mask

- DMA_IT_TE: Transfer error interrupt mask

I have used DMA_IT_TC for UART4 TX to put new data in buffer, how can I use this UART4 Rx? Can I get a interrupt on new data received in buffer by DMA?

Does any one have a sample program for this?

Regards,

Prasad

jvaque
Associate II
Posted on May 17, 2011 at 13:34

If you know how many bytes you will receive, configure the DMA, and when it receives the specified number of bits, DMA_IT_TC will raise the same way it does for TX.

(...)

DMA_InitStructure7.DMA_MemoryBaseAddr = (uint32_t)pBuffer;

DMA_InitStructure7.DMA_BufferSize = (uint32_t)NumByteToRead;

(...)

I2C_DMACmd(I2C1, ENABLE);

/* Enable the DMA Channel7 Transfer Complete IT */

DMA_ITConfig(DMA1_Channel7, DMA_IT_TC, ENABLE);

(...)

sdodd
Associate
Posted on October 10, 2011 at 20:45

I have successufully set up a DMA FIFO in circular mode, to drain the USART when it's RXNE flag is set. I want to change it so that I can do variable len dma's to different buffers. I have implemented this but only the initial DMA cycle fires off.

I there any reason why I can reprogram the DMA controller and enable the engine within the ISAR? Any examples would be helpful

Thanks

Steve