Hello,
i am just working on a little FlexRay project and I want to use it in loop back mode. By now I was not able to get my TMS570LS3137HDK in run in loop back mode. I use CCSv5.2.100018 IDE.
the following code shows my initialisation:
int node_all_init(FRAY_ST*Fray_PST)
{
/***** Configure all the necessary registers *****/
configure_all_registers(FRAY1);
/***** Configure the buffers *****/
configure_all_buffers(FRAY1);
/******** Enter CONFIG POC State ********/
if(config_chi_cmd(CMD_CONFIG, FRAY1)) return 1;
//enter loop back
FRAY1->LCK_UN.LCK_ST.tmk_B8 = 0x75;
FRAY1->LCK_UN.LCK_ST.tmk_B8 = 0x8A;
FRAY1->TEST1_UN.TEST1_ST.wrten_B1 = 0x1; //write enable
//config_chi_cmd(CMD_LOOPBACK, FRAY1);
FRAY1->SUCC1_UN.SUCC1_ST.cmd_B4 = 0xF; //CMD(3-0) = 0xF > Loopback mode
while (FRAY1->SUCC1_UN.SUCC1_ST.pbsy_B1 != 0x0 ); // wait until command is executed
FRAY1->TEST1_UN.TEST1_ST.elbe_B1 = 0; //internal loopback
// write key to leave CONFIG POC state/
config_unlock_key(FRAY1);
/******** Enter READY POC State ********/
if(config_chi_cmd(CMD_READY, FRAY1)) return 1;
/******** Enter ALLOW_COLDSTART POC State ********/
if(config_chi_cmd(CMD_ALLOW_COLDSTART, FRAY1)) return 1;
/******** Enter RUN POC State ********/
if(config_chi_cmd(CMD_RUN, FRAY1)) return 1;
return 0;
}
Thanks
Christian