Hi,
I am using DEVKIT MPC5748G development Board for FlexRay driver development and IDE is S32 DS for power architecture V2.1.
I am facing some trouble with the startup procedure on the FlexRay module as the start up state is not reaching to POC:normal active state. I observed after wakeup procedure the start up state is POC:coldstart listen and after sending POC command ALLOW_COLDSTART and then starting communication with RUN command startup state is changed to POC:integration listen state and not changing from that.
I
Please suggest your inputs in this regards.
I configured Node as a cold start node. I assume controller will send CAS collision avoidance symbol when there is no communication.
Here I have attached clock configuration file cpu.c. I configured FlexRay clock as 80MHz.
I have attached "Fr_Test.c" file which contains the sequence of start up procedure.
I have attached "FlexRay_parameters" file which contains the FlexRay parameter configuration
Below code is FlexRay pins configuration,
/* Output Buffer Enable on */
SIUL2.MSCR[37].B.OBE = 1;
/* Input Buffer Enable off */
SIUL2.MSCR[37].B.IBE = 0;
/* PC[5]: Pin functionality as FR_A_TX */
SIUL2.MSCR[37].B.SSS = 4;
/* Maximum slew rate */
SIUL2.MSCR[37].B.SRC = 3;
/* Output Buffer Enable on */
SIUL2.MSCR[66].B.OBE = 1;
/* Input Buffer Enable off */
SIUL2.MSCR[66].B.IBE = 0;
/* PE[2]: Pin functionality as FR_A_TX_EN */
SIUL2.MSCR[66].B.SSS = 2;
/* Maximum slew rate */
SIUL2.MSCR[66].B.SRC = 3;
/* Output Buffer Enable on */
SIUL2.MSCR[67].B.OBE = 0;
/* Input Buffer Enable off */
SIUL2.MSCR[67].B.IBE = 1;
/* PE[3]: Pin functionality as FR_A_RX */
SIUL2.IMCR[224].B.SSS = 1;
/* Maximum slew rate */
SIUL2.MSCR[67].B.SRC = 3;
Hi Likas,
Now I can See POC state as NORMAL ACTIVE.
But when I click on "Resume or F8" I can see few of the Protocol Configuration Register (PCR0 to PC5) are set with 0x0000. See below image 1.
If I perform "Single Step (F5)" debugging I can see these PCR are updating with required values.See below image 2.
Do I need to give some delay before configuring this Protocol Configuration Register?
IMAGE 1 :
POC State :
IMAGE 2 :
Hi Lukas,
Here i have attached register values. Hope you will be able to see the required registers values.
I exported register values after POC struck in Integration Listen state.
Now i have updated Node 2 Key Slot with 2 only rest of the software is same. This is just to check start up procedure and node to be reach in Normal Active state.
Hi Lukas,
Here i have attached both nodes registers configuration files (Node_1_Registers and Node_2_Registers). I exported register values after POC struck in Integration Listen state. I dont know in which format it is to be saved. So I exported from "EmbSys Registers tab" and saved as it is. I am able to open this file in Notepad++. Let me know if you need in another format.
I am not using any logic analyzer. I have connected two nodes by twisted pair cable. Just to check weather POC state is changed to NORMAL ACTIVE or not.
Like,
Node 1 FRA-DATA-A to Node 2 FRA-DATA-A
and
Node 1 FRA-DATA-B to Node 2 FRA-DATA-B
Just for your information I have flashed same software in both nodes this is just to check initial startup procedure.
Could you try to export the registers in some different way? Most of the values are not visible, there are just "????".
One one more note - there can't be identical software in both nodes. Startup and synchronization frame must be in different slot.
Regards,
Lukas
Hi,
Now i have connected two nodes but still startup state is not changing from POC:integration listen state to POC:normal active.
My application is non AUTOSAR. So i could not integrate available MCAL.
Any suggestions ?
Hi Deepak,
could you share configuration (registers dump) of both nodes? Do you have a logic analyzer to catch the communication between the nodes?
Regards,
Lukas
Hi,
Yes I am using only one node.
But another observation is after starting communication (RUN command) the cycle counter is 0. So cycle counter value will increment once another node sends start up frames ?? My understanding is after RUN command cycle counter will start increment.
Also after sending POC command WAKEUP the PROTSTATE is not changing to POC:wakeup (010 ) it remains in READY state. Below images of are taken immediate after sending WAKEUP command. I assume that communication controller process WAKEUP command very fast and updates READY state before it display on peripheral registers in the EmbSysReg tab.
Also with reference to below diagram for leading cold start node start up states will be,
READY -> COLDSTART LISTEN -> COLDSTART COLLISION RESOLUTION
But with one node after sending POC Command : ALLOW_COLDSTART (0000) i can see it as,
READY -> INTEGRATION LISTEN
Before POC Command : ALLOW_COLDSTART (0000)
The POC state is in READY and Start up state is 0x00
After POC Command : ALLOW_COLDSTART (0000)
After this command giving some Delay and starting communication with RUN command the startup state immediately changed to INTEGRATION LISTEN.
So all above observations will get resolved after integrating with another node ??
Hi Deepak,
after short discussion with FlexRay expert, it looks like there's only one node. FlexRay system needs at least two nodes to have each node move into normal active state. With just one node and an oscilloscope you will be able to see the node sending several startup frames, but nothing more.
And as already mentioned in our previous communication, our strong recommendation is to use MCAL drivers which are free of charge in case of MPC57xx devices or third party drivers like from Vector.
AUTOSAR Software Architecture | NXP
Regards,
Lukas