Skip to main content
MMust.5
Senior
July 11, 2023
Question

How to understand that the data is transferred through DMA?

  • July 11, 2023
  • 1 reply
  • 908 views

Enabled DMA in CubeMX settings to transfer data via UART.
But I don't see any difference at all between non-DMA functions and DMA functions.

I don't think it's important, but I use this code:
Transferring characters from the COM port to the STM32 and returning these characters back to the COM port.

 

uint8_t arr[10]={0};
void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)
{
if(huart->RxState==HAL_UART_STATE_READY)
{
HAL_UART_Transmit_DMA(&huart3, arr, Size);
HAL_UARTEx_ReceiveToIdle_DMA(&huart3, arr, 5);
}
int main()
{
HAL_UARTEx_ReceiveToIdle_DMA(&huart3, arr, 5);
}

 

The code works. But how to understand that data is transmitted via DMA?
Yes, there is DMA in the function names.
I need proof, if I may say so, that the data is transferred via DMA.

tim2.png

This topic has been closed for replies.

1 reply

RhSilicon
Lead
July 11, 2023