FlexRay Startup/Wakeup
- Updated2023-09-14
- 4 minute(s) read
FlexRay Startup/Wakeup
Use the FlexRay Startup mechanism to take an idle interface and properly integrate into a FlexRay cluster.
If your cluster does not support the wakeup mechanism, this process is straightforward. After creating your FlexRay session, call nxStart, which causes the interface to transition from Default Config to Ready, where it attempts to integrate with the FlexRay cluster. If your node is a coldstart node, it initiates integration; otherwise, it attempts to integrate with a running FlexRay cluster. Once integration has occurred, the interface transitions to Normal Active, where it typically remains while it is communicating with other FlexRay nodes. When you call nxStop, the interface transitions back to Default Config (via Halt) to be ready to start the process again.
If your cluster supports the wakeup mechanism, the process becomes a bit more complex. The route the XNET hardware takes depends on whether the interface is currently awake or asleep. By default, XNET hardware starts in the awake state, and the startup process is exactly the same as if your cluster does not support wakeup. However, to use the wakeup mechanism your cluster is configured for, before calling nxStart, you need to put the interface to sleep. You can do this in one of two ways. First, you can set the Interface:FlexRay:Sleep property to nxFlexRaySleep_LocalSleep. This performs the one-time action of putting the interface to sleep. Alternately,you can set the Interface:FlexRay:Auto Asleep When Stopped? property to true. This puts the interface to sleep immediately. It also puts the interface to sleep automatically every time the interface is stopped, so the startup process is the same between your first start and subsequent starts.
If your interface is asleep when the nxStart API call is invoked, the interface progresses to Ready, where it waits for all connected channels to be awake before attempting to integrate with the cluster. After all connected channels are awake, the integration process occurs exactly like a cluster that does not support wakeup.
If you want your interface to wake up a sleeping network, you must configure your FlexRay interface to wake up the bus. You can do this in two ways. The first way is to set the Interface:FlexRay:Sleep property to nxFlexRaySleep_RemoteWake after you put your FlexRay interface to sleep. When you invoke the nxStart API call, the interface progresses though the Ready state and into the Wakeup state. In Wakeup, the interface generates the wakeup pattern on the FlexRay channel configured by the Interface:FlexRay:Wakeup Channel property and transitions back to Ready. If you have a multichannel bus, a separate node on the bus wakes up the other channel.
After all connected channels are awake, the integration process occurs exactly like a cluster that does not support wakeup. The second way is to invoke the nxStart API call to start the interface. The interface progresses to Ready, where it waits for all connected channels to be awake before attempting to integrate with the cluster. During this time, if you set the Interface:FlexRay:Sleep property to nxFlexRaySleep_RemoteWake, the interface transitions into Wakeup, where it generates the wakeup pattern on the FlexRay channel configured by the Interface:FlexRay:Wakeup Channel property and transitions back to Ready. If you have a multichannel bus, a separate node on the bus wakes up the other channel. After all connected channels are awake, the integration process occurs exactly like a cluster that does not support wakeup.
T# | Condition | From | To |
---|---|---|---|
1 | Start trigger received1 | Default Config | Config2 |
2 | Startup process initiated | Config | Ready |
3 | Remote Wakeup initiated (Interface:FlexRay:Sleep property set to nxFlexRaySleep_RemoteWake) | Ready | Wakeup |
4 | Wakeup channel awake | Wakeup | Ready |
5 | All connected channels are awake and integration is successful 3. | Ready | Normal Active |
6 | Clock Correction Failed counter reached Maximum Without Clock Correction Passive. Value | Normal Active | Normal Passive |
7 | Number of valid correction terms reached the passive to active limit | Normal Passive | Normal Active |
8 |
|
||
9 | Interface stopped (nxStop) | Halt | Default Config |
1 If you are not using synchronization, the nxStart API call internally generates the Start Trigger. 2 In NI-XNET, this is a transitory state under normal situations. The Config state is nontransitory only if the startup procedure fails to continue. 3 Any of the following conditions can satisfy all channels awake: the wakeup pattern was transmitted or received on all connected channels, a local wakeup is requested, or the interface is not asleep. |