This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am using Tiva C Series TM4C123GH6PM with Code Composer Studio for transmitting data from MCU#1 to MCU#2 . I am sending data in form of frames. The data sent from the TM4c123GH6PM will be serialized. It means that MCU#1 sends data-frames in form of bytes to MCU#2. After intensive tests, I noticed that some bytes are lost. For example, I send repeatedly a frame of the following form :
header (#), double 30 , Terminator ('\0')
The Bytes of double is 30:0,0,0,0,0,0,94,64 and I only get the following Bytes: 0,0,0,0,0,94. The two MCU´s are connected by cables and they use uart to communicate between them. Here is the whole code for sending:
First question: I want to ask why some bytes are lost, since I am using cables?
second question: I know that there is some reconstruction algorithms for erasure canals. But I think that it is two complicated for my case, since I will tranfer data in the air (in worst case). How can I resolve the problem of loosing data? I can use CRC-Algorithm but it is intented for detecting error-transmission. It will not resolve my problem.
Edit: I put an old version of code responsible for receiving the data from MCU#1. Now I put the last version of my code that can be compiled. Like I said, I am losing some bytes, when I am transmitting data from MCU#1 to MCU#2. The frequency that I am using is 50MHZ. I need to transfer my data from MCU#2 to computer, so I cannot allow to lose data between MCU#1 and MCU#2.
My main question: How can I solve the problem of losing bytes?
-->My code is too simple. I avoided to use complicated expressions. But I still lose my data
@Amit Ashara do you mean reducing baudrate?
@Robert Adsett72 I am using UART0 to resend my data from MCU#2 to PC. I will use it, when I am sure that I am receiving whole the data I need.
@Amit Ashara what do you suggest to use for testing the data-transfer?
Jo my said:I am using UART0 to resend my data from MCU#2 to PC. I will use it, when I am sure that I am receiving whole the data I need.
It appears you are already using it (unless your prints are directed elsewhere).
Robert