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.
Hello
I trying run flexray example on Launchxl2-50lc43. I download flexray example fo tms570ls31 ->FlexRay_Communication_CCSv5. I read that TMS570LS31 has same register for flexray with TMS570LC43. I have problem with writing register SUCC1 in Fr_ControllerInit function. I want write some configuration in SUCC1 register but every time was PBSY flag set to busy and program stop on red marked line. I have no idea where is problem.
int Fr_ControllerInit(FRAY_ST *Fray_PST)
{
unsigned int error=0;
// write SUCC1 configuration
Fray_PST->SUCC1_UN.SUCC1_UL = 0x0F1FFB00 | CMD_CONFIG;
// Check if POC has accepted last command
if ((Fray_PST->SUCC1_UN.SUCC1_UL & 0xF) == 0x0) return 1;
// Wait for PBSY bit to clear - POC not busy
while ((Fray_PST->SUCC1_UN.SUCC1_UL & 0x00000080) != 0x0);
// unlock CONFIG and enter READY state
Fray_PST->LCK_UN.LCK_ST.clk_B8=0xCE;
Fray_PST->LCK_UN.LCK_ST.clk_B8=0x31;
// write SUCC1 configuration
Fray_PST->SUCC1_UN.SUCC1_ST.cmd_B4=(0xFB00 | CMD_READY);
// Check if POC has accepted last command
if ((Fray_PST->SUCC1_UN.SUCC1_UL & 0xF) == 0x0) error = 1;
// Wait for PBSY bit to clear - POC not busy
while ((Fray_PST->SUCC1_UN.SUCC1_UL & 0x00000080) != 0x0);
return error;
}