AnsweredAssumed Answered

[MPC5777M] Flexray Startup Trouble

Question asked by Uma Balakrishnan on Jan 13, 2017
Latest reply on Jan 26, 2017 by Martin Kovar

Hello,

 

We are trying to setup FlexRay communication on the MPC5777M using the EVB.

We are having some trouble with the startup procedure on the FlexRay module. It seems that the protocol does not go beyond the STARTUP state. The module does not seem to receive the startup frames sent to it. There are instances where the startupstate gets stuck on COLDSTART_LISTEN and doesn't budge even when a startup frame is sent from another device.

 

When we put a scope on the TXD, RXD and TXEN lines for Channel A we see that whatever is sent on TXD leaks into the RXD as well. Additionally the RXD is at 3V when idle whereas the TXD and TXDEN are at 5V when idle. These issues vanish when the RXD connection to the transceiver (J27, pin 5-6) is removed. Is this behaviour expected?

 

These are our pin configurations:

        // Channel A

        SIUL2.MSCR_IO[119].B.SSS = 0x05; // PH[7] is TXDA_0
        SIUL2.MSCR_IO[119].B.ODC = 0x02; // Type of output drive control is Push-pull
        SIUL2.MSCR_IO[119].B.OERC = 0x03; // Output impedance is very strong drive (50 ohm/5 ns)
        SIUL2.MSCR_IO[119].B.WPUE = 1u; // Weak Pull up Enable

 

        SIUL2.MSCR_IO[120].B.SSS = 0x05; // PH[8] is TXENA_0
        SIUL2.MSCR_IO[120].B.ODC = 0x02; // Type of output drive control is Push-pull
        SIUL2.MSCR_IO[120].B.OERC = 0x03; // Output impedance is very strong drive (50 ohm/5 ns)
        SIUL2.MSCR_IO[120].B.WPUE = 1u; // Weak Pull up Enable

 

        SIUL2.MSCR_MUX[260].B.SSS = 0x03; // PH[9] is RXDA_0

 

        // Channel B
        SIUL2.MSCR_IO[115].B.SSS = 0x05; // PH[3] is TXDB_0
        SIUL2.MSCR_IO[115].B.ODC = 0x02; // Type of output drive control is Push-pull
        SIUL2.MSCR_IO[115].B.OERC = 0x03; // Output impedance is very strong drive (50 ohm/5 ns)
        SIUL2.MSCR_IO[115].B.WPUE = 1u; // Weak Pull up Enable

 

        SIUL2.MSCR_IO[116].B.SSS = 0x05; // PH[4] is TXENB_0
        SIUL2.MSCR_IO[116].B.ODC = 0x02; // Type of output drive control is Push-pull
        SIUL2.MSCR_IO[116].B.OERC = 0x03; // Output impedance is very strong drive (50 ohm/5 ns)
        SIUL2.MSCR_IO[116].B.WPUE = 1u; // Weak Pull up Enable

 

        SIUL2.MSCR_MUX[261].B.SSS = 0x03; // PH[10] is RXDB_0

Here are the values used for the different parameters during configuration:

Cluster Parameters:

gColdstartAttempts = 10;

gdActionPointOffset = 3;

gdCASRxLowMax = 83;

gdDynamicSlotIdlePhase = 0;

gdIgnoreAfterTx = 0;

gdMinislot = 40;

gdMinislotActionPointOffset = 3;

gdStaticSlot = 50;

gdSymbolWindow = 13;

gdTSSTransmitter = 11;

gdWakeupSymbolRxIdle = 59;

gdWakeupSymbolRxLow = 50;

gdWakeupSymbolRxWindow = 301;

gdWakeupSymbolTxIdle = 180;

gdWakeupSymbolTxLow = 60;

gListenNoise = 2;

gMacroPerCycle = 5000;

gMaxWithoutClockCorrectionFatal = 10;

gMaxWithoutClockCorrectionPassive = 14;

gNumberOfMinislots = 22;

gNumberOfStaticSlots = 60;

gPayloadLengthStatic = 16;

gSyncNodeMax = 5;

gAssumedPrecision = 0;

gClusterDriftDamping = 0;

gdMaxInitializationError = 0;

gdMaxPropagationDelay = 0;

gdMinPropagationDelay = 0;

gdSampleClockPeriod = 0;

gExternOffsetCorrection = 0;

gExternRateCorrection = 0;

gNetworkManagementVectorLength = 2;

gOffsetCorrectionMax = 0;

adOffsetCorrection = 771;

gOffsetCorrectionStart = gMacroPerCycle - adOffsetCorrection;

 

Node parameters:

pAllowHaltDueToClock = FALSE;

pAllowPassiveToActive = 20;

pChannels = FR_CHANNEL_AB;

pdAcceptedStartupRange = 300;

pClusterDriftDamping =1;

pDecodingCorrection 56;

pDelayCompensationA = 1;

pDelayCompensationB = 1;

pdListenTimeout = 401202;

pdMaxDrift = 601;

pExternOffsetCorrection = 0;

pExternRateCorrection = 0;

pKeySlotId = 4;

pKeySlotUsedForStartup = TRUE;

pKeySlotUsedForSync = TRUE;

pLatestTx = 21;

pMacroInitialOffsetA = 5;

pMacroInitialOffsetB = 5;

pMicroInitialOffsetA = 23;

pMicroInitialOffsetB = 23;

pMicroPerCycle = 200000;

pOffsetCorrectionOut = 1201;

pRateCorrectionOut = 601;

pSingleSlotEnabled = FALSE;

pWakeupChannel = FR_CHANNEL_A;

pWakeupPattern = 16;

pdMicrotick = 0;

pMicroPerMacroNom = 40;

pPayloadLengthDynMax = 8;

pSamplesPerMicrotick = 0;

 

Please help us identify the problem.

If you have any example FlexRay code that you can share with us that will be very helpful.

 

Regards,

Uma

Outcomes