Hi team,
Regarding the original question, the customer has figure out the way as below:
Q: Implements the reception of packets starting at 0x10 02 and ending at 0x10 03.
Steps:
A. Prepare a user buffer (rx_my_buf).
B. Configure the serial port parameters: Readmode= UART2_Mode_CALLBACK
C. Execute UART2_read(handle, rx_my_buf, Sizeof(rx_my_buf))
D. Implementation in readback functions such as readCallback: Process many data just received and when bytesRead == readCount, ! ! Call UART2_read() again. Read all the way, and the read data is placed in the RingBuf that comes with the UART2 driver, and then in the user buffer rx_my_buf.
E. When the user processes data, the read data can be determined at readCallback(): If there is a header of 0x10 02, 0x10, or the end of 03. Then send message again.
And now the customer is wondering how does RingBuf's ring buffer cope with the auto-boost mode of DMA? Is it possible to cross the boundary of Ringbuf?
Could you help check the additional question? Thanks.
Best Regards,
Cherry