Hi all,
after I received such a great and quick help to my FEC configuration problem I thought that someone might also help my with an other issue.
For some experimental testing I need to set up the FlexRay CC of the MPC5777M microcontroller to have a simple communication between two nodes. As the MPC5777M has two FlexRay CCs I thought it would be possible to let them communicate with each other. However, during the configuration of the first CC i was running into the issue that the CC doesn't leave the POC:config state. I configure it according to the Chapter 54.8.2.2 (Protocol Initialization) of the reference manual. First I initialize the FlexRay module and set up the pads. Than I issue command CONFIG, which is accepted by the CC, so I am able to set all protocol parameters within the PCR0,...,PCR30 registers. Afterwards I configure the message buffers and the fifos and issue command READY, but the microcontroller hangs up while waiting for the POC state to change to the POC:ready state. In my opinion there is something with my bessage buffer and fifo configuration. At the moment the configuration looks like follows:
//MSG buffer config
FR_0.MBSSUTR.B.LAST_MB_SEG1 = 2;
FR_0.MBSSUTR.B.LAST_MB_UTIL = 4;
FR_0.MBDSR.B.MBSEG1DS = FR_0.PCR19.B.payload_length_static;
FR_0.MBDSR.B.MBSEG2DS = FR_0.PCR24.B.max_payload_length_dynamic;
FR_0.MB[0].CCSR.B.MTD = 1; // 1 = transmit, 0 = receive
FR_0.MB[0].CCSR.B.EDS = 1; // 1 = enabled, 2 = disabled
FR_0.MB[0].CCFR.B.CHA = 1; // Channel A enabled
FR_0.MB[0].CCFR.B.CHB = 0; // Channel B disabled
FR_0.MB[0].FIDR.B.FID = 8;
FR_0.MB[0].IDXR.B.MBIDX = 0;
//FIFO config
FR_0.RFWMSR.R = 0x0000;
FR_0.RFSIR.R = 14; //
FR_0.RFDSR.R = 0x0111; //depth = 1, entry_size = 17
FR_0.RFMIDAFMR.R = 0xFFFF; //acceptance mask for message id filtering
Hopefully, someone has an idea what is going wrong within my configuration.
Best regards,
Efim