2016-06-13 09:57 AM
Hi,
I m using nucleo board STM32F103 and Keil Compiler.I have configured UART and DMA(for UART Rx) using CubeMX. But, While starting DMA using HAL_DMA_Start_IT function i m confused. following is the prototype of the function.HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)SrcAddress : Here i think array where i can store the dataDstAddress : Which start address i should give? UART RX register or pointer from UART_HandleTypeDef.pRxBuffPtr structure. #dma-uart-usart-hal #nucleo #stm32cubemx2016-06-13 10:14 AM
For Rx, the ''source'' address would be the UART->DR (or RDR) register, and the ''destination'' the start address of you receive buffer.
For Tx, it would be the other way around. Check the CubeMX documentation - if any. Sorry, I'm no Cube guy. The reference manual for the F10x cores is another suggested read, the DMA resgisters are well-documented there.2016-06-13 03:43 PM
Hi,
As mentionned in the (13.2.8 HAL_DMA_Start_IT) :SrcAddress is the source memory Buffer addressDstAddress is the destination memory Buffer addressYou can have a look to which provides information on how to use the STM32F1 and peripherals. Also, refer to this manual to have more idea about DMA configuration in STM32CubeMx.Regards2016-06-13 08:58 PM
Thanks AvaTar and forumstm32 for clearing my confusion.
2016-06-13 09:00 PM
.