[MPC5777M] Flexray Startup Trouble

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[MPC5777M] Flexray Startup Trouble

2,982 Views
umabk
Contributor III

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

Labels (1)
11 Replies

2,334 Views
Deepak1
Contributor IV

Hi Everyone,

I am also stuck at the scenario that was raised by @Uma Balakrishnan. I also would like to know the solution provided for this.

Thanks !

0 Kudos
Reply

2,334 Views
957263248
Contributor II

Hi I am a postgraduate,and I am plan to initialize flexray module on MPC5744p. I want to know if I can take your flexray code on 5777 as reference?  thank you

0 Kudos
Reply

2,334 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

I sent your question to our application team. I will write you back as soon as I have any information for you.

Regards,

Martin

0 Kudos
Reply

2,334 Views
umabk
Contributor III

Thanks, Martin.

Looking forward to your response.

Regards,

Uma

2,334 Views
martin_kovar
NXP Employee
NXP Employee

Hello Uma,

could you please write me back your clock settings?

Which cut of microcontroller and which cut of EVB you use?

Regards,

Martin

0 Kudos
Reply

2,334 Views
umabk
Contributor III

Hi Martin,

We are using the MPC5777M_512DS with the MPC57xxMB.

Our clock settings are:

MC_CGM.AC2_DC0.B.DE = 1u;
MC_CGM.AC2_DC0.B.DIV = 9u;

FR_0.MCR.B.CLKSEL = 1u.

(PLL0_PHI = 400MHz)

We also tried with

MC_CGM.AC2_DC0.B.DE = 0u;

0 Kudos
Reply

2,334 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

if you derive FlexRay clock from PLL, FlexRay clock must be set to 80MHz. You set the clock in your code to 40MHz. Use MC_CGM.AC2_DC0.B.DIV = 4u; (400MHz/(4+1)), instead of MC_CGM.AC2_DC0.B.DIV = 9u;

Regards,

Martin

0 Kudos
Reply

2,334 Views
umabk
Contributor III

Thanks for the response Martin. We changed the settings as you mentioned. Unfortunately this did not help.

We are still facing the issues as before. The Flexray node fails to startup.

Please let us know if there's anything else we can try.

Regards,

Uma

0 Kudos
Reply

2,334 Views
martin_kovar
NXP Employee
NXP Employee

Hello Uma,

this thread is duplication of Service Request 2-5010645786 created by Daniel Wax, so application team closed my service request and they will continue with solving this issue in original service request (2-5010645786).

Regards,

Martin

0 Kudos
Reply

2,334 Views
umabk
Contributor III

Hi Martin,

Thanks for letting me know. Can you tell me if (and how) I can access the duplicate issue you are referring to?

Regards,

Uma

0 Kudos
Reply

2,334 Views
martin_kovar
NXP Employee
NXP Employee

Hello Uma,

unfortunately, you do not have direct access to this Service Request. Please contact your NXP representative (FAE).

Regards,

Martin