2016-09-30 02:25 AM
Hi
To check the functionality of the UART I am trying to read out the DMA pointer.
Is this possible in the HAL Libraries? If yes, how can I do that?
In this context I would like to know whether it is possible to set the DMA pointer back to 0 by Software.
Thanks in advance
Thomas37
#!uart-!dma-!pionter2016-09-30 02:34 AM
2016-09-30 04:38 AM
Hi Thomas37,
If I well understand your need, the STM32Fxx_hal dma.c file, there is fucntion that you can use to achive this:* HAL_DMA_GetState(DMA_HandleTypeDef *hdma) : returs the DMA state.[ hdma is pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA Channel. ]* HAL_DMA_Abort(DMA_HandleTypeDef *hdma): it aborts DMA transfer; After disabling a DMA Channel, a check for wait until the DMA Channel is effectively disabled is added. If a Channel is disabled while a data transfer is ongoing, the current data will be transferred and the Channel will be effectively disabled only after the transfer of this single data is finished. -Hannibal-2016-09-30 06:50 AM
Hi Hannibal
I would like to know whether there is a register that I can use to see how many Bytes the DMA already read from UART.
I want to read that register after a defined time to see if the data transfer is correct. If not I want to restart the DMA.
Thomas