CAN Bus

Veronte CEX and CEM Communication Protocol over CAN Bus is defined as follow (v6.4.39 or higher):

  • cmd (8 bits): Message Type

  • data (up to 56 bits): Message Data

First 8 bits refers to the Message Type and are defined as follows:

Message Type

Value

Description

t_arbitration

0

Arbitration message

t_version

1

Version request / response

t_pwm_0_3_set

2

PWMs 0 to 3

t_pwm_4_7_set

3

PWMs 4 to 7

4

Reserved

t_esc_tm

5

Scorpion Tribunus ESC telemetry data

t_esc_tm2

6

Jeti ESC telemetry data

t_bec_tm1

7

Jeti BEC telemetry data

t_bec_tm2

8

Jeti BEC telemetry data 2

t_temp_tm

9

Jeti Temperature sensor telemetry data

t_mcu_cmd

10

MCU command

t_pwm_8_11_set

11

PWMs 8 to 11

t_pwm_12_15_set

12

PWMs 12 to 15

t_pwm_16_19_set

13

PWMs 16 to 19

14

Reserved

15

Reserved

t_cmd_maint

16

Command to go to Maintenance Mode

t_stick_sel

17

Command for Stick selection

t_mcu_tm1

18

MCU telemetry data 1

t_mcu_tm2

19

MCU telemetry data 2

The following bytes refer to the Message Data.

Next sections decribe each of the possible messages.


Arbitration

CAN Expander Arbitration Status message is composed as follow:

  • Message 1

Message Type

Bytes

Description

t_arbitration

1

Message type (0)

Flag

1

Status Flag [0xFF]

CAP

7 bits

Active Autopilot (Current)

Flag

1 bit

Arbitrating

Flag

1 bit

AP0 Alive

Flag

1 bit

AP1 Alive

Flag

1 bit

AP2 Alive

Flag

1 bit

AP3 Alive (External)

Flag

1 bit

AP0 Ready

Flag

1 bit

AP1 Ready

Flag

1 bit

AP2 Ready

Flag

1 bit

AP3 Ready (External)

  • Message 2 (One for each Autopilot)

Message Type

Bytes

Description

t_arbitration

1

Message type (0)

AP ID

1

Autopilot [0, 3]

Score

4

Autopilot score as Float (32 bits)


Request Version

The command needed to ask the CEX version is the following:

  • cmd (8 bits): t_version

And CEX will answer with:

  • cmd (8 bits): t_version (1)

  • data0 (8 bits): App -> 9 CEXv2

  • data1 (8 bits): Version

  • data2 (8 bits): Major

  • data3 (8 bits): Minor

  • data4 (8 bits):

    • bits 7-3: 0

    • bit 1: arbitration_enabled

    • bit 0: arbitrating


Command PWMs

Each PWM in Veronte CAN Expander has to be associated to a Sub Id that indicates which of the CAN Bus message’s PWM is listening to.

That allows to control up to four PWMs using the same message if that is desired. Each message is composed by 4 PWMs maximum.

PWMs from 0 to 3 are sent in a message that includes 4 PWMs coded as 12-bit integers:

  • cmd (8 bits): t_pwm_0_3_set (2)

  • pwm0 (12 bits) PWM value for sub-id 0

  • pwm1 (12 bits) PWM value for sub-id 1

  • pwm2 (12 bits) PWM value for sub-id 2

  • pwm3 (12 bits) PWM value for sub-id 3

PWMs from 4 to 7 are sent in a message that includes 4 PWMs coded as 12-bit integers:

  • cmd (8 bits): t_pwm_4_7_set (3)

  • pwm0 (12 bits) PWM value for sub-id 4

  • pwm1 (12 bits) PWM value for sub-id 5

  • pwm2 (12 bits) PWM value for sub-id 6

  • pwm3 (12 bits) PWM value for sub-id 7

PWMs from 4 to 7 are sent in a message that includes 4 PWMs coded as 12-bit integers:

  • cmd (8 bits): t_pwm_8_11_set (11)

  • pwm0 (12 bits) PWM value for sub-id 8

  • pwm1 (12 bits) PWM value for sub-id 9

  • pwm2 (12 bits) PWM value for sub-id 10

  • pwm3 (12 bits) PWM value for sub-id 11

PWMs from 4 to 7 are sent in a message that includes 4 PWMs coded as 12-bit integers:

  • cmd (8 bits): t_pwm_12_15_set (12)

  • pwm0 (12 bits) PWM value for sub-id 12

  • pwm1 (12 bits) PWM value for sub-id 13

  • pwm2 (12 bits) PWM value for sub-id 14

  • pwm3 (12 bits) PWM value for sub-id 15

PWMs from 16 to 19 are sent in a message that includes 4 PWMs coded as 12-bit integers:

  • cmd (8 bits): t_pwm_16_19_set (13)

  • pwm0 (12 bits) PWM value for sub-id 16

  • pwm1 (12 bits) PWM value for sub-id 17

  • pwm2 (12 bits) PWM value for sub-id 18

  • pwm3 (12 bits) PWM value for sub-id 19


MCU Telemetry (CEX to Veronte)

The telemetry sent by CEX over CAN Bus is composed by:

  • Message 1

Message Type

Bytes

Description

t_mcu_tm1

1

Message type (18)

Battery SN

1

Battery Serial Number [0]

Battery SN

1

Battery Serial Number [1]

Temperature

1

Battery Temperature (as received from MCU)

Voltage

1

Low Cell Voltage (as received from MCU)

4 bits

Reserved (Zeros)

Status Bit

1

PWM receiving Ok

Status Bit

1

CAN PWM receiving Ok

Status Bit

1

CAN B receiving

Status Bit

1

CAN A receiving

  • Message 2

Message Type

Bytes

Description

t_mcu_tm2

1

Message type (19)

Battery SN

1

Battery Serial Number [2]

Battery SN

1

Battery Serial Number [3]

Battery SN

1

Battery Serial Number [4]

Battery SN

1

Battery Serial Number [5]

Battery SN

1

Battery Serial Number [6]

Battery SN

1

Battery Serial Number [7]


MCU Telemetry (Veronte to CEX)

The telemetry sent from Veronte to CEX must be configured as follows:

Message Type

Bytes

Description

t_mcu_cmd

1

Message type (10)

SUB-id

1

SUB-id A

LED Value

1

Value A

SUB-id

1

SUB-id B

LED Value

1

Value B

SUB-id

1

SUB-id C

LED Value

1

Value C

Each Veronte CAN Expander will use the SUB-id of the PWM associated to the “Scorpion Tribunus”/PWM ID to identify the value to be used.


Scorpion Tribunus ESC Telemetry

The telemetry read from the Scorpion ESC is sent as:

Message Type

Bytes

Description

t_esc_tm

1

Message type (5)

Voltage

1

Input voltage in range [0, 85]

Temperature

1

Temperature in Celsius

Errors

1

Error Flags from the ESC

Current

1

Current in Amps [0, 255]

Consumption

1

Consumption in mAmps [0, 25500]

RPMs

1

RPMs [0, 25500]

Throttle

1

Throttle as percentage*2 [0, 200]


JetiTM ESC Telemetry

The telemetry read from Jeti-TM compatible ESCs is sent as:

Message Type

Bytes

Description

t_esc_tm2

1

Message type (6)

Throttle

1

Throttle value [0, 200]

RPMs

2

Current RPMs

Voltage

10 bits

Input voltage in the range [0, 70] Volts

Temperature

10 bits

Temperature in the range [0, 575] Kelvin

Current

12 bits

Current in the range [0, 400.0] Amps


Jeti BEC Telemetry

The telemetry read from a BEC will be sent in 2 different messages:

  • Message 1:

Message Type

Bytes

Description

t_bec_tm1

1

Message type (7)

Device ID

2

Voltage In

12 bits

Input voltage in the range [0, 70] Volts

Voltage Out

12 bits

Output voltage in the range [0, 70] Volts

Temperature

12 bits

Temperature in the range [0, 575] Kelvin

  • Message 2:

Message Type

Bytes

Description

t_bec_tm2

1

Message type (8)

Device ID

2

Current

12 bits

Current in the range [0, 100.0] Amps


Jeti Temperature Sensor Telemetry

The telemetry read from a Temperature sensor will be send as:

Message Type

Bytes

Description

t_temp_tm

1

Message type (9)

Device ID

2

Temperature 1

12 bits

Measured temperature 1 in the range [0, 750] Kelvin

Temperature 2

12 bits

Measured temperature 2 in the range [0, 750] Kelvin


Set Maintenance Mode Command

This command will configure the CEX in maintence mode, setting its configuration in a way that Communications can work over SCI-A, SCI-B or Serial-Over-CAN configured as:

  • SCI-A and SCI-B: 115200 bauds, 8 data bits, 1 stop, no parity

  • Serial over CAN:

    • TX Id: 1301

    • RX Id: 1301

The format of the command is:

  • cmd (8 bits): t_cmd_maint (16)


Stick Selection Command

This command is used to enable or disable the CEX PPM reader. If the address received matches the CEX’s one, CEX PPM reader will be enabled, otherwise it will be disabled.

The format of the command is:

  • cmd (8 bits): t_stick_sel (17)

  • address (16 bits)