This page is generated automatically by docgen.c and is valid for version v0.2-212-g3ade0d4

adcread

Read values from ADC inputs

Command syntax

 adcread

Description

This command reads values corresponding to analog voltages on ADC inputs 1-12 and prints them as decimal numbers as well as converted to Volts.

Example

 --> adcread
 ADC1  2332 lsb ~ 11.66 V
 ADC2   107 lsb ~  0.54 V
 ADC3   108 lsb ~  0.54 V
 ADC4   107 lsb ~  0.54 V
 ADC5   108 lsb ~  0.54 V
 ADC6   111 lsb ~  0.56 V
 ADC7   110 lsb ~  0.55 V
 ADC8   109 lsb ~  0.55 V
 ADC9   107 lsb ~  0.54 V
 ADC10  107 lsb ~  0.54 V
 ADC11  110 lsb ~  0.55 V
 ADC12  108 lsb ~  0.54 V

adcread*

Read a value from a single ADC input

Command syntax

adcread<PIN>

where <PIN> is a number in range 1 - 12.

Description

This command reads the value corresponding to analog voltage on an ADC input and prints it as decimal numbers as well as converted to Volts.

Example

--> adcread1
ADC1  2331 lsb ~ 11.66 V

adcwatch

Watch the values from ADC inputs

Command syntax

adcwatch

Description

This command reads values corresponding to analog voltages on ADC inputs 1-12 10 times per second and prints them as decimal numbers (in lsb units) as well as converted to Volts. The command is ended by any key.

Example

--> adcwatch
ADC Inputs Test [1-12]:
=======================================================================
    1     2     3     4     5     6     7     8     9    10    11    12
 2331   107   108   106   107   110   110   109   107   107   110   109 lsb
11.66  0.54  0.54  0.53  0.54  0.55  0.55  0.55  0.54  0.54  0.55  0.55 V

canbaudrate#

Change baudrate of CAN controller

Command syntax

canbaudrate<CONTROLLER>?
canbaudrate<CONTROLLER>:<BAUDRATE>

where <CONTROLLER> is number in range 1-3 and BAUDRATE is number in range 1000-10000000 specifying the baurdate in bits per second.

Description

This command is used to set or show the baudrate of a CAN controller. The baudrate shown is the one which will be used by next invocation of the caninit command.

Examples

--> canbaudrate2?
canbaudrate2=500000

--> canbaudrate2:100000

candump

Dump all messages received over CAN

Command syntax

candump <CONTROLLER>

where <CONTROLLER> is a number in range 1-3.

Description

This command prints out all CAN messages received via the specified controller.

IDs are zero-filled to length 3 if a message in the standard frame format is received and to 8 for extended frame format messages.

caninit must be called before using this command.

Example

--> candump 2

can2 0000FADE [2] 12 34

caninit

Initialize CAN controllers

Command syntax

caninit

Description

This command (re-)initializes all CAN controllers using current CAN configuration. This configuration can be changed using canbaudrate command.

In the default configuration the baudrate of all CAN controllers i set to 500 kbit/s.

Example

--> caninit

cansend

Test sending message over CAN

Command syntax

cansend <CONTROLLER> <ID> <DATA>

where <CONTROLLER> is number in range 1-3, <ID> is a valid CAN ID and <DATA> is 0-8 bytes of data in hexadecimal representation. There may be any number of spaces between the data bytes. <ID> may be given in octal, decimal or hexadecimal base.

Description

This command sends a CAN frame using specified CAN controller.

The caninit command must be called before using this command.

Example

--> cansend 2 0x123 DEAD BEEF
Sent: can2      123     [4]     DE AD BE EF

cantest*

Test CAN loopback between two CAN interfaces

Command syntax

cantest<SRC> <DST>

where <SRC> and <DST> are different numbers in range 1-3.

Description

This command tests CAN communication by sending and receiving messages through external loopback. At the beginning, the involved CAN controller are initialized to the Bus-On state.

The command sends 100 messages and measures the numbers of TX errors, RX errors and detected timeouts. At the end, these statistics are printed as well as the status of the involved CAN controllers.

When an error is detected during the test, the status of faulty CAN controller is printed immediately.

Example

--> cantest1 2
Testing CAN loopback
Messages transmitted: 100/100
Messages received: 100/100
TX timeouts: 0
RX timeouts: 0
Src TX error counter: 0
Src RX error counter: 0
Dst TX error counter: 0
Dst RX error counter: 0
CAN1 status: Bus-On, ES: 0x8
CAN2 status: Bus-On, ES: 0x10

dacpinenable*

Enable or disable a DAC pin

Command syntax

dacpinenable<PIN> <VALUE>

where

Description

Command for enabling or disabling of a DAC pin.

Command always prints the actual state of the selected pin.

Example

--> dacpinenable1 1
dacpinenable1=1

Enables pin DAC1 and prints its actual state (which will be 1)

dacpinval*

Set raw value of a DAC register

Command syntax

dacpinval<PIN> <VALUE>

where

Description

This command writes a raw value to DAC register that controls the DAC output voltage according to the formula described in the datasheet. <PIN> parameter selects which DAC pin to use.

Command always prints the written raw value of the selected pin. There is no way how to read the value out of the register.

Example

--> dacpinval1 4095
dacpinval1 =4095

Set pin DAC1 voltage to 12V, and prints the value (4095).

dacpinvoltage*

Set voltage in mV of a DAC pin

Command syntax

dacpinvoltage<PIN> <VALUE>

where

Description

This command sets the voltage on a DAC pin.

