coloradocube / flight-executive-in-python

A lightweight flight executive for balloonsats and cubesats which do not require the full capabilities and complexity of NASA cFS. Written in Python.
0 stars 1 forks source link

Poll sensor-board sensors over SPI-CAN-I2C cascade #12

Open ivogeorg opened 2 years ago

ivogeorg commented 2 years ago

Description

The simple connection of the sensors to Qwiic HAT on the RPi 4 is now quite a bit more complicated. We have the following architecture (EPS not shown):

Use case

The data travels over 3 different serial buses, two of them networks (CAN and I2C) and one a master-slave (SPI).

Design notes

  1. On the top of the software stack is the FlightExecutive Python code, in particular the DataSource class with its methods poll and check (and, possibly, discover).
  2. At the CM4 (master) - MCP2510 (slave) SPI interface, the CM4 has to poll for data from the CAN bus, including the sensors served by other CAN nodes (sensors board, EPS). There needs to be a simple protocol for acquiring the data the CM4 is polling for.
  3. The MCP2510 and the PIC18F47Q84 are communicating over CAN. They need to have a simple protocol for transferring telemetry and making it available for the CM4.