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.

Overlapping data(?) on SCIB

Other Parts Discussed in Thread: SN65HVD72

Hi,

I'm using SCIB to communicate by RS485 ( Using a SN65HVD72 transceiver) with other devices (Baud 115200)

The f28377S sends a request message ( 01 d0 10 01 01 c0 04) and the device responds withs a 7 byte message ( start, ID, v1, v2, c1, c2, end)


I have a interrupt that sends the request and a interrupt to read the data. The data is processed  in another function outside of the interrupt.

The problem is that, when i try to increase the speed ( for example send requests each 2ms ) the data that i receive gets distorted.

I have rs485 converter connected to the same bus, and the data is received correctly there. I have a termination resistor (120ohms) on each side of the bus.

Any idea about what could be the problem ? or had any similar problem?

Thank you all.

Best Regards

Bruno

  • Bruno,

    Sending these messages every 2ms should be OK. A few questions below.

    1.Are you using the TX FIFO?
    2.Is there any transmit delay?(check FFTXDLY) 
    3.Can you verify  what is being transmitted with an oscilloscope?

    Regards,
    Cody

  • Hello Cody,

    Thanks for the reply.

    1. No. I have the SCIBRX interrupt but i read the values for a array i created

    2. I dont have any transmit delay. The only thing i have is first set a control bit at 1 so the transceiver enter in send mode and then send the data byte by byte.

    3. I'll try that. But as i said, with the RS485 connected to the bus i could watch the data being sent from one side to the other.

    Thanks

    Regards,

    Bruno

  • Bruno,

    I think I may have misunderstood your problem the first time I read it, please confirm if my current understanding is correct.

    The data sent by the F28377S is received correctly by the other devices.

    The second device replies with a 7 byte message of the following format ( start, ID, v1, v2, c1, c2, end).

    You believe that the reply is transmitted correctly because you have a 3rd node that can correctly receive the data.

    The problem is that the F28377S does not correctly receive the message sent by the second device.

    --How is the data being "distorted"? Could you show an example message and what is received by the F28377S?

    --Are any error flags being set?

    Regards,
    Cody

  • Cody,

    Yes, you understood it correctly.

    One of the examples of distorted data was the first byte, instead of 01 a got 5F or any random value and the correct message afterwards.

    The only error flag was one i had to check if the v1 v2 value was correct.

    Thanks.

    Regards,

    Bruno

  • Bruno,

    I am hoping that the way the data is getting distorted will give us some clues to how it is failing, here are a few questions that may help us find the answer.

    Is it always the first byte that gets distorted?

    Does more than one byte ever get distorted?

    In the example you have shown bits only flip from 0 to 1 are there any cases where bits flip from 1 to 0?

    Are you using the parity bit? Does the parity of any message change? If so we should see an error flag(unless the parity bit flipped too).

    Are there any sources of noise near the F28377S?
              -Have you verified that a clean signal reaches the SCI pin on the device?

    Finally, what was the name of the error flag?


    Regards,
    Cody

  • Cody,

    Ill try to replicate the failure to see if i can provide you accurate data.

    As far as i noticed, only the first byte gets distorted, but when the begin of the message changes the rest can't be used because it doesn't receive the of message byte in the right position.
    Yes, this is placed near a SMPS. All the data wires are twisted pair. I intend to place the control further away from the power and only send one shielded cable with all the signals needed.

    The error flag is not from the system. It was just a flag for me to know when the received values wasn't correct ( withing certain value range )

    As soon as i have further information ill update this.

    Thank you.

    Regards,
    Bruno
  • Bruno,

    Have you made any progress on this? Have you solved the problem? If so can we close this post?

    Regards,
    Cody

  • Hello Cody,

    For the time being i'm sendind chat by char instead fo send the whole string.

    During the next weeks i should be gettingback to that. If i have any progress ill post.

    Thank you.

    Best regards