Skip to main content
T J
Senior III
August 28, 2018
Question

DMA buffer position

  • August 28, 2018
  • 1 reply
  • 1653 views

In the M0 I used this code to get the current pointer position

 U1RxBufferPtrIN = U1RxBufSize - huart2.hdmarx->Instance->CNDTR;

but on the H7 this register is not available.

How can I find the current Rx pointer position from the Uart DMA controller ?

This topic has been closed for replies.

1 reply

T J
T JAuthor
Senior III
August 28, 2018

U1RxBufferPtrIN = U1RxBufSize - __HAL_DMA_GET_COUNTER(huart7.hdmarx);

this works !

but how to work the syntax of direct access ?

this does not compile ??

U1RxBufferPtrIN = U1RxBufSize - huart7.hdmarx->Instance.NDTR;