2022-12-07 03:13 AM
I'm using an STM32F103C8T6 "Blue Pill" connected to Ublox module using UART. It just a simple operation of receiving data and then print them to serial monitor using CDC_Transmit()
HAL_UART_Receive(&huart1, receivedData, sizeof receivedData, HAL_MAX_DELAY);
while(CDC_Transmit_FS(receivedData, sizeof receivedData)== USBD_BUSY);
The weird thing is it still transmitting data even though I unplugged all the wire where it should be transmitting nothing. I'm thinking its still printing the previous output buffer. If it is the case how can I clear my buffer?
2022-12-07 09:41 AM
Perhaps check for error/status returns? Although I'd assume the max delay is like 49 days
Toggle an LED?
Snippet doesn't provide much context.