Skip to main content
thomaslindenberger9
Associate
September 30, 2016
Question

read UART DMA Pionter

  • September 30, 2016
  • 3 replies
  • 875 views
Posted on September 30, 2016 at 11:25

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-!pionter
    This topic has been closed for replies.

    3 replies

    thomaslindenberger9
    Associate
    September 30, 2016
    Posted on September 30, 2016 at 11:34

    Walid FTITI_O
    Visitor II
    September 30, 2016
    Posted on September 30, 2016 at 13:38

    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-

    thomaslindenberger9
    Associate
    September 30, 2016
    Posted on September 30, 2016 at 15:50

    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