cancel
Showing results for 
Search instead for 
Did you mean: 

DMA buffer position

T J
Lead

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 ?

1 REPLY 1
T J
Lead

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;