The command always prints the actually set voltage of selected pin. There is no way how to read the value back out of the pin.

Example

--> dacpinvoltage1 8000
dacpinvoltage1 =8000

Sets pin DAC1 to 8V, prints the actual voltage (8000)

--> dacpinvoltage2 500
dacpinvoltage2 =500

Sets pin DAC2 to 500mV, prints actual voltage (500)

demomotctrl

Run motor control demo - reads input and sends it

Command syntax

demomotctrl

Description

This command creates a FlexRay node and starts to read buttons (connected to DIN0 and DIN1) and a potentiometer (ADC1) from a control panel. The read data are sent via FlexRay to the second node, created by running demomotdrive command.

The purpose of this pair of commands is to demonstrate functionality of the FlexRay, ADC, DIN and HBR peripherals.

demomotdrive

Run motor control demo - drives the DC motor

Command syntax

demomotdrive

Description

This command creates a FlexRay node and starts to receive the data from another node created by command demomotctrl. The received data are applied to HBR to control the DC motor.

The purpose of this pair of commands is to demonstrate functionality of the FlexRay, ADC, DIN and HBR peripherals.

dinget*

Read the open/close status of a DIN pin (with the default treshold)

Command syntax

dinget<PIN>

where PIN is a number in range 0-15

Description

The command reads and prints the status of the DIN pin. Value 0 means switch is open, value 1 means switch is closed. The mapping between the DIN voltage and the open/close status depends on the setup of the pin (see dinsetup command).

Example

--> dinget1
dinget1 =0

DIN1 is in open state.

dinsetup*

Setup DIN pin parameters (Pull up/down, tristate/active, IRQ and wakeup disable/enable)

Command syntax

dinsetup<PINS> [A [B [C]]]

where

Description

The command setups properties of one or more DIN pins as specified by <PIN>. Pins 0-7 can be set as pull up (switch to ground) or pull down (switch to battery), pins 8-15 are hardcoded as switch to ground. All pins can be set to either tri-state or active state and also can have wake-up function with IRQ activated or not.

The command always prints the final settings of each set pin as ABC. The actual configuration cannot be read out of the pin driver.

Example

--> dinsetup1 1 0 0
dinsetup1=100

Sets the DIN1 as switch to ground, active and disables IRQ generation.

--> dinsetup2
dinsetup2=101

Sets the DIN2 as to the default values i.e. switch to battery, tri-state, wake-up/IRQ enabled.

--> dinsetup0-7 1 1 1
dinsetup0=111
dinsetup1=111
dinsetup2=111
dinsetup3=111
dinsetup4=111
dinsetup5=111
dinsetup6=111
dinsetup7=111

Sets the DIN0 through DIN7 as switch to ground, tri-state, wake-up/IRQ enabled.

dinwatch

Watch status of all DIN pins

Command syntax

dinwatch

Description

The command reads and prints the status of DIN pins every 100 milliseconds. Columns 0-15 correspond to open/close status of DIN pins with the default threshold of 4 V, columns A-H represent the logical values of pins DIN8-15 when read with programmable threshold. Pin status (open=0, close=1) depends on the pin setup that can be changed with dinsetup command, programmable threshold can be set with TODO command.

Press any key to end this command.

Example

--> dinwatch
Digital Inputs Test [0-15]:
===========================================================
 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15  A  B  C  D  E  F  G  H
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  1  1  1  1  1  1  1

ethbd

Examine emac buffer descriptors

Command syntax

ethbd

Description

After startup you use keys to control what will be done.

Example

--> ethbd

ethernet

Temporary command to test Ethernet communication

Command syntax

ethernet

Description

Command tries to send a few ethernet frames. No real connection or meaningful packets are sent. This only tests, if Ethernet is just working.

ethinit

Post OS startup eth initialization

Command syntax

ethinit

Description

This command finishes autonegotiation of PHY and initialize LwIP stack.

Example

--> ethinit

ethip

Print current IP address of network interface

Command syntax

ethip

Description

This command reads current IP address, netmask and gateway of network interface and prints these to the output.

Example

--> ethip
Address: 192.168.247.1
Netmask: 255.255.255.0
Gateway: 192.168.247.255

ethlinkstat

Print current status of ethernet interface

Command syntax

ethlinkstat

Description

This command reads PHY link status assigned to ethernet interface and prints interface name and informs about PHY's status to the output.

Example

--> ethlinkstat
et0 : UP

--> ethlinkstat
et0 : DOWN

ethmac

Print current MAC address of ethernet interface

Command syntax

ethmac

Description

This command obtains MAC address from ethernet interface structure and prints it to the output.

Example

--> ethmac
12:34:56:78:9a:bc

ethnc

Start very simple netcat

Command syntax

 ethnc <IP> <PORT> [-p <PORT>] [-u] [-m [-t] | -d [-t]] [-c]
 ethnc -l <PORT> [-u] [-m [-t] | -d [-t]] [-c]

Description

Netcat is a program which allows to communicate using TCP or UDP protocols. First a connection is established by either:

When no -u option is specified ethnc command works with TCP connections. With -u option UDP communication is used. Listening for connection on UDP means waiting for reception of any UDP datagram.

Once the connection is established the command works in one of the following modes:

Note: When trying to use a same local TCP port number multiple times in a row (-l or -p options) there might be several minutes delay before the port is available after closing the previous connection. This situation is singled with ERROR 31.

Other options:

Examples

Listen for incoming TCP connection on local port 2000: --> ethnc -l 2000

