cancel
Showing results for 
Search instead for 
Did you mean: 

Data Buffer for serial and spi

MacLaren
Associate III

hi hope have good day

i need to buffer data for save on every 1ms

for serial and spi i use dma to receive data

for example hal_uart_receviveDMA on this function must set buffer size ...

i test one example :

50Hz send to mcu data each time 1000 and 1001 and 1002... to full load data and baud 921600

1khz buffering(hal_uart_rec_dma) in 2000 length variable.

but i have some problem

in first time on the dma interrupt 1000 was ok second form 1000 to 2000 data add and 1 data lost and lost increase every 2 time buffer full

how can i find how many data receive for copy on other buffer and how can i receive without lost

thanks

10 REPLIES 10

any one have solution for this post?