cancel
Showing results for 
Search instead for 
Did you mean: 

Serial DMA position

RD'Ig
Associate II

Hi,

I am developing an application on SPC58EC that uses the serial with DMA for reading.

I'd like to know if there is a way to know and get the position where it's writing in the buffer. I mean something like the corresponding "__HAL_DMA_GET_COUNTER(...)" or to the "...->CNDTR" register of the STM32.

I already use the receive callback that trigger at the end, but it's not enough for my purpose.

Thanks,

Rob

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 ACCEPTED SOLUTION

Accepted Solutions
snafu
Associate II

Hi

Try to look at word4 (TCDn_DADDR) field in used TCD of eDMA. It's updated after minor iteration is completed. It's incremented by the size of the minor tranfer. If minor loop size is 1 byte, it's inceremented on each byte transfer.

Pavel

View solution in original post

2 REPLIES 2
snafu
Associate II

Hi

Try to look at word4 (TCDn_DADDR) field in used TCD of eDMA. It's updated after minor iteration is completed. It's incremented by the size of the minor tranfer. If minor loop size is 1 byte, it's inceremented on each byte transfer.

Pavel

Thanks for the answer, I'll check it out.