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.

TMS570MDK FlexRay ---wakeup Pattern

I used the two node example for TMS570 MDK to develop an application and met some questions that I cann't solve. I would appreciate if anyone could give answers or suggestions.

Here is the question I met:

1.  According to the configuration in the example, pMicroPerCycle=24000d,  bit rate=10Mbit/s(PRTC1.BPR[2]=0X0), namely 4uT=100ns, thus the cycle length should be  5.6ms. However, the actually cycle length I test is 56ms.    Why?

2. According to user's manual,

Wakeup procedure controlled by host (single-channel wakeup):
• Configure the communication controller in CONFIG state
– Select wakeup channel by programming bit SUCC1.WUCS
• Check local BDs whether a WUP was received   
• Activate BD of selected wakeup channel
• Command communication controller to enter READY state
• Command communication controller to start wakeup on the configured channel by writing
SUCC1.CMD(3-0) = 0011
– communication controller enters WAKEUP_LISTEN
– communication controller returns to READY state and signals status of wakeup attempt to host
• Wait predefined time to allow the other nodes to wakeup and configure themselves
• Coldstart node:
– in dual channel cluster wait for WUP on the other channel
– Reset Coldstart Inhibit flag CCSV.CSI by writing SUCC1.CMD(3-0) = 1001 (ALLOW_COLDSTART
command)
• Command communication controller to enter startup by writing SUCC1.CMD(3-0) = 0100 (RUN
command)

 However, the exmple do not container any wakeup process before startup, why?

3. I code to transimit wakeup pattern as following:

    // node A has been configured to send wakeup pattern in channel A

    if (( Fray_PST->SIR_UN.SIR_UL & 0X00010000) != 0 ) return 1;  // check if any wakeup pattern was received in channel A, if not , node A send wakeup Pattern

    while( (Fray_PST->SUCC1_UN.SUCC1_UL & 0X00000080) != 0); // check if POC not busy

    Fray_PST->SUCC1_UN.SUCC1_ST.cmd_B4 = ( 0xFB00 | CMD_READY);  // communication controller enters READY state

   if (( Fray_PST->SUCC1_UN.SUCC1_UL & 0XF) == 0 ) return 1;  // check if POC has accepted last command

   while( (Fray_PST->SUCC1_UN.SUCC1_UL & 0X00000080) != 0); // test if POC not busy

   Fray_PST->SUCC1_UN.SUCC1_ST.cmd_B4 = CMD_WAKEUP;  // send wakeup pattern

   while (( Fray_PST->SIR_UN.SIR_UL & 0X01000000) == 0 ) ; //wait for wakeup pattern in channel B from Node B  --- here, node B sends wakeup pattern

  

Question:  node A cann't accept wakeup pattern in channel B which is absolutely  sent out by Node B.  The SIR_UN.WUPB never change even if wakeup pattern has been sent in channel B by Node B.  Why?

4. register bits CCSV.POCS[0..6] are supporsed to Indicate the state of POC. However, according to my code, I cann't see their change during the wakeup path. Why?

   

  • Hi,

    One of our flexray experts will get back to you on this.
  • Hi,

    I just noticed that both of our Flexray experts are currently out of office.

    So please expect some delay(Mostly by early next week). Thank you for your understanding.
  • Hi,

    Another important question. For TMS570 MDK, the test executed code (.out) is generally loaded into flash and running there for debug operations. Considering the life span of flash, it would be better if I could load and debug the executed code in RAM.  I would appreciate if you could tell me how to load the .out file into ram and debug there.

    Thank you very much and waiting for your feedbacks.

    Best Regards,

    Liu, Xuan

    1. pMicroPerCycle = 224000d = 36B00h. If BRP=0h, the 1uT=25ns, so the communication cycle is: 224000*25=5600000ns=5.6ms. Please make sure the gtu1 is 0x00036B00. Can you please show us the plot which consists of at least 1 whole cycle?

    2. You are right, the sample code doesn’t include wakeup initiation. The sample code assumes all nodes are awake, and communication controller enters the Startup state from the Ready state immediately.

    3. What is your Wakeup channel selected in SUCC1 register setting? Did you check SUCC1 after you sending WAKEUP Command to see if POC has accepted the WakeUp command. Did you probe the bus to make sure the WUP has been sent out?

    4. The status interrupt register (wakeup pattern channel bits) should be enabled

    Regards,

    QJ

  • QJ,

     Thank you for your response.

     The attatched pictures are the singles I probed on the transition line, including the cycle, bit length, configuration and wakeup pattern

    I am wondering why the cycle length is as ten times long as I expected.

    Waiting for your response

    Best Regards,

    Liu Xuan

  • Hi Liu,

    I just measured the cycle time, and static slot time. They are correct. The cycle time is 5.6ms, and static slot is 85us. The first picture below is for cycle time measurement, and the 2nd one is for static slot. I used the same configuration data as yours.

    7455.Doc2.docx

    Regards,

    QJ