IonizationChamber/Software/Firmware
RobertGawron 1d135abdae add more uml diagrams 2024-12-11 17:04:18 +01:00
..
Inc remove pointless comments 2020-10-22 11:55:36 +02:00
STM8S_StdPeriph_Lib Unify folder name convention with my other repos (first upper letter singular nouns) 2020-10-22 11:41:53 +02:00
Src remove pointless comments 2020-10-22 11:55:36 +02:00
.cproject Unify folder name convention with my other repos (first upper letter singular nouns) 2020-10-22 11:41:53 +02:00
.project Unify folder name convention with my other repos (first upper letter singular nouns) 2020-10-22 11:41:53 +02:00
CMakeLists.txt Unify folder name convention with my other repos (first upper letter singular nouns) 2020-10-22 11:41:53 +02:00
README.md add more uml diagrams 2024-12-11 17:04:18 +01:00

README.md

Architecture

Below is the sequence diagram for the firmware.

firmware sequence diagram

Building Firmware

Docker is used to create an isolated and reproducible work environment.

Detailed information about setting up the environment.

Protocol for sending measurements via UART

Purpose

To ensure data integrity when sending information from the ionization chamber device to the computer, a simple protocol was added to encapsulate each data or command transmission.

Protocol details

Definition of the message

The field “msg length” describes the number of bytes in the “data” section.

The content of the data section in the above message is an example and may vary depending on the message ID. Currently, only one message is supported, as shown above.

Defined message ids and message content

Currently, only one message type is defined (with ID = 1).

  • Msg ID: 1 - Data from the last analog measurement of the actual value. Msg Data Section:
    • ADC configuration
    • MSB (most significant byte) from ADC
    • LSB (least significant byte) from ADC

CRC

The CRC is calculated by XOR-ing all bytes in the "preamble" and "data" sections.