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.

RE: FlexRay Demo Code CYCS

Other Parts Discussed in Thread: TMS570LC4357

I am also having the CYCS flag issue this post (I think) was originally meant to address. I ported the example code to a TMS570LC4357, enabled VCLKA2 using PLL2 set at 80MHz and it gets stuck waiting for the CYCS interrupt flag (line 378 in FlexRay.c):
while ((Fray_PST->SIR_UN.SIR_UL & 0x4) == 0x0); // wait for CYCS interrupt flag
I have 2 boards with physical layers connected to each other, one running nodeA and the other running nodeB. No joy.
Any help, please?
  • I split from this thread: e2e.ti.com/.../403443

    Because I don't think that the CYCS issue was answered and because you won't likely get a response if you just tack on to an older thread. [better to create a new issue and reference w. a hyperlink the other thread].
  • On a technical side of things - no idea what to suggest based on the info above especially not being an expert in FlexRay.

    If you want to upload your project and explain what the hookup is we could look at it though.
  • FYI, someone on the message board somehow was able to get a message to me asking whether this had ever been resolved. The answer is, not exactly. I commented out the "while" comment mentioned above and things started working. But since I have no idea what the implications of commenting out the while are, I am still nervous about the implementation. Thankfully someone else took over where I left off. I'm pretty sure that particular comment still exists, and have warned the new owner that I'm uncomfortable with the 'fix'.

    Cheers,
    Dan
  • Hi Dan,

    FlexRay has the unique ability to sync up nodes on a network without an external synchronization clock signal.  To do so, it uses 2 special types of frames: Startup Frames and Sync Frames. To start a FlexRay cluster, at least 2 different nodes are required to send startup frames. The action of starting up the FlexRay bus is known as a cold-start and the nodes sending the startup frames are usually known as cold-start nodes. The startup frame is a start trigger which tells all the nodes on the network to start. Make sure the 2 nodes in your setup are both configured as cold-start node.  

    Once the network is started, all nodes must synchronize their internal oscillators to the network's macrotick. This can be done using two or more synchronization nodes. These can be any two separate nodes on the network that pre-designated to broadcast special sync frames when they are first turned on. Other nodes on the network wait for the sync frames to be broadcast, and measure the time between successive broadcasts in order to calibrate their internal clocks to the FlexRay time. Once the network is synced, the network IDLE time is used to adjust the clocks from cycle to cycle to maintain the tight synchronization.


    If your nodes are not synced correctly, or your setup doesn't have enough cold-start node, your nodes will not transmit data properly.

    Please make sure the Interrupt registers (error, status) are enabled.

    Regards,

    QJ