Connect using TCP to address 192.168.247.15 to remote port 80 using local port 1500: --> ethnc 192.168.247.15 80 -p 1500

Send testing data to the remote node: --> ethnc -d 192.168.247.2 1025

Loop back all data coming from remote node's UDP port 1025: --> ethnc -m -u 192.168.247.2 1025

Wait for a TCP connection on local port 30000 and loop all incoming data back: --> ethnc -l 30000 -m

fraytestA

Run the FlexRay test as A node

Command syntax

fraytestA [<COUNT>]

where <COUNT> is an optional number of messages to send. The default is 100.

Description

The commands creates FlexRay node A and starts sending a message approximately every communication cycle. COUNT messages are sent for the test of the connection. The command should be run with two devices connected by a FlexRay bus and the second device should be running the fraytestB command (it is necessary to run both commands shortly after each other).

When the command transmits a message a character is printed. O means that the message was transmitted correctly, X signals a transmission error. The number of TX errors and successfully transmitted messages is maintained during the test and printed at the end.

fraytestB

Run the FlexRay test as B node

Command syntax

fraytestB [<COUNT>]

where <COUNT> is an optional number of messages to receive. The default is 100.

Description

The commands creates FlexRay node B and starts receiving a messages. 100 messages should be received. The command should be run with two devices connected by a FlexRay bus and the second device should be running the fraytestA command (it is necessary to run both commands shortly after each other).

When the command receives a message a character is printed. O means that the message was received correctly, X signals an error in data, T means timeout (i.e. no message was received within 63 cycles). The number of RX errors and successfully received messages is maintained during the test and printed at the end.

frayxcvrstat#

Get the status of a FlexRay transceiver in a human readable form

Command syntax

frayxcvrstat<CHN>

where CHN is a number in range 1-2

Description

The command receives response from a FlexRay transceiver via SPI, and prints in the form of attribute-value table.

Example

--> frayxcvrstat1

Prints the status of FRAY1 transceiver.

frbtabort

Abort FlexRay communication immediately

Command syntax

frbtabort

Description

The command stands for Fr_AbortCommunication function from the Autosar specification. The command invokes the FlexRay POC command FREEZE, which means that the communication is stopped immediately. On the opposite side there is a frbthalt command, which stops the communication after the end of the actual communication cycle. To restart the communication, the frbtinit and frbtstart commands have to be called.

Example

--> frbtabort
FlexRay node communication aborted.

frbtallslots

Enables communication for all frames

Command syntax

frbtallslots

Description

The command stands for Fr_AllSlots function from the Autosar specification.

The node can be configured to communicate only on key frames by default (as in the case of frbtinitA/B). This command can be used to allow the communication on all configured frames. The command invokes the FlexRay POC command ALL_SLOTS which enables the communication on all frames. The command can be called after the controller initialization.

Example

--> frbtallslots
FlexRay node started communication on all slots.

frbtcanceltimer*

Stop the timer

Command syntax

frbtcanceltimer<TMID>

where <TMID> is a number (0 or 1) specifying the timer.

Description

The command stands for Fr_CancelAbsoluteTimer function from the Autosar specification. It stops the timer selected by the parameter.

Example

--> frbtcanceltimer0
Timer was canceled.

frbtcanceltx*

Stop the transmission of the frame

Command syntax

frbtcanceltx<FRID>

where <FRID> is a decimal number specifying the ID of the frame for which a buffer has been configured.

Description

The command stands for Fr_CancelTxLPdu function from the Autosar specification. The command finds all buffers assigned to the specified frame ID and reconfigures them to stop transmitting data. The command finishes successfully only if reconfiguration is allowed in message RAM configuration (secureBuffers configuration parameter). Only TX buffers and buffers not used for startup frames can be canceled.

Example

--> frbtcanceltx3
Transmission canceled.

frbtccconfig*

Print value of a FlexRay cluster and node configuration parameter

Command syntax

frbtccconfig<INDEX>

where <INDEX> is an identifier of the parameter.

Description

