UART read fails after a few attempts
I'm trying to create a task that is responsible for reading from serial using UART1.I find that after calling ad_uart_read a few times, eventually ad_uart_read() will block forever. I am using a USB to TTL adapter, which I can probe using a logic analyzer, so I know that the messages are going out on the wire, but ad_uart_read() still does not return.
通过添加打印,我知道ad_uart_read()是提单ocking on this line:
OS_EVENT_WAIT(device->bus_data->event_read, timeout);