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.

FlexRay Transfer Unit sample code

Hi.

Could TI please supply me with working sample code for the TMS570 FTU?

I have been working on the FTU for a while now and I can only get it to transfer once to the Communication Controller and after that, further TTCC's are not actioned. There are no further transfers, only buffer 0 transferring from SM to CC. There are no errors flagged and I have exhausted the information in the technical reference manual and the application note.  My code is based on the CCSv5 sample code and adapted to the FTU. The FlexRay bus works fine when there is new data to transmit.

I would appreciate some complete sample code from TI for any transfer method (interrupt, polling or event) for the FTU so I can progress.

Many thanks,

Chris Kosmas.

  • Chris,

    We're checking to see if there are any examples - but there's a good chance you've got everything we have already.

    Are you saying though that you can get everything to work as you need without the FTU but when you add the FTU to replace the processor writing to buffers - only then does the problem occur? That would be important to know. If you haven't gotten your system working with just the processor yet I would be as much concerned that maybe it's an issue on the FlexRay bus as I would be that it's an internal issue with the FTU. Would be good to rule out bus-side issues.
  • Hi Anthony,

    Thanks for the reply. The FlexRay bus works fine. It is based on the TI sample code. Using the processor I can transfer data without issues.
    Once the FTU is used to transfer data, it transfers once and that data makes its way out on to the bus. Subsequent TTCC instructions do not work however (oddly) the corresponding TCCO flag is set but the data does not make its way on to the bus. Reading back the output buffer shows that the data has not actually been transferred to the Communication Controller and the FlexRay bus is transmitting a NULL frame. STXR is being set in the TCR.

    Did you manage to find any sample code?

    Thanks,
    Chris.
  • Chris,

    If you got the code from SPNA145 then I think it's the best we have.


    I would guess that you would be having problems in the section 1.9.2 Event Triggered Transfer as you'd be changing from a CPU trigger to a message transfer based trigger ...  did you already go through everything described in this section?

  • Thanks Anthony.

    The code provided in SPNA145 is incomplete and I would suspect that TI tested it before releasing SPNA145.

    Is the original test code that generated SPNA145 not available?

    Thanks,

    Chris.

  • Hi Chris,

    We checked with the author and he said that this appnote is all he has.

    Probably need to debug the issue via the register bits.

    In your opinion - Is the problem area generally the one that I was asking about (what is described in 1.9.2 Event Triggered Transfer)?
  • Hi Anthony. 

    Thanks for checking with the author.

    I don't think it is section 1.9.2 because we aren't using Event triggers.  We are using manual triggers (1.9.1).

    When a manual trigger is initiated, the TCCO flag is set for that specific buffer indicating that the transfer is complete however the transfer hasn't actually occurred and the bus continues transmitting NULL frames. There is only one transfer that takes place and that transfer is the first transfer. Subsequent transfers do not occur. However, as mentioned above, the TCCO flag is set.  There are also no errors in the relevant registers.

    My software follows the application note examples closely except for the FTU_Multiple_Trigger_TTCC function which is incomplete in the application note but because the first transfer works, I know that I am triggering TTCC0 correctly and my RAM is set up correctly.

    I have been debugging using the registers but I can't understand why the TCCO flag is set for the required buffer yet when I disable the FTU and read the input buffer back, it is clear that the transfer has not occurred.

    We're pretty close to stopping use of the FTU unless we can resolve this.  This compromises our control system if we have to move the data backwards and forwards using the main CPU.

    I'd appreciate your thoughts.

    Regards,

    Chris.

  • Chris.,

    Attached please find is my code to use FTU.

    Regards,

    QJ8358.ftu_node0.c1680.fray.c

  • Hi QJ,

    Many thanks for providing that code.  We unfortunately ran out of time to use the FTU on this phase of the project however we will be targeting it on the next phase.

    Thanks for your efforts.


    Chris.