Skip to content

STM32 Host Processor Firmware

Overview

---
title: Basic Host Process Flowchart
---
flowchart TD
    Start@{shape: start} --> FlashInit@{shape: rect, label: "Load External Flash"}
    FlashInit --> PeripheralInit@{ shape: rect, label: "Initialize Peripherals"}
    PeripheralInit --> ThreadInit@{shape: processes, label: "Initialize Threads"}
    ThreadInit --> FPGAWrite@{shape: process, label: "FPGA Transmission"}
    ThreadInit --> AccelRead@{shape: process, label: "IMU Data Collection"}
    ThreadInit --> PhysicsEngine@{shape: process, label: "Frame Generator"}

Firmware Sections

The firmware for the STM32 is divided into four sections:

First Start Boot Loader

More research needed

Secure Application

The secure applicaiton will likely have many uses, but the main one down the line will be allowing and controlling OTA firmware update negotiation with the coprocessor.

Non-Secure Application

The majority of the application will be taking place in the non-secure context. The RTOS, peripheral controls, and simulation logic will all happen here.

The initialization stage consists of loading and starting each used peripheral on the processor, such as the parallel bus for the FPGA communication channel, status LEDs for dev indications, I2C or SPI for access to the IMU, and other components within the processor to support the application.

This will be a dedicated thread that collects data in a non-blocking manner from the IMU. Starts with initializing the IMU class and methods, setting up data transfer using DMA

The base application for this cube will be a particle simulator, so there will be a heavy reliance on the FPU of the processor and optimizing its throughput.

The frame generation thread gathers data from the IMU (if required) by calling on the IMU methods. The acquired data from the IMU or the data supplied by the application will be modified and run through the on-board graphics accelerator, if possible.

External Memory Loader

An external memory loader is required for use with the STM32N6 series processor, as there is no internal flash to store the application code on.