STM32 and ARM Cortex Firmware Engineering for Product Teams

For OEMs and product teams building on STM32 or other ARM Cortex M and Cortex A devices, EmbedCrest delivers firmware architecture, drivers, low power tuning, secure boot and update paths, so the product reaches stable, maintainable firmware that fits its power and cost budget. We work from evaluation board through custom hardware bring up to production release.

Technically reviewed by the EmbedCrest engineering teamUpdated

Who this is for

  • CTO or VP Engineering at an OEM
  • Engineering Manager or Embedded Lead
  • Product Founder or Hardware Startup
  • System Integrator or Automation OEM

Outcomes we work towards

  • Right sized MCU chosen before the schematic is frozen
  • Lower standby current and longer battery life
  • Firmware that survives hardware revisions without rewrites
  • A signed, recoverable update path for field units

Which Cortex core, which STM32 family, and which driver layer?

The STM32 portfolio spans Cortex M0+ parts that cost very little to Cortex M7 and dual core devices that rival small application processors. Teams often pick a part from a previous project, then discover late that RAM, flash, low power modes or security features do not match the product. Generated HAL code gets mixed with hand written register access, interrupts grow unbounded and power figures drift from the datasheet. Fixing this after tooling and certification testing have started is expensive and delays launch.

Scope

What We Design, Build and Hand Over

  • Core and part selection across Cortex M0+, M4, M7, M33 and STM32MP Cortex A devices
  • Clock tree, pin muxing and peripheral configuration with STM32CubeMX kept under version control
  • HAL, LL or register level drivers chosen per peripheral for timing and code size
  • Bare metal, FreeRTOS or Zephyr firmware architecture with interrupt, DMA and watchdog design
  • Low power design using Sleep, Stop and Standby modes, wake sources and current profiling
  • TrustZone partitioning on Cortex M33 parts, secure boot and firmware signing
  • Bootloader and OTA update with rollback protection
  • Unit, integration and hardware in the loop tests with static analysis in CI
Comparison

ARM Cortex M cores by typical use

ARM Cortex M cores by typical use
CoreStrengthsTypical STM32 familiesTypical products
Cortex M0+Lowest cost and power, small codeSTM32C0, G0, L0, U0Sensors, simple controllers, accessories
Cortex M4DSP instructions, single precision FPUSTM32F4, G4, L4, WBMotor control, metering, wearables
Cortex M7High clock, caches, larger memoriesSTM32F7, H7Edge AI, graphics, gateways, audio
Cortex M33Armv8 M with TrustZone and DSPSTM32L5, U5, H5, WBASecure connected and low power devices
Use Cases

Where Teams Use This

Battery powered sensor node on STM32L or STM32U

Firmware that spends most of its life in Stop mode, wakes on RTC or sensor interrupt, samples, transmits and returns to sleep, with current measured on real hardware to validate the battery life estimate.

Motor and power control on STM32G4

Timer, ADC and DMA configuration for field oriented control or digital power loops, with interrupt latency measured and control code isolated from communication tasks so timing stays deterministic.

Industrial edge node on STM32H7

Ethernet, RS 485 and storage on a high performance Cortex M7, running an RTOS with protocol stacks, local buffering and room for lightweight machine learning inference at the edge.

Legacy 8 bit firmware migration to Cortex M

Reverse engineering of existing behaviour, then reimplementation on an STM32 with an RTOS, modern connectivity and secure boot while keeping field compatibility with existing installations.

Process

How the Work Runs

  1. Requirements and part shortlist

    Capture peripherals, memory, power, security and volume needs, then compare candidate STM32 or Cortex parts and confirm lifecycle availability with your distributor.

  2. Evaluation board spike

    Prove the riskiest functions on a Nucleo or Discovery board, such as low power current, ADC accuracy or control loop timing, before hardware is committed.

  3. Architecture and drivers

    Define layering, task model, interrupt priorities and memory map, then build drivers and middleware with clear interfaces to application code.

  4. Board bring up

    Bring up the custom board peripheral by peripheral, log hardware issues back to the PCB designer and freeze a stable board support layer.

  5. Validation and release

    Run unit, integration and hardware in the loop tests, measure power and timing against targets and produce signed, versioned release builds.

Deliverables

What You Receive

  • MCU selection note with trade offs and risks
  • Firmware architecture document and memory map
  • Source code with reproducible build and CI configuration
  • STM32CubeMX project or equivalent configuration under version control
  • Bootloader, signing scripts and OTA procedure
  • Power and timing measurement report
  • Test reports and release notes per version

Have a similar challenge?

Share a short brief; an engineer replies within one business day. How engagements work

Prefer a fixed scope start? Firmware Health and Security Audit

Discuss Your STM32 Firmware Project
FAQ

Questions About STM32 and ARM Cortex

Should we use the STM32 HAL or the LL drivers?

Use the HAL for most peripherals because it speeds development and is portable across STM32 families, and use the Low Layer (LL) drivers or direct register access where timing, interrupt latency or code size matter. Mixing is normal. What matters is a clear driver boundary so application code never depends on which layer sits underneath.

What does TrustZone on Cortex M33 actually give a product?

TrustZone for Armv8 M splits the microcontroller into secure and non secure worlds enforced by hardware. Keys, cryptography, secure boot verification and update logic run in the secure world, while application and communication code run in the non secure world. A bug in the application then cannot read keys directly. It adds design effort, so it suits products with real security requirements.

How do you reduce power consumption on an STM32 design?

Power is reduced by spending as much time as possible in the deepest usable low power mode, such as Stop or Standby, and by keeping active time short. That means choosing wake sources, gating unused clocks and peripherals, configuring unused pins correctly, batching radio traffic and measuring current on real hardware with a power analyser rather than trusting estimates.

When should we move from Cortex M to a Cortex A processor?

Move to a Cortex A application processor, such as the STM32MP family, when the product needs embedded Linux features: a rich graphical interface, many network services, large storage, containers or complex third party software. Keep a Cortex M, often on the same chip, for hard real time control. If the feature set fits in an RTOS, Cortex M usually costs less and draws less power.

Can you work with our existing STM32 code base?

Yes. We first reproduce your build, review structure, drivers, interrupt handling and update logic, and list risks in priority order. Then we fix stability issues, add tests around the code we touch and extend features incrementally. A full rewrite is proposed only when the audit shows the existing structure blocks the roadmap.

Ready to Scope STM32 and ARM Cortex?

Share your product or plant context. An engineer reviews it and replies with questions, a proposed approach and next steps.

Discuss Your STM32 Firmware Project
Discuss Your STM32 Firmware Project