How to transmit USART data with DMA and low level (LL) functions?
Hello,
I'm trying to send some data via UART and DMA on a STM32F072, but with the low level functions. This works perfectly when using the HAL-function HAL_UART_Transmit_DMA(), but I'm missing some information for the low level functions. I configured everything with CubeMX and have this example "code" running:
// Disable DMA to load new length to be tranmitted
LL_DMA_DisableChannel(DMA1, LL_DMA_CHANNEL_4);
// set length to be tranmitted
volatile uint8_t uart60_tx_buffer[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
LL_DMA_SetDataLength(DMA1, LL_DMA_CHANNEL_4, sizeof(uart60_tx_buffer) );
// configure address to be transmitted by DMA
LL_DMA_ConfigAddresses(DMA1, LL_DMA_CHANNEL_4, (uint32_t)uart60_tx_buffer, (uint32_t)LL_USART_DMA_GetRegAddr(USART2, LL_USART_DMA_REG_DATA_TRANSMIT), LL_DMA_GetDataTransferDirection(DMA1, LL_DMA_CHANNEL_4));
// Enable DMA again
LL_DMA_EnableChannel(DMA1, LL_DMA_CHANNEL_4);
// how to start sending with DMA?!
// this works, but is not with DMA support
LL_USART_TransmitData8( USART2, 'A');I'm just missing the command of function, with which the transmission of the data in the array uart60_tx_buffer[10] is acctually been send. Is this even possible with the low level functions?
Thanks in advance
