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
- Setup to use external oscillator
- Initialize all pins
- Setup PPS(Peripheral Pin Select) for all peripherals
- Initialize ADC, setup to use FVR(Fixed Voltage Reference)
- 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
| Name | Condition |
|---|---|
| 5V_OVER_CURRENT | I 5V_out > 1.8 A |
| 5V_OVER_VOLTAGE | V 5V_out > 5.2 V |
| 5V_UNDER_VOLTAGE | V 5V_out < 4.5 V |
| 12V_OVER_CURRENT | I 12V_out > 2.3 A |
| BATT_OVER_CURRENT | I BATT > 4.5 A |
| BATT_OVER_VOLTAGE | V BATT > 12.7 V |
| BATT_UNDER_VOLTAGE | V BATT < 11.4 V |
| 12V_EFUSE_FAULT | 12V_Fuse_FLT = 0 (Fault signal is active low) |
| 5V_EFUSE_FAULT | 5V_Fuse_FLT = 0 (Fault signal is active low) |
CAN Communication
CAN Message Sent by Firmware
CAN Message Sent by Firmware
| Message Type | Description | Period |
|---|---|---|
| SENSOR_ANALOG.BATT_VOLT | LiPo voltage | 250 ms |
| SENSOR_ANALOG.BATT_CURR | LiPo output current | 250 ms |
| SENSOR_ANALOG.12V_CURR | 12V rail output current | 250 ms |
| SENSOR_ANALOG.5V_VOLT | 5V rail voltage | 250 ms |
| SENSOR_ANALOG.5V_CURR | 5V rail output current | 250 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 Type | Description |
|---|---|
| RESET_CMD | Reset 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 Type | Description |
|---|---|
| ACTUATOR_CMD.12V_RAIL_ROCKET | Turn on/off 12V power output through eFuse |
| ACTUATOR_CMD.5V_RAIL_ROCKET | Turn 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 Type | Description |
|---|---|
| ACTUATOR_CMD.12V_RAIL_PAYLOAD | Turn on/off 12V power output through eFuse |
| ACTUATOR_CMD.5V_RAIL_PAYLOAD | Turn on/off 5V power output through eFuse |
GENERAL_BOARD_STATUS board specific error field usage
GENERAL_BOARD_STATUS board_error_bitfield Bit definition
| Bitfield Name | Description | Offset |
|---|---|---|
| 12V_EFUSE_FAULT | 12V output eFuse Fault | 0 |
| 5V_EFUSE_FAULT | 5V output eFuse Fault | 1 |