The command stands for Fr_ReadCCConfig function from the Autosar specification. The driver stores the configuration parameters as an array. Each parameter can be indexed and returned by this command. See Autosar specification of the FlexRay driver (http://www.autosar.org/download/R4.1/AUTOSAR_SWS_FlexRayDriver.pdf), section 8.2.1 for parameter indexes.

Example

--> frbtccconfig1
Value = 0x1

frbtcfgbuf?*

Configure a message buffer in the user configuration

Command syntax

frbtcfgbuf<TYPE><NUM> slot<SLOT> <CHN> cyc<CYC> <RXTX> max<MAX> <REP> ppi<PPI> int<INT>

where

Description

The command sets the configuration parameters for static or dynamic buffers in user configuration. The parameters set by this command are applied by the frbtinitU command. Once frbtinit is called, it is no longer possible to change the parameters.

Example

--> frbtcfgbufS0 slot2 AB cyc0 tx max9 continous ppi0 int1
frbtcfgbufS0 slot2 AB cyc0 tx max9  continous ppi0 int1
--> frbtcfgbufS1 slot1 AB cyc0 rx max9 continuous ppi0 int1
frbtcfgbufS1 slot1 AB cyc0 rx max9 continuous ppi0 int1
--> frbtcfgbufD0  slot9  A cyc0 rx max0x40 single ppi0 int0
frbtcfgbufD0 slot9  A cyc0 rx max64 single ppi0 int0
--> frbtcfgbufD1  slot10 A cyc0 tx max0x40 single ppi0 int0
frbtcfgbufD1 slot10  A cyc0 tx max64 single ppi0 int0

frbtcfgfifo*

Configure a RX FIFO message buffer in the user configuration

Command syntax

frbtcfgfifo rejslot<SLOT> slotmask<MASK> depth<DEPTH> <CHN> cyc<CYC> max<MAX> <REJNULL> <REJSTAT>

where - <SLOT> is the number of the slot that will be rejected. If it is 0, no slot will be rejected, - <MASK> is a number specifying which bits of the <SLOT> will be ignored,- <DEPTH> is a number specifying the depth of the FIFO, - <CHN> is one of 'A', 'B' or 'AB' and identifies the used channel, - <CYC> is the cycle set when to send the buffer, - <MAX> is the number determining the maximum payload (in hald-words), - <REJNULL> is a string "rejnull" for rejecting NULL frames or "accnull" for accepting NULL frames, - <REJSTAT> is a string "rejstat" for rejecting frames in static segment or "accstat" for accepting frames from static segment,

Description

The command sets the configuration parameters for RX FIFO buffer in user configuration. The parameters set by this command are applied by the frbtinitU command. Once frbtinit is called, it is no longer possible to change the parameters. Those messages, which are not accepted by any other buffer and pass the FIFO rejection filter will be stored in the RX FIFO buffer.

Example

--> frbtcfgfifo rejslot6 slotmask6 depth5 AB cyc0 max0x20 rejnull accstat
frbtcfgfifo rejslot6 slotmask6 depth5 AB cyc0 max0x20 rejnull accstat

frbtchecktx*

Print the status of the transmit buffer

Command syntax

frbtchecktx<FRID>

where <FRID> is a decimal number specifying the ID of the frame for which a buffer has been configured.

Description

The command stands for Fr_CheckTxLPduStatus function from the Autosar specification. The command finds the first buffer assigned to the specified frame ID, reads its status and prints it. The buffer can be in one of the two states:

Example

--> frbtchecktx1
Message transmission is not pending.

frbtchstat

Print channel A and B status

Command syntax

frbtchstat

Description

The command stands for Fr_GetChannelStatus function from the Autosar specification.

Example

--> frbtchstat
Channel A status:
    aggregated channel status vSS!ValidFrame: TRUE
    aggregated channel status vSS!SyntaxError: FALSE
    aggregated channel status vSS!ContentError: FALSE
    aggregated channel status additional communication: FALSE
    aggregated channel status vSS!Bviolation: FALSE
    aggregated channel status vSS!TxConflict: FALSE
    Not used (0): FALSE
    Not used (0): FALSE
    symbol window status data vSS!ValidMTS: FALSE
    symbol window status data vSS!SyntaxError: FALSE
    symbol window status data vSS!Bviolation: FALSE
    symbol window status data vSS!TxConflict: FALSE
    NIT status data vSS!SyntaxError: FALSE
    NIT status data vSS!Bviolation: FALSE
    Not used (0): FALSE
    Not used (0): FALSE
Channel B status:
    aggregated channel status vSS!ValidFrame: TRUE
    aggregated channel status vSS!SyntaxError: FALSE
    aggregated channel status vSS!ContentError: FALSE
    aggregated channel status additional communication: FALSE
    aggregated channel status vSS!Bviolation: FALSE
    aggregated channel status vSS!TxConflict: FALSE
    Not used (0): FALSE
    Not used (0): FALSE
    symbol window status data vSS!ValidMTS: FALSE
    symbol window status data vSS!SyntaxError: FALSE
    symbol window status data vSS!Bviolation: FALSE
    symbol window status data vSS!TxConflict: FALSE
    NIT status data vSS!SyntaxError: FALSE
    NIT status data vSS!Bviolation: FALSE
    Not used (0): FALSE
    Not used (0): FALSE

frbtclkcor

Print clock correction (rate and offset)

Command syntax

frbtclkcor

Description

The command stands for Fr_GetClockCorrection function from the Autosar specification.

Example

--> frbtclkcor
Rate correction: 0
Offset correction: 0

frbtconfig*

Set the user configuration parameters

Command syntax

frbtconfig<TYPE> <PARAMS>

where

Description

The command takes the configuration parameters in the form of a string and sets the appropriate type of the FlexRay parameters. It is necessary to configure parameters of at least cluster, and node and one static buffer (see frbtcfgbuf command). The parameters set by this command are applied by the frbtinitU command. Once frbtinit is called, it is no longer possible to change the parameters.

The type of the parameters can be selected by the <TYPE> selector.

Type "cluster" sets global FlexRay network parameters. It expects a sequence of 25 parameters in this order:

Type "node" sets local FlexRay network parameters. It expects a sequence of 28 parameters in this order:

Example

--> frbtconfigcluster 0x2 0xF 0x15E0 0xF 0xF 0xC 0x15A 0x8 0xAE4 0x9 0xF 0x4 0x43 0x1 0x4 0x2 0xAE3 0x0 0x56 0xA 0x12 0x12 0x4C 0xB4 0x3C
FlexRay cluster configuration accepted.
--> frbtconfignode 0x0 0x0 0x2 0x1 0x3 0x3 0x0 0x0 0x1 0x1 0x10D 0x6 0x6 0x18 0x18 0x36B00 0xCD 0x151 0x0 0x1 0x0 0x2 0x81 0x36DA2 0x151 0x33 0x0 0x0
FlexRay node configuration accepted.

frbtdisable*

Disable the buffers assigned to the frame

Command syntax

frbtdisable<FRID>

where <FRID> is a decimal number specifying the ID of a frame. The buffers configure for this frame will be disabled.

Description

The command stands for Fr_DisableLPdu function from the Autosar specification. The command finds all buffers assigned to the specified frame ID and disables them. This means that those buffers will be unavailable for the communication until their reconfiguration (which is not yet implemented). Buffers used for startup frames and FIFO RX buffers cannot be disabled.

Example

--> frbtdisable3
Buffer disabled.

frbtgetpocst

Print FlexRay POC status

Command syntax

frbtgetpocst

Description

The command stands for Fr_GetPOCStatus function from the Autosar specification. It prints the main FlexRay POC status values in the form of a table. The command should be called after the frbtinit command.

Example

--> frbtgetpocst
POC status:
CHIHaltRequest: FALSE
CHIReadyRequest: FALSE
ColdstartNoise: FALSE
Freeze: FALSE
ErrorMode: ACTIVE
SlotMode: ALL
StartupState: UNDEFINED
State: READY
WakeupStatus: UNDEFINED

frbtgetsyncfrlist*

Print the list of sync frames transmitted on both channels via the odd and even communication cycle

Command syntax

frbtgetsyncfrlist<LENGTH>

where <LENGTH> is a decimal number in range 0 - 15, specifying the length of the list to be printed.

Description

The command stands for Fr_GetSyncFrameList function from the Autosar specification.

Example

--> frbtgetsyncfrlist2
| Channel A even | channel B even | channel A odd  | channel B odd  |
|----------------|----------------|----------------|----------------|
| 1              | 1              | 1              | 1              |
| 2              | 2              | 2              | 2              |
|----------------|----------------|----------------|----------------|

frbtgetwurxstat

Prints whether the wake up pattern has been or has not been received

Command syntax

frbtgetwurxstat

Description

The command stands for Fr_GetWakeupRxStatus function from the Autosar specification. The status of the wake up receiving is bitcoded in the controller. This command decodes and prints it in a readable format.

Example

--> frbtgetwurxstat
Wake up pattern was not yet received on channel A.
Wake up pattern was not yet received on channel B.

frbtglobtime

Print actual global time of the network

Command syntax

frbtglobtime

Description

The command stands for Fr_GetGlobalTime function from the Autosar specification. The command prints the time as a number of the current cycle and the offset in the cycle in macroticks.

Example

--> frbtglobtime
Cycle number: 23
Macrotick number: 6

frbthalt

Halt FlexRay communication after the end of the actual communication cycle

Command syntax

frbthalt

Description

The command stands for Fr_HaltCommunication function from the Autosar specification. The command invokes the FlexRay POC command HALT, which means that communication is stopped after the end of the actual communication cycle. On the opposite side, there is a frbtfreeze command, which stops the communication immediately. To restart the communication, the frbtinit and frbtstart commands have to be called.

Example

--> frbthalt
FlexRay node communication halted.

frbtinit?

Initialize a FlexRay node

Command syntax

frbtinit<CFG>

where <CFG> identifies the configuration to use. It can be one of A, B or U. The A and B are predefined configurations. If U is specified, the user configuration previously set by frbtconfig command is used.

Description

The command stands for Fr_Init and Fr_ControllerInit functions from the Autosar specification. It initializes the internal data structures of the driver and then, based on those data, the controller configuration is done. During the controller configuration the parameters of the cluster, node, message RAM and buffers are checked. If anything goes bad, the command returns an error number, which can be decoded by macros defined in driver header file fr_tms570.h with prefix ERR_PARAM. If all parameters are OK, all necessary registers of the controller are initialized according to the specified configuration parameters. At the end of the command, the FlexRay controller is switched into READY state and all buffers are configured to send NULL frames. This command should be called as the very first command, when trying to communicate over the FlexRay bus.

Example

--> frbtinitA
FlexRay driver initialized.
FlexRay controller initialized.

frbtnmvector

Print network management vector of the node

Command syntax

frbtnmvector

Description

The command stands for Fr_GetNmVector function from the Autosar specification. It prints the values of the network management vector as hexadecimal numbers.

Example

--> frbtnmvector
Network management vector: 0 0 0 0 0 0 0 0 0 0 0 0

frbtnmwatch

Watch the changes of the network managment vector in real-time

Command syntax

frbtnmwatch

Description

Reads the network management vector every 100 ms and prints it out.

Example

--> frbtnmwatch
Network management vector: 0 0 0 0 0 0 0 0 0 0 0 0

frbtreceive*

Receive a new message

Command syntax

frbtreceive<FRID>

where <FRID> is a decimal number specifying the ID of the frame for which a buffer was configured.

Description

The command stands for Fr_ReceiveRxLPdu function from the Autosar specification. The command finds the first buffer assigned to the specified frame ID, determines if a new message has been received and reads it out of the buffer. If no message was received, "No message received" is printed. If a new message was received, all message data are printed as a hexadecimal values. If a new message was retrieved from a FIFO buffer and more messages are available in it, "More messages are still in FIFO" is printed.

Example

--> frbtreceive0
More messages are still in FIFO:
Received message (32 B):
 ee ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

frbtreconfigurebuf*

Reconfigure a buffer to communicate in another slot

Command syntax

frbtreconfigurebuf id<ID> slot<SLOT> <CHN> cycset<CYCS> cycoffset<CYCO> max<MAX>

where

Description

The command stands for Fr_ReconfigLPDu function from the Autosar specification. It reconfigures specified buffer to communicate in different slot. The reconfiguration must be allowed in node configuration parameter secureBuffers. Buffers used for synchronization or assigned to the FIFO are not reconfigurable. The command can be called any time when the communication is running.

Example

--> frbtreconfigurebuf id2 slot3 AB cycset1 cycoffset0 max9
frbtreconfigurebuf id2 slot3 AB cycset1 cycoffset0 max9

frbtsettimer*

Set and start timer

Command syntax

frbtsettimer<TMID> <CYCLE> <OFFSET>

where

Description

The command is similar to Fr_SetAbsoluteTimer function from the Autosar specification. The difference is that the command allows to specify a set of cycles, not only one of 64 cycles. It sets the timer selected by the parameter and enables it.

Before using this command, FlexRay communication has to be started (see frbtstart).

Example

--> frbtsettimer0 32 50
Timer was set for every 32-th cycle, offset 0, macrotick 50
--> frbtsettimer0 31 50
Timer was set for every 16-th cycle, offset 15, macrotick 50
--> frbtsettimer0 0x42 0
Timer was set for every 64-th cycle, offset 2, macrotick 0

frbtsetwuch?

Set wake up channel

Command syntax

frbtsetwuch<CHANNEL>

where <CHANNEL> is a character A or B, specifying the channel.

Description

The command stands for Fr_SetWakeupChannel function from the Autosar specification. Wake up channel is the channel, where Wake Up Pattern is sent. The channel can be set after the driver and controller are initialized and before the communication is running. The actual wake-up pattern is sent by the frbtwup command.

Example

--> frbtsetwuchA
Wake up channel has been set.

frbtstart

Start a new FlexRay network or join to the existing one

Command syntax

frbtstart

Description

The command stands for Fr_StartCommunication function from the Autosar specification. If the FlexRay node is configured as a coldstarter node (as for example by frbtinitA/B command), then the command first listen on the bus. When it does not detect any existing bus communication, it tries to initiate a new network. If the initiation fails, the FlexRay controller is switched back to the ready state for another attempt (calling frbtstart again). If the FlexRay node is configured as non-coldstarter, it is listening on the bus until some existing communication is detected.

The command should be called after the frbtinit command.

Example

--> frbtstart
FlexRay communication is running.

frbttimerirq*

Perform selected action on the timer IRQ

Command syntax

frbttimerirq<TMID> <ACTION> - Run the <ACTION> on specified timer
frbttimerirq<TMID> - Get timer IRQ status

where

<ACTIONS> can be one of:

Description

The command stands for Fr_EnableAbsoluteTimerIRQ, Fr_AckAbsoluteTimerIRQ, Fr_DisableAbsoluteTimerIRQ and Fr_GetAbsoluteTimerIRQStatus functions from the Autosar specification. It masks or demasks the IRQ for the timer, or acknowledges the interrupt request. If no action is specified it prints whether the IRQ is pending for the timer.

Example

--> frbttimerirq0
IRQ = FALSE

--> frbttimerirq0 EN
OK

frbttransmit*

Transmit data in selected frame

Command syntax

frbttransmit<FRID> <DATA>

where

Description

The command stands for Fr_TransmitTxLPdu function from the Autosar specification. The command finds the first buffer assigned to the specified frame ID and copies the given data into its data section in the message RAM. Transmit request is set after the data are copied, so transmission starts at the next occurrence of the frame in the communication cycle.

Example

--> frbttransmit1 12 34 56 AA BB CC
Data were set for transmission.

frbtversion

Print FlexRay driver version information

Command syntax

frbtversion

Description

The command stands for Fr_GetVersionInfo function from the Autosar specification. It reads and prints the information about vendor, module and version of the FlexRay driver

Example

--> frbtversion
vendorID: 0xAAAA
moduleID: 0xBBBB
sw_major_version: 0x1
sw_minor_version: 0x2
sw_patch_version: 0x4

frbtwup

Initiate the wake up procedure

Command syntax

frbtwup

Description

The command stands for Fr_SendWUP function from the Autosar specification. It initiates the wake up procedure by switching FlexRay controller state machine to WAKEUP state.

Example

--> frbtwup
Wake up pattern has been sent.

hbrcontrol*

Set the motor voltage direction and size in percent

Command syntax

hbrcontrol<SPEED>

where <SPEED> specifies direction and PWM duty cycle in percent (a number in range -100, 100).

Description

The command sets the direction and the size of the voltage at HBR output.

HBR has to be enabled by hbrenable command before calling this command.

Example

--> hbrcontrol-25
hbrcontrol =-25

Rotates the motor to the left with 25% speed.

--> hbrcontrol25
hbrcontrol =25

Rotates the motor to the right with 25% speed.

--> hbrcontrol0
hbrcontrol =0

Stops the motor.

hbrdisable

Disable the H-bridge

Command syntax

hbrdisable

Description

The command disables the H-bridge HBR, which means that the PWM is stopped and the enable signal is cleared. The watchdog task is left running, because it is harmless.

After H-bridge is disabled, it cannot be controlled by any command until it is enabled again by the hbrenable command.

Example

--> hbrdisable
hbrdisable=0

Stops motor and disables the H-bridge.

hbrenable*

Enable the H-bridge and set its PWM period

Command syntax

hbrenable<PER>

where <PER> is PWM period in microseconds.

Description

This command enables the H-bridge (HBR pin), i.e. the enable signal the H-bridge chip is set, the watchdog reset task is started and the PWM is configured with the specified period and duty cycle 0%.

If the period is zero, the default frequency of 18kHz is used instead. Minimum period is 50. This command should be called before any other command starting with hbr is used. If H-bridge is already enabled, an error is printed.

Example

--> hbrenable1000
hbrenable =1000

Enables HBR with period 1000 microseconds (frequency 1 kHz). HBR output is still inactive, but ready for other commands.

help

Print help for commands

Syntax

help [command]

Description

This command without parameter prints the list of all available commands with short help text for each of them. If a parameter is provided, the command prints a long description for given command.

houtfail*

Test if some HOUT pin is in the fault state

Command syntax

houtfail<PIN>

where <PIN> is in range 1-6

Description

This command tests, if HOUT pin is in a good condition. When the circuit controlling HOUT pin detects some failure, it signals that on HOUT_DIAG output. This command is supposed to read this output and print its state.

Possible outputs of this command:

Note: Before using this command, houtpwmstart and houtpwm commands should be called.

Example

--> houtpwm6 1000 25
--> houtpwmstart6
--> houtfail6
OK

Detects the state of the HOUT1 and prints OK, FAIL or NOT RUNNING.

houtifbk

Read values from HOUT current feedback

Command syntax

houtifbk

Description

The command reads analog values from HOUT_IFBK pins and prints them in a table.

Example

--> houtifbk HOUT1: 0 HOUT2: 134223784 HOUT3: 134223784 HOUT4: 0 HOUT5: 38924 HOUT6: 1342231444

houtpwm*

Set or get actual PWM parameters

Command syntax

houtpwm<PIN> <PER> <DUTY>
houtpwm<PIN>

where

Description

This command can be used to set or get HOUT PWM parameters.

Example

--> houtpwm1 1000 25

HOUT1 PWM will have the period of 1ms and will be active for 25% of this period.

--> houtpwm1
houtpwm1_period=1000
houtpwm1_duty=25

Prints the actual period of HOUT1 PWM in microseconds and the duty cycle in percents.

houtstartpwm*

Start generating PWM signal on HOUT

Command syntax

houtstartpwm<PIN>

where <PIN> is a number in range 1-6

Description

This command starts to generate the PWM signal on the specified HOUT pin. The HOUT PWM has to be previously set by the houtpwm command, otherwise an error is printed.

Example

--> houtpwm1 1000 25
--> houtstartpwm1

HOUT1 PWM generation will be started.

houtstoppwm*

Stop generating of PWM signal on HOUT

Command syntax

houtstoppwm<PIN>

where <PIN> is a number in range 1-6

Description

This command stops generating the PWM signal on the selected pin.

Example

--> houtstoppwm1

HOUT1 PWM generation will be deactivated.

lintest

Test the digital loopback on LIN

Command syntax

lintest

Description

This command can be used for testing the LIN. The command starts to send a short message on the LIN port and is testing if it is correctly received via an internal loopback.

loutdiag*

Read a diagnostic value from an LOUT pin

Command syntax

loutdiag<PIN>

where <PIN> is a number in range 1-8

Description

The command reads a logical value of the LOUT diagnostic signal.

Example

--> loutdiag1

Reads value of the LOUT1 diagnostic signal.

loutset*

Set a value of the LOUT pin

Command syntax

loutset<PIN> <VALUE>

where

Description

The command sets the digital value on the LOUT pin.

Example

--> loutset1 1

Sets LOUT1 to 1.

--> loutset2 0

Sets LOUT2 to 0.

pindir*

Set the pin direction

Command syntax

pindir<NAME> <DIR>
pindir<NAME>

where

Description

This command is used to set or get direction of the particular pin.

The list of valid pin names can be obtained with pinlist command.

Most of the pins are accessible indirectly via other highlevel commands HBR_EN is, for example, controlled by the hbrenable command. This command serves as supplement to highlevel commands for testing purpose.

Example

--> pindirHBREN 1
pindirHBREN=1

Sets the HBR_EN pin as output.

--> pindirHBREN
pindirHBREN=1

Gets the direction of the HBR_EN pin.

pinlist

Print a list of all defined pins.

Command syntax

pinlist

Description

The command prints a list of all defined pins accessible by pinval and pindir commands.

Example

--> pinlist
List of all defined pins. Those names can be used by pinval command.
FANCTRL
ETHRST
VBAT1EN
VBAT2EN
VBAT3EN
VBATEN
SPICSA
SPICSB
MOUT1EN
MOUT2EN
CANNSTB
CANEN
LIN2NSLP
LIN1NSLP
DININT
DIN8
DIN9
DIN10
DIN11
DIN12
DIN13
DIN14
DIN15
MOUT6EN
MOUT5EN
MOUT6IN
MOUT5IN
MOUT4EN
MOUT3EN
MOUT4IN
MOUT3IN
HBREN
HBRDIR
HBRPWM
MOUT1IN
MOUT2IN
HOUT1IN
HOUT1DIAG
HOUT2IN
HOUT2DIAG
HOUT3IN
HOUT3DIAG
HOUT4IN
HOUT4DIAG
HOUT5IN
HOUT5DIAG
HOUT6IN
HOUT6DIAG

pinval*

Set or get the pin value

Command syntax

pinval<NAME> <VAL>
pinval<NAME>

where

Description

This command is sets or gets a value of the particular pin.

The list of valid pin names can be obtained with pinlist command.

Most of the pins are accessible indirectly via other highlevel commands. HBR_EN is, for example, controlled by the hbrenable command. This command serves as supplement to highlevel commands for testing purpose.

Example

--> pinvalHBREN 1
pinvalHBREN=1

Sets the HBR_EN pin to 1.

--> pinvalHBREN
pinvalHBREN=1

Gets a value of the HBR_EN pin.

portlist

Print a list of all port names

Command syntax

 portlist

Description

This command prints the list of all defined ports accessible via the portval command. Each record of the list is a couple of PortName-PortInterface, where PortInterface is SPI, ADC or GPIO. The type of the MCU<->port interface slightly modifies the meaning of the portval command.

Example

 --> portlist
 List of all defined ports with its type. Those names can be used by portval command.
 DINMCU, GPIO
 DINSPI, SPI
 HOUTDIAG, GPIO
 HOUTIN, GPIO
 HOUTIFBK, ADC
 ADC, ADC
 LOUT, SPI
 DAC12, SPI
 DAC34, SPI
 DACDREF, SPI
 HBR, SPI
 FRAY1, SPI
 FRAY2, SPI
 MOUTEN, GPIO
 MOUTIN, GPIO

portval*

Read or write values from or to the port

Command syntax

 portval<NAME> <VAL>
 portval<NAME>

where

Description

This command sets or gets values of all pins on the specified port. If the port is connected to the GPIO interface of the MCU, then when writing the value, the lowest significant bit of the argument is assigned to the first pin, the second bit is assigned to the second pin, etc. The command returns zero. When reading from the port, the command returns values for each pin.

If the port is connected to the SPI interface of the MCU, then it is write only and the argument is interpreted as a command for the port controller. The command returns the response from the port controller. For command examples please refer to the project wiki

If the port is connected to the ADC interface of the MCU, then it is read only and returns values for each ADC pin.

Port names and interface type can be obtained with the portlist command.

NOTE: For successful communication with the HBR, HBR_EN pin must be set first.

Example

 --> portvalMOUTIN 3A
 portvalMOUTIN=0
 --> portvalMOUTIN
 0
 1
 0
 1
 1
 1

This pair of commands sets: MOUT1INMOUT1IN=0 MOUT2IN=1 MOUT3IN=0 MOUT4IN=1 MOUT5IN=1 MOUT6IN=1 Which is shown in getter output

poweroff

Disables VBATEN and VBAT1EN power supply

Command syntax

poweroff

Description

This command turns off VBAT and VBAT1 voltages.

poweron

Enable VBATEN and VBAT1EN power supply by using PWM hack

Command syntax

poweron

Description

This command tries to work around error on VBAT power supply wiring and attempts to switch the power supply on.

It turns on the VBAT voltage by slowly charging the capacitors connected to the VBAT1 signal by using the software-generated PWM signal with increasing duty cycle.

The poweron command has to be launched before any access to any SPI peripherals, otherwise they will not work (or the power supply has to be electrically bypassed).

Please note that parameters for the PWM signal may change from device to device and it might be necessary to tune them (in source code) for each device.

sdramlogtest

Open a command subprocessor for managing SDRAM logging

Command syntax

sdramlogtest

Description

The command opens a subcommand processor, which contains testing commands for logging into SDRAM.

sdramtest

Test if the SDRAM module is connected and if so, measures its capacity

Command syntax

sdramtest

Description

This command tests SDRAM address space by writing and reading a pattern to/from it. It detects the SDRAM capacity.

Example

--> sdramtest
SDRAM installed: 64 MB

sleep

Sleep the board

Syntax

sleep

Description

This command configures the LIN and CAN peripherals to enter sleep mode and turn the whole device into sleep mode. External signal on CAN or LIN will wake the device up.

spimst*

Request SPI master communication

Command syntax

spimst<SPI> <ADDR> <DATA>

where

Description

The command sends given data to the SPI peripheral and prints the response. The response contains the address and the received data in parentheses.

Example

--> spimst1 0 7F 00 00
spirx:0x0(0x3f,0xc0,0xff)

Sends reset command (0x7F0000) to the DIN peripheral.

spitr*

Translate response from an SPI peripheral

Command syntax

spitr<NAME> <CMD> <RESP>

where

Description

This command translates a response from SPI from many different peripherals into a human readable form. The SPI response is in the form of a hexadecimal number, which encodes the information. This commands takes this response, the command which produced this response, the name of the peripheral and translates the response into the attribute-value table.

Example

--> portvalDINSPI 7F 00 00
portvalDINSPI=AAC03F
--> spitrDINSPI 7F0000 3FC0AA
Thermal flag    : 0
INT flag    : 0
SP0  - DIN0 : 1
SP1  - DIN1 : 1
SP2  - DIN2 : 1
SP3  - DIN3 : 1
SP4  - DIN4 : 1
SP5  - DIN5 : 1
SP6  - DIN6 : 1
SP7  - DIN7 : 1
SG0  - DIN8 : 0
SG1  - DIN9 : 1
SG2  - DIN10    : 0
SG3  - DIN11    : 1
SG4  - DIN12    : 0
SG5  - DIN13    : 1
SG6  - DIN14    : 0
SG7  - DIN15    : 1
SG8  - NA   : 0
SG9  - NA   : 0
SG10 - NA   : 0
SG11 - NA   : 0
SG12 - NA   : 0
SG13 - NA   : 0
spitrDINSPI=24

Translates response 0x3FC0AA returned by command 0x7F0000 into a human readable form. Please notice LSB->MSB conversion of the portval result. The necessity of the conversion depends on the controller of the examined port.

version

Print version of the software

Syntax

version

Description

This command prints the version of the test software. The version number is the output of 'git describe' command, i.e. it is composed from the last tag in the git repository, the number of commits since the tag and the abbreviated commit hash.

Example

--> version
version=v0.2-109-ga81a9dd