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?