Post · 3 min read· pp. 30–32

Rocket Power Board Firmware Design Specification

Overview

Rocket Power Board firmware is responsible for report various voltage and current data to CAN bus, and turn on/off 12V and 5V rail based on CAN command.

Reference Documents

Initialization

  1. Setup to use external oscillator
  2. Initialize all pins
  3. Setup PPS(Peripheral Pin Select) for all peripherals
  4. Initialize ADC, setup to use FVR(Fixed Voltage Reference)
  5. Initialize CAN module with canlib

Runtime

Heart Beat

Blue LED shall toggle every 500ms.

Power output control

Refer to CAN Message Handled by Firmware section below. 5V output enable is controlled by 5V_Fuse_RST/EN pin on the eFuse, when 5V output is enabled , the White LED shall light up. 12V output enable is controlled by 12V_Fuse_RST/EN pin on the eFuse, when 12V output is enabled , the Red LED shall light up. Both 5V and 12V output shall be enabled at power-up.

Sensor Reading

Refer to CAN Message Sent by Firmware section below.

Health Check

Health check shall be performed every 250 ms, immediately after sensor polling. All health check erros are signaled through GENERAL_BOARD_STATUS CAN Message. Note 12V_EFUSE_FAULT and 5V_EFUSE_FAULT are board specific error, refer to GENERAL_BOARD_STATUS board specific error field usage section below.

Errors signaled by health check

NameCondition
5V_OVER_CURRENTI 5V_out > 1.8 A
5V_OVER_VOLTAGEV 5V_out > 5.2 V
5V_UNDER_VOLTAGEV 5V_out < 4.5 V
12V_OVER_CURRENTI 12V_out > 2.3 A
BATT_OVER_CURRENTI BATT > 4.5 A
BATT_OVER_VOLTAGEV BATT > 12.7 V
BATT_UNDER_VOLTAGEV BATT < 11.4 V
12V_EFUSE_FAULT12V_Fuse_FLT = 0 (Fault signal is active low)
5V_EFUSE_FAULT5V_Fuse_FLT = 0 (Fault signal is active low)

CAN Communication

CAN Message Sent by Firmware

CAN Message Sent by Firmware

Message TypeDescriptionPeriod
SENSOR_ANALOG.BATT_VOLTLiPo voltage250 ms
SENSOR_ANALOG.BATT_CURRLiPo output current250 ms
SENSOR_ANALOG.12V_CURR12V rail output current250 ms
SENSOR_ANALOG.5V_VOLT5V rail voltage250 ms
SENSOR_ANALOG.5V_CURR5V rail output current250 ms

CAN Message Handled by Firmware

CAN Message handled in both rocket and payload configuration

CAN Message handled in both rocket and payload configuration

Message TypeDescription
RESET_CMDReset board if targeted(check with check_board_need_reset function in canlib)

CAN Message handled in rocket configuration only (BOARD_INST_UNIQUE_ID = BOARD_UNIQUE_ID_ROCKET)

CAN Message handled in rocket configuration only

Message TypeDescription
ACTUATOR_CMD.12V_RAIL_ROCKETTurn on/off 12V power output through eFuse
ACTUATOR_CMD.5V_RAIL_ROCKETTurn on/off 5V power output through eFuse

CAN Message handled in payload configuration only (BOARD_INST_UNIQUE_ID = BOARD_UNIQUE_ID_PAYLOAD)

CAN Message handled in payload configuration only

Message TypeDescription
ACTUATOR_CMD.12V_RAIL_PAYLOADTurn on/off 12V power output through eFuse
ACTUATOR_CMD.5V_RAIL_PAYLOADTurn on/off 5V power output through eFuse

GENERAL_BOARD_STATUS board specific error field usage

GENERAL_BOARD_STATUS board_error_bitfield Bit definition

Bitfield NameDescriptionOffset
12V_EFUSE_FAULT12V output eFuse Fault0
5V_EFUSE_FAULT5V output eFuse Fault1