# paradigmengineering/aks-2026-hardware architecture

> Architecture diagram of the GitHub repository paradigmengineering/aks-2026-hardware, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/paradigmengineering/aks-2026-hardware
- Repository: https://github.com/paradigmengineering/aks-2026-hardware

## Overview

This repository contains STM32G474 firmware for an autonomous kart. The principal workflow is the firmware main loop: it monitors safety and timing signals, coordinates steering and braking behavior, and manages the drive controller over CAN; a UART interface provides a separate Jetson communication capability. The graph focuses on application code rather than the bundled STM32 HAL/CMSIS framework. Source excerpts are partial, so unshown peripheral and interrupt wiring is omitted rather than inferred.

Main entry points: [`firmware/ParadigmSTM32G474/Core/Src/main.c`](https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/main.c) (Main Control Loop), [`firmware/ParadigmSTM32G474/Core/Src/drive_can.c`](https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/drive_can.c) (Drive CAN), [`firmware/ParadigmSTM32G474/Core/Src/jetson_uart.c`](https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/jetson_uart.c) (Jetson UART), [`firmware/ParadigmSTM32G474/Core/Src/steering.c`](https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/steering.c) (Steering Control)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Application Control"]
  node_main["Main Control Loop<br/>[main.c]"]
end

subgraph group_vehicle["Vehicle Actuation"]
  node_steering["Steering Control<br/>[steering.c]"]
  node_braking["Braking Control<br/>[braking.c]"]
end

subgraph group_comms["Communications"]
  node_drivecan["Drive CAN<br/>[drive_can.c]"]
  node_jetsonuart["Jetson UART<br/>[jetson_uart.c]"]
end

subgraph group_platform["MCU Platform"]
  node_interrupts["Interrupt Handlers<br/>[stm32g4xx_it.c]"]
  node_system["System Startup<br/>[system_stm32g4xx.c]"]
end

node_signals(("Kart Signals"))
node_driveunit{{"Drive Controller"}}
node_jetson(("Jetson Computer"))

node_signals -.->|"provides signals"| node_main
node_main -->|"uses control"| node_steering
node_main -->|"uses control"| node_braking
node_main -->|"manages drive"| node_drivecan
node_drivecan -.->|"exchanges CAN"| node_driveunit
node_main -->|"uses interface"| node_jetsonuart
node_jetsonuart -.->|"exchanges UART"| node_jetson
node_main -.->|"configures IRQ"| node_interrupts
node_main -.->|"initializes MCU"| node_system

click node_main "https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/main.c"
click node_steering "https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/steering.c"
click node_braking "https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/braking.c"
click node_drivecan "https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/drive_can.c"
click node_jetsonuart "https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/jetson_uart.c"
click node_interrupts "https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/stm32g4xx_it.c"
click node_system "https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/system_stm32g4xx.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main toneBlue
class node_steering,node_braking toneAmber
class node_drivecan,node_jetsonuart toneMint
class node_interrupts,node_system toneRose
class node_signals,node_driveunit,node_jetson toneIndigo
```

## Components

### Application Control

- [Main Control Loop](https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/main.c): `firmware/ParadigmSTM32G474/Core/Src/main.c`

### Vehicle Actuation

- [Steering Control](https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/steering.c): `firmware/ParadigmSTM32G474/Core/Src/steering.c`
- [Braking Control](https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/braking.c): `firmware/ParadigmSTM32G474/Core/Src/braking.c`

### Communications

- [Drive CAN](https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/drive_can.c): `firmware/ParadigmSTM32G474/Core/Src/drive_can.c`
- [Jetson UART](https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/jetson_uart.c): `firmware/ParadigmSTM32G474/Core/Src/jetson_uart.c`

### MCU Platform

- [Interrupt Handlers](https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/stm32g4xx_it.c): `firmware/ParadigmSTM32G474/Core/Src/stm32g4xx_it.c`
- [System Startup](https://github.com/paradigmengineering/aks-2026-hardware/blob/master/firmware/ParadigmSTM32G474/Core/Src/system_stm32g4xx.c): `firmware/ParadigmSTM32G474/Core/Src/system_stm32g4xx.c`

### Other components

- **Kart Signals**
- **Drive Controller**
- **Jetson Computer**

## Connections

- Kart Signals → Main Control Loop: provides signals
- Main Control Loop → Steering Control: uses control (evidence: `firmware/ParadigmSTM32G474/Core/Src/main.c`)
- Main Control Loop → Braking Control: uses control (evidence: `firmware/ParadigmSTM32G474/Core/Src/main.c`)
- Main Control Loop → Drive CAN: manages drive (evidence: `firmware/ParadigmSTM32G474/Core/Src/main.c`)
- Drive CAN → Drive Controller: exchanges CAN
- Main Control Loop → Jetson UART: uses interface (evidence: `firmware/ParadigmSTM32G474/Core/Src/main.c`)
- Jetson UART → Jetson Computer: exchanges UART
- Main Control Loop → Interrupt Handlers: configures IRQ
- Main Control Loop → System Startup: initializes MCU
