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.

TMS 570LS20216 Flex Ray. Sometimes doesn't signal that new data is received.

Other Parts Discussed in Thread: TMS570LS1115

Hello

In our application we are using TMS 570 LS20216 MCU. 

The main issue is sometimes the flag  NDAT1/2/3/4 [offset_CC = 0x33C] [offset_CC = 0x338]  [offset_CC = 0x334] [offset_CC = 0x330]

  is not set, so we cannot receive data.  Mentioned issue is happening every 5 – 30 received data.

We are not using interrupts for receiving data.

It was verified that data are on the flex ray bus.  

We are using Flex Ray TJA1082 FlexRay node Tranceiver.

Generally we are not controlling errors between MCU and transceiver (TJA1082).

Any help is appreciated.

Marcin.

  • Hi Marcin,
    We have received your question. I'm not an expert in Flexray and I will find the SME who might be able to assist you. In the meantime, can you check the MHDS (Message Handler Status) register and what does it say? Did the incoming message pass the filtering configuration? Are you receiving a null frame for which the ND flag will not set? Please also check TEIF register for any transfer error flag set.
  • OK... we have tried to collect additional information.

    > In the meantime, can you check the MHDS (Message Handler Status) register and what does it say?

    example MHDS  - 0x1c000000 / it  informs  about data which we already properly received. There is no "new" expected data handling.

    >Did the incoming message pass the filtering configuration?

    yes, receiving data pass the filtering. Only sometimas we didn't receive data.

    > Are you receiving a null frame for which the ND flag will not set?

    We didn't receiving null frame data. Data doesn't pass the filtering.

    >Please also check TEIF register for any transfer error flag set.

    TEIF - 0x00000000 always (it doesn't matter if we are receiving data or not).

    We also have tried to colllect data, even there is no NDAT1,2,3,4  flag, unfortunatelly the data was not valid (we've  collected old data).

  • Hi Marcin,
    The person who is most familiar with the Flexray is out of office until end of the month. Perhaps the below post can provide some hints for you to check. In this post, the person seems to have the same issue as you described. He said that after he clears the message RAM then it is ok. Please give it a try and see if that makes a difference for you.

    e2e.ti.com/.../393447
  • Hi  Charles Tsai

    ...

    so we've tried to clear massage rams before initialization of buffers and it didn’t improve anything.
    We can’t afford to clear rams every time we expect new message because we also have transmissions on many other buffers.

    regards Marcin.

  • During further investigation we've  realized that the had status

    Error Interrupt Register (EIR).IOBA =1  which means

    "Illegal Output buffer Access. This flag is set by the communication controller

    when the Host requests the transfer of a message buffer from the Message

    RAM to the Output Buffer while OBCR.OBSYS is set to ’1’."

    Before we want to handle the data  we are checking the  whether OBCR. obsys ==1.

    Marcin.

  • Hi Marcin,

     Sorry that we couldn't get back withyou in time on your question as our Flexray expert will not be back in office until e/o the month. I'm glad you are able to make much progress on your own. You observation seems to make sense. I did some reading on the userguide and it confirms your observation that you need to wait until the message transfer from the message RAM to the Output Buffer is complete by waiting for the OBCR.OBSYS  to reset. 

    Example of an 8/16/32-bit host access to a single message buffer:

    If a single message buffer has to be read out, two separate write accesses to OBCR.REQ and

    OBCR.VIEW are necessary:

    • Wait until OBCR.OBSYS is reset

    • Write Output Buffer Command Mask OBCM.RHSS, OBCM.RDSS

    • Request transfer of message buffer to OBF Shadow by writing OBCR.OBRS(6-0) and OBCR.REQ (in

    case of and 8-bit Host interface, OBCR.OBRS(6-0) has to be written before OBCR.REQ).

    • Wait until OBCR.OBSYS is reset

    • Toggle OBF Shadow and OBF Host by writing OBCR.VIEW = 1

    • Read out transferred message buffer by reading RDDSn, RDHS1,2,3, and MBS

    Example of an 8/16/32-bit host access sequence:

    Request transfer of 1st message buffer to OBF shadow

    • Wait until OBCR.OBSYS is reset

    • Write Output Buffer Command Mask OBCM.RHSS, OBCM.RDSS for 1st message buffer

    • Request transfer of 1st message buffer to OBF Shadow by writing OBCR.OBRS(6-0) and OBCR.REQ

    (in case of an 8-bit Host interface, OBCR.OBRS(6-0) has to be written before OBCR.REQ).

    Toggle OBF Shadow and OBF Host to read out 1st transferred message buffer and request transfer of

    2nd message buffer:

    Request transfer of 2nd message buffer to OBF shadow, read out 1st message buffer from OBF host

    • Wait until OBCR.OBSYS is reset

    • Write Output Buffer Command Mask OBCM.RHSS, OBCM.RDSS for 2nd message buffer

    • Toggle OBF Shadow and OBF Host and start transfer of 2nd message buffer to OBF Shadow

    simultaneously by writing OBCR.OBRS(6-0) of 2nd message buffer, OBCR.REQ, and OBCR.VIEW (in

    case of and 8-bit Host interface, OBCR.OBRS(6-0) has to be written before OBCR.REQ and

    OBCR.VIEW).

    • Read out 1st transferred message buffer by reading RDDSn, RDHS13, and MBS

  • Hello Charles,

    I suppose we've  manage this .... the reson was that we've waited OBCR.OBSYS  after OBCR.VIEW,    but it should be waited  after  OBCR.REQ.

    Now we ary trying to verify it. Thank  you, for your support. 

    Regards,

    Marcin.

     

  • Hello,

    I'm sorry to hi-jack this post. But I am checking about Flexray communication at the moment. I have tried to run the example flexray application in TMS570LS1115.

    I would like to know whether we need to do any configuration in the TJA1082 chip in order to make this working. Because in my application I cannot see any Flexray bus activity when I check using a scope.

    Any help would be greatly appreciated regarding this implementation.

    Thank you.