---
# System prepended metadata

title: Stabilizing CAN (and drawing straws for work)

---

# Stabilizing CAN (and drawing straws for work)

## Each app gets a stream
- Pro: Simple to implement on Linux side
- Cons: Resource constraints on MCU could hurt scalability/future-proof [3]
- Cons: No support for ISO-TP broadcast messages [2]

### Flavors

#### Each app gets a stream + topic subscription
- Pro: Removes any need to do broadcasting
- Pro: Relatively simple to implement on Linux side
- Cons: Development complexity on MCU side
- Cons: Same resource constraint issues as _base flavor_ [3]

#### Each app gets a stream + managed broadcast stream
- Pro: Still simple to implement on Linux side
- Pro: Removes all needs to do CANFD message chunking _in addition to_ ISO-TP (relevant for broadcasted data) [2]
- Cons: Centralized process that needs
- Cons: Adds additional 2 threads on top of _base flavor_ resource constraints

#### Each app gets a stream + MCU thread pool with arbitration
- Pro: Potentially fixes resource constraints of _base flavor_
- Cons: Development complexity on MCU side [3]

## Three streams on Jetson and apps learn to share
- Pro: Simple to implement on MCU
- Pro: Not crazy complicated on Linux side
- Cons: Have to implement some sort of priority
- Cons: Could become an issue if LED patterns need ISO-TP at same time as update-agent [1]

## Considerations
At present, we only need ISO-TP for:
- orb-core <-> security MCU to do signing
- orb-core <-> main MCU for GPS data
- update-agent <-> main MCU for update data
- update-agent <-> security MCU for update data

### Open questions
- What might we need ISO-TP for in the future? [1]
- When would we _need_ ISO-TP broadcasting? [2]
    - What is the issue with a centralized process for broadcasting? Too clever?
- What, concretely, are our resource limitations on the MCU? [3]

### Next Steps
- [@Cyril Fougeray]() will implement MCU poll-based single-threaded ISO-TP stream PoC to validate if this is both feasible and reasonable.
- ...
- Finalize decision. Freeze discussion. Immortalize in OIP