Hi, ? am ne in Qt. I was trying to send data from STM32f407vg to Qt. The data is produced by RTC module and gives time, date (for example, 2024-03-11T17:01:24+08:00Monday). However the data read by Qt is not full in text edit always. It is like a loop below and repeated always.

```
2
2
2
20
20
20
202
202
202
2024
2024
2024
2024-
2024-
2024-
2024-0
2024-0
2024-0
2024-03
2024-03
2024-03
2024-03-
2024-03-
2024-03-
2024-03-1
2024-03-1
2024-03-1
2024-03-11
2024-03-11
2024-03-11
2024-03-11T
2024-03-11T
2024-03-11T
2024-03-11T1
2024-03-11T1
2024-03-11T1
2024-03-11T17
2024-03-11T17
2024-03-11T17
2024-03-11T17:
2024-03-11T17:
2024-03-11T17:
2024-03-11T17:0
2024-03-11T17:0
2024-03-11T17:0
2024-03-11T17:01
2024-03-11T17:01
2024-03-11T17:01
2024-03-11T17:01:
2024-03-11T17:01:
2024-03-11T17:01:
2024-03-11T17:01:1
2024-03-11T17:01:1
2024-03-11T17:01:1
2024-03-11T17:01:17
2024-03-11T17:01:17
2024-03-11T17:01:17
2024-03-11T17:01:17+
2024-03-11T17:01:17+
2024-03-11T17:01:17+
2024-03-11T17:01:17+0
2024-03-11T17:01:17+0
2024-03-11T17:01:17+0
2024-03-11T17:01:17+08
2024-03-11T17:01:17+08
2024-03-11T17:01:17+08
2024-03-11T17:01:17+08:
2024-03-11T17:01:17+08:
2024-03-11T17:01:17+08:
2024-03-11T17:01:17+08:0
2024-03-11T17:01:17+08:0
2024-03-11T17:01:17+08:0
2024-03-11T17:01:17+08:00
2024-03-11T17:01:17+08:00
2024-03-11T17:01:17+08:00
2024-03-11T17:01:17+08:00M
2024-03-11T17:01:17+08:00M
2024-03-11T17:01:17+08:00M
2024-03-11T17:01:17+08:00Mo
2024-03-11T17:01:17+08:00Mo
2024-03-11T17:01:17+08:00Mo
2024-03-11T17:01:17+08:00Mon
2024-03-11T17:01:17+08:00Mon
2024-03-11T17:01:17+08:00Mon
2024-03-11T17:01:17+08:00Mond
2024-03-11T17:01:17+08:00Mond
2024-03-11T17:01:17+08:00Mond
2024-03-11T17:01:17+08:00Monda
2024-03-11T17:01:17+08:00Monda
2024-03-11T17:01:17+08:00Monda
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday
2024-03-11T17:01:17+08:00Monday

When ? tested in termit terminal, the data is read properly like
2024-03-11T17:01:17+08:00Monday

The data is transmitted in stm32
Qt Code:
  1. sprintf(buffer, "%04d-%02d-%02dT%02d:%02d:%02d%+03d:%02d%s\n",
  2. year, month, date, hour, minute, second, zone_hr, zone_min, DAYS_OF_WEEK[dow]);
  3.  
  4. HAL_UART_Transmit(&huart3, buffer, strlen(buffer), 1000);
To copy to clipboard, switch view to plain text mode 




The data is read by qt code
Qt Code:
  1. QStringList bufferSplit = serialBuffer.split("\n");
  2. if(bufferSplit.length() < 3)
  3. {
  4. serialData = serialPort.readAll();
  5. serialBuffer += QString::fromStdString(serialData.toStdString());
  6. }
  7.  
  8. else //bufferSplit[0] is a good value
  9. {
  10. qDebug() << bufferSplit;
  11. serialBuffer = "";
  12. }
  13.  
  14. ui->display_line->append(bufferSplit[0]);
  15.  
  16. }
To copy to clipboard, switch view to plain text mode 


The data is splitted (according to \n) and stored in the buffer to be read.

The bufferlist is below and ? have taken 0. index

QList("2024-03-11T17:01:24+08:00Monday", "2024-03-11T17:01:25+08:00Monday", "")