Hello,
Yes, you need to give more information on this topic. Are you using interruptions ? Are you using polling ? Are you using DMA ? How do you perform the 1s timing ? And also, on the PC side, what do you use to display the incoming data on the serial link. Depending on the software you have on the PC, it can also explain such random feature. The fact is that you need any kind of protocole or oscilloscope on the line to understand where the pb lies (in the STM32 software or in the PC).