STM32

platforms

courses

operating systems

  • bare metal stm bootloader and bare metal code
  • zephyr RTOS real time operating system

typical STM32 appliances (they are everywhere!)

glossary

  • FPU: floating point unit, hardware based floating point operations that otherwise have to be performed by CPU
  • USB OTG FS: USB on the go means device can act as a USB device or USB host. FS means full speed, 12mbps data rate
  • MCU: microcontroller unit, the CPU, often able to execute ARM instructions from the flash memory
  • modules
    • SPI: serial peripheral interface, high speed serial link for devices like screens and SD cards
    • I2C: inter integrated circuit, simpler 2 wire communication for low speed sensors
    • CAN: controller Area Network, industrial bus for vehicles, robots, automation etc
    • UART: Universal asynchronous receiver transmitter, serial communicatiom for debugging or gps modules
    • ADC: analog digital converter, read analog values to pins
    • DAC: digital analog converter, output analog values to pins
    • TIMERS: hardware counters for pulse width modulation signals

bootloader

  • when the device powers on, it executes a specific memory address first
  • check for a signal to enter programming mode or standard mode
  • if standard, jump to user program
  • if programming, setup serial interface or USB devices to allow firmware upload

Types of bootloaders

  • UF2: originally designed for micro: bit
  • ST hardware bootloader: “burned” to read only system memory, not modify able, can be used as fallback to re-flash firmware by making setting boot pin high at boot

memory

  • Flash memory: writeable firmware
  • SRAM: temporary runtime memory
  • System Memory (ROM): Factory bootloader
  • STM Memory Map

programmable fuses

  • “option bytes” stored in a protected area of flash

debugging

project ideas

  • Secure Growatt RS232 reader