Skip to main content
Open topic with navigation

frSetMode

CAPL Functions » FlexRay » frSetMode Valid for: CANoe DE

Function Syntax

Description

This function initializes the FlexRay bus drivers. Essentially, it defines whether the drivers are set to normal mode or sleep mode. Note: If the transceivers had been disabled (sleep mode), and a wake-up pattern is received (see on frPocState), then the transceivers must explicitly be activated again!

Parameters

  • channel: FlexRay channel (cluster number).
  • channelMask: Determines which bus driver is being programmed.
    Value:
    • 1: Channel A
    • 2: Channel B
    • 3: Channel A+B
  • mode: Defines the bus driver state:
    • 0x0000: Normal mode, when starting the Communication Controller a Wakeup will be sent if this is defined in the hardware configuration dialog.
    • 0x0001: Sleep mode
    • 0x0002: Normal mode, when starting the Communication Controller no Wakeup will be sent.

Return Values

Example

Example 1: The following CAPL program deactivates or activates the physical drivers according to key presses.
Example 2: The following CAPL program deactivates or activates the physical drivers according to the clusters synchronisation state and reception of a wake-up symbol.