cancel
Showing results for 
Search instead for 
Did you mean: 

I have a problem about data shifting and transmit

TKara.2
Associate II

0693W00000Y9NJoQAN.png0693W00000Y9NJjQAN.pngdata needs to be in a row but there is shifting how can i fix this

9 REPLIES 9

Your receiving program is adding the line breaks

Perhaps look at the threshold / reasons there

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Do u have suggestion for debugger I had test several programs and got same results

S.Ma
Principal

How about totally changing the format you want to send data?

Output text which can be logged as Excel CSV format, so you can manipulate strings.

You can send your data in decimal format and use /0x0A /0x0D as string suffix as new CSV line.

It is sending the data, looks to be all of it without missing any.

The breaks look more related to how the terminal synchronizes with the bursts of data as it receives them, and how it determines an end-of-transmission gap.

If you wrote the receiving side application your self, you could synchronize with the starting data pattern, and have expectations about the inter-message gaps.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

No this is the Dwin lcd screen debugger and this screen crashes when data comes

TKara.2
Associate II

0693W00000Y9OYzQAN.png

TKara.2
Associate II

https://drive.google.com/file/d/1XgdyL_Z6iEcCKb7AZE4Rg4BcPWgLLxjb/view?usp=sharing

TKara.2
Associate II

You can see the problem in more detail here, the program crashes due to data shift.

Karl Yamashita
Lead II

From what I see, you're using HAL_UART_Transmit which does not have interrupts. From your latest image it looks like the data is changing so that must mean you have other things going on. If there are other interrupts then they would have priority over the HAL_UART_Transmit. Those interrupts could cause a delay in transmitting the UART data in one continuous stream. Try using HAL_UART_Transmit_IT or HAL_UART_Transmit_DMA instead to see if that helps.

If you find my answers useful, click the accept button so that way others can see the solution.