Logger Board Firmware Design Specification [WIP]
Warning
This is just a template, this is NOT a completed design doc, delete this line when the firmware specification is complete
Overview
Give an overview what does the firmware do, example:
Injector Sensor Hub firmware periodic reads analog sensors and report analog data to CAN, analog sensors includes pressure transducers and hall effect sensors.
Reference Documents
List of reference documents (e.g. link to hardware Datasheets), example:
Initialization
Describe step-by-step initialization sequence, example:
Use setup using external oscillator, with 4xPLL
Setup PPS(Peripheral Pin Select) for all peripherals
Initialize ADC, setup to use FVR(Fixed Voltage Reference)
Setup CAN module
Runtime
Heart Beat
Red LED shall toggle every 500ms.
Health Check
Describe what health check need to be performed, example:
Firmware shall check 12V input voltage every 500ms, and report voltage with
SENSOR_ANALOG.SENSOR_12V_VOLT
CAN message, if the voltage is below 11.5V or above 12.7V, the firmware shall signal error withGENERAL_BOARD_STATUS
CAN message.
Sensor Reading
Describe what sensor shall be read and report to CAN bus, example:
Firmware shall read Oxidizer pressure transducer every 50 ms, ADC voltage reading shall be convert to pressure use formula described in Convert pressure transducer ADC pin voltage input to pressure section, when the pressure output be send to can use
SENSOR_ANALOG.PRESSURE_OX
CAN message.
CAN Communication
CAN Message Sent by Firmware
Message Type |
Description |
Period |
---|---|---|
SENSOR_ANALOG.PRESSURE_OX |
Report oxidizer tank pressure |
10ms |
CAN Message Handled by Firmware
Message Type |
Description |
---|---|
RESET_CMD |
Reset board if targeted(check with |
GENERAL_BOARD_STATUS board specific error field usage
Bitfield Name |
Description |
Offset |
---|---|---|
PT_OUT_OF_RANGE |
4-20 mA Pressure transducer signals less that 4mA or more than 20mA |
0 |
Mathematics Model
Describe common used math equations in the firmware, if the equation is more than one line, then a link to a Matlab model should be provided.
Convert pressure transducer ADC pin voltage input to pressure
Insert formula here