What the STM32 family is, and why it matters for real-time control
STMicroelectronics’ STM32 family is a line of 32-bit microcontrollers built around Arm Cortex-M processor cores. The family spans ultra-low-power Cortex-M0+ parts, mainstream Cortex-M3/M4F parts, and high-performance Cortex-M7 and Cortex-M33 parts [S1][S3][S15]. For real-time control, the most relevant subfamilies are:
- STM32F3/F3xx — mixed-signal MCUs with motor-control timers and fast ADCs.
- STM32F4 — Cortex-M4F with single-precision FPU, DSP instructions, ART Accelerator flash prefetch, and up to 168 MHz operation [S3][S4].
- STM32G4 — Cortex-M4F at 170 MHz with the high-resolution timer (HRTIM), op-amps, comparators, 12-bit ADCs, and digital-power peripherals [S1][S2].
- STM32H7 — Cortex-M7 with double-precision FPU and higher-frequency operation for computationally heavier control/communications loops [S15].
The relevant “real-time” claim is not that these MCUs are immune to delay, but that their interrupt/timer/ADC/DAC/FPU blocks are designed to support deterministic control loops with bounded worst-case latency. The actual bounds are architecture- and memory-system-specific, and that distinction is central to the contradictions section below.
Architecture-level real-time control chain
A canonical STM32G4 real-time control path looks like this:
- ADC samples current/voltage from a power stage or motor-phase shunt.
- Control ISR runs a PID/field-oriented-control loop using the FPU and DSP instructions.
- PWM timer updates duty cycles on the next timer period.
- Fault/comparator interrupts shut down outputs asynchronously.
2.1 High-resolution timer (HRTIM)
The STM32G4’s HRTIM is the clearest hardware differentiator for digital power. ST’s G4 reference manual describes a 184 ps high-resolution timing step [S2]. This is not a 5.44 GHz CPU clock; it is a high-resolution timing unit allowing fine pulse placement. The equivalent step frequency is:
\[
f_{\text{step,eq}} = \frac{1}{184\text{ ps}} = \frac{1}{184 \times 10^{-12}} \approx 5.43 \text{ GHz}
\]
That is the timing-equivalent resolution, not the core frequency. The standard TIM1 timer on the same device runs from the 170 MHz timer clock [S1][S2].
2.2 Floating-point support
The STM32G4/F4 use an Arm Cortex-M4F core with a single-precision FPU [S1][S3][S5]. IEEE 754-2019 defines the floating-point semantics [S6]. A single-precision FPU lets a control loop use float PID coefficients without hand-scaling fixed-point math, reducing firmware complexity and porting errors. The H7 adds double-precision FPU coverage via Cortex-M7 [S15].
2.3 Interrupt latency and determinism
Arm documentation reports a 12-cycle interrupt latency for the Cortex-M4 under zero-wait-state memory assumptions [S5]. The key phrase is “under zero-wait-state memory assumptions.” Flash wait states, DMA contention, and bus arbitration add cycles. ST’s RM0090 for the STM32F407 documents flash wait-state increases as CPU frequency rises [S4]; exact wait-state numbers for each configuration are not re-derived here and are marked needs primary source validation where specific table values are used.
Quantitative worked calculation: PWM duty resolution
The most important real-time-control performance question for digital power is:
How finely can the MCU place a PWM edge?
We compare a standard 170 MHz timer with the STM32G4 HRTIM at 184 ps resolution.
3.1 Formula
For a simple up-counting PWM period at frequency \( f_{\text{pwm}} \):
\[
N = \frac{1 / t_{\text{step}}}{f_{\text{pwm}}}
\]
or, for a standard clocked timer:
\[
N = \frac{f_{\text{timer}}}{f_{\text{pwm}}}
\]
where:
- \( N \) = timer counts per PWM period
- \( t_{\text{step}} \) = timer resolution in seconds
- \( f_{\text{timer}} \) = timer clock frequency
- \( f_{\text{pwm}} \) = PWM frequency
Minimum duty-cycle step, expressed as a percentage of full duty:
\[
D_{\min} = \frac{100}{N}
\]
3.2 Inputs
| Input | Value | Source |
|---|---|---|
| Standard timer frequency | 170 MHz | [S1][S2] |
| HRTIM resolution | 184 ps | [S2] |
| PWM frequency | 20 kHz | Assumed design point, representative of motor/digital-power loops |
| Second PWM frequency | 100 kHz | Sensitivity case |
3.3 Standard timer at 20 kHz
\[
N = \frac{170 \times 10^6}{20 \times 10^3} = 8,500
\]
\[
D_{\min} = \frac{100}{8,500} \approx 0.01176\%
\]
That is about 117.6 ppm duty-cycle resolution.
3.4 HRTIM at 20 kHz
\[
N = \frac{1 / (184 \times 10^{-12})}{20 \times 10^3} = \frac{5.4348 \times 10^9}{20 \times 10^3} = 271,739
\]
\[
D_{\min} = \frac{100}{271,739} \approx 0.000368\%
\]
That is about 3.68 ppm duty-cycle resolution.
3.5 Sensitivity table
| Case | N counts/period | Minimum duty step |
|---|---|---|
| 170 MHz timer, 20 kHz | 8,500 | 117.6 ppm |
| HRTIM, 20 kHz | 271,739 | 3.68 ppm |
| 170 MHz timer, 100 kHz | 1,700 | 588.2 ppm |
| HRTIM, 100 kHz | 54,348 | 18.4 ppm |
| HRTIM degraded to 200 ps, 20 kHz | 250,000 | 4.0 ppm |
The HRTIM provides roughly 32× finer duty resolution than the standard 170 MHz timer at 20 kHz, and the advantage grows at higher PWM frequencies. This is the primary quantitative justification for using STM32G4 in high-bandwidth digital power.
Sensitivity conclusion: If the true HRTIM resolution were 200 ps instead of 184 ps, resolution would degrade by roughly 8.7% at fixed PWM frequency. If PWM frequency rises from 20 kHz to 100 kHz, HRTIM resolution degrades by 5×, but it remains far above the standard timer’s 20 kHz resolution. Those proportions are derived from the formula above; the 184 ps input is from ST’s reference manual [S2], and the 170 MHz input is from ST’s G4 product page [S1].
Parameter table
| Parameter | Value | Source (URL + ID + date) | Tier | Measured/derived/assumed/inferred | Cross-verified (yes/no/single-source) |
|---|---|---|---|---|---|
| STM32G4 core frequency | 170 MHz | [S1] STM32G4 product page, accessed 2026-04-22 | 2 | Company self-reported | single-source |
| HRTIM resolution | 184 ps | [S2] RM0440, accessed 2026-04-22 | 2 | Company self-reported; derived equivalent step 5.43 GHz | single-source |
| STM32F407 core frequency | 168 MHz | [S3] STM32F4 product page, accessed 2026-04-22 | 2 | Company self-reported | single-source |
| Cortex-M4F FPU type | Single-precision | [S5] Arm Cortex-M4 TRM, accessed 2026-04-22; IEEE 754 semantics [S6] | 2 + 1 | Standards/company | Yes: Arm core supports IEEE 754 single-precision operations [S5][S6] |
| Cortex-M4 interrupt latency | 12 cycles | [S5] Arm Cortex-M4 TRM, accessed 2026-04-22 | 2 | Company/architecture self-reported, zero-wait-state condition | single-source |
| Flash wait-state effect | Wait states increase with core frequency | [S4] RM0090, accessed 2026-04-22 | 2 | Company self-reported; exact table values not re-derived | single-source |
| PWM frequency for worked calculation | 20 kHz / 100 kHz | Assumed design point | 2 | Assumed | n/a |
| HRTIM equivalent step frequency | ~5.43 GHz | Derived from [S2] | 2 | Derived | n/a |
| Duty resolution HRTIM, 20 kHz | 3.68 ppm | Derived from [S2] | 2 | Derived | n/a |
| Duty resolution standard timer, 20 kHz | 117.6 ppm | Derived from [S1][S2] | 2 | Derived | n/a |
Contradictions, source limits, and marketing-vs-filing gaps
5.1 “Real-time” marketing vs. memory-bound latency
ST positions STM32G4 as a real-time digital-power MCU [S1]. Arm’s 12-cycle Cortex-M4 interrupt-latency figure is conditioned on zero-wait-state memory [S5]. ST’s own RM0090 flash interface section documents increasing wait states as the core frequency rises [S4]. This is a direct technical contradiction between the headline “deterministic real-time” language and the memory-system reality: the MCU is deterministic only if the designer accounts for wait states, cache behavior, DMA arbitration, and ISR preemption.
Because the 12-cycle latency figure is a single-source architecture number from Arm, and the flash wait-state interaction is a single-source company number from ST, the combined worst-case latency claim should be treated as needs primary source validation until an independent measurement or a Tier 1 technical assessment confirms it.
5.2 HRTIM resolution vs. physical output resolution
The HRTIM’s 184 ps internal resolution [S2] does not automatically mean the PWM output at the package pin has that resolution. Output slew rate, pin load, board parasitic inductance/capacitance, and gate-driver propagation delay impose additional distortion. ST’s documentation does not make the pin-level analog edge placement a Tier 1 independent guarantee. This is a source-bound claim: the 184 ps is a digital-timer figure, not an end-to-end output spec.
5.3 Company filing discrepancy search
STMicroelectronics files periodic reports with the SEC [S8]. The risk-factor text and MDG segment disclosures were not fully retrieved in this session, so the specific language cannot be quoted. The discrepancy to investigate is whether ST’s SEC filings treat real-time control performance as a contractual or product-warranty commitment. Based on typical semiconductor disclosures, product datasheet performance is usually not a warranty; that is a hypothesis requiring needs primary source validation against the actual 20-F/6-K text.
5.4 Patent evidence
The HRTIM and ART Accelerator implementations are likely covered by STMicroelectronics or Arm patent families, but this note does not assert a specific granted patent number because no identifier could be verified. A granted patent only demonstrates recorded claims; it does not prove performance or commercial viability. The patent-tier evidence is therefore needs primary source validation.
5.5 Peer-reviewed paper evidence
No DOI-verified peer-reviewed paper on STM32-based real-time control is asserted in this note. A suitable paper would be an IEEE Transactions on Industrial Electronics or IEEE Access article measuring STM32G4/F4 control-loop latency and PWM resolution under representative load conditions. Without a verified DOI, the paper-tier claim is needs primary source validation.
Unit economics / business model
6.1 Who monetizes this technology
- STMicroelectronics monetizes STM32 as silicon units sold through distributors and direct OEM accounts. The STM32CubeMX/IDE software and HAL/LL libraries are provided to lower the design-in cost and accelerate adoption, but the main revenue is MCU sales [S7][S8].
- Arm Holdings earns licensing fees and royalty revenue from the Cortex-M CPU IP inside every STM32 [S9].
- Commercial toolchain vendors, such as Keil and IAR, monetize compiler/debugger seats on top of the free GCC-based STM32CubeIDE path [S7].
- Distributors and design-service firms capture margin and integration revenue, but they are not chip designers.
6.2 How they monetize it
- Chip sale — ST sells STM32F4/G4/H7 silicon; the free software is a customer-acquisition and design-win tool, not a subscription product [S7].
- IP royalty/license — Arm captures a per-chip royalty or license fee for Cortex-M cores [S9].
- Toolchain/service — Keil MDK, IAR Embedded Workbench, and third-party firmware stacks sell per-seat licenses; ST’s own STM32CubeIDE is free [S7].
6.3 Typical margins
Specific MDG segment gross/operating margins are not asserted in this note because they require the most recent SEC filing line items. They are needs primary source validation from [S8]. Semiconductor companies in general carry high operating leverage: once an MCU architecture is developed, incremental wafer/test/package cost is relatively low, but ST-specific margin figures must be pulled from the filings.
6.4 Who captures the value
ST captures the largest direct share as the chip designer/seller. Arm captures a smaller per-unit IP royalty. Distributors capture low-single-digit distribution margins. The customer captures design-in value through lower BOM cost and software development time. The free-tools model shifts value from software to silicon, which preserves ST’s chip-sale monetization rather than creating a software-subscription line.
Disconfirming Evidence
The investment/technology thesis for STM32G4/F4 in real-time control would be weakened by any of the following:
- An independent, Tier 1-verified benchmark showing that effective STM32G4/F4 control-loop latency under realistic flash wait states and DMA/bus contention is materially worse than Arm’s zero-wait-state figure [S5].
- A competing MCU, such as a TI C2000 or a RISC-V MCU, shipping similar high-resolution PWM, faster real ADCs, and better toolchain determinism at lower cost [S10].
- ST’s SEC filings showing declining MDG segment revenue, share loss in industrial MCUs, or gross margins that do not support the R&D needed to extend STM32 [S8].
- Evidence that the HRTIM’s 184 ps digital resolution does not translate into meaningful output advantage in customer systems, or that customers are forced to add external FPGAs/Gate drivers to recover the lost analog performance [S1][S2].
- A shift by major customers away from Cortex-M MCUs toward higher-integration power SoCs or RISC-V/FPGA control paths.
Original scope and definitions
Cortex-M processor-based microcontrollers running real-time control loops, sensor processing, and simple edge AI inference for robotics and industrial automation
Why it matters to the thesis
Every robot, cobot, and industrial machine needs embedded control at the edge. STM32 has deep software ecosystem and high design-win stickiness, reducing customer switching costs.
Operating constraints
- Bottleneck type: Software ecosystem lock-in; design-win stickiness; historical penetration in installed base
- Technical constraint: Real-time determinism; interrupt latency; memory constraints for AI inference; thermal limits
- Economic constraint: Ecosystem switching cost (millions of lines of STM32 firmware); OEM retraining; validation/certification cycles
Adoption
- Driver: Edge AI trend (latency + privacy); robotics proliferation; industrial IoT; autonomous vehicle ECU density
- Blocker: ARM Cortex-M competition from Infineon, NXP; RISC-V emerging as alternative; continued cyclical weakness delaying OEM new-design activity
Product categories
STM32H7 (Cortex-M7), STM32F4/F7, STM32U5 (security-enhanced), STM32MP1 (multicore ARM Cortex-A/M)
Validation signals
Robot/cobot OEM design-win announcements using STM32; industrial PLC migration to STM32; edge AI inference benchmarks on Cortex-M
Invalidation signals
Major OEM switching to ARM Cortex-A cores (moving away from Cortex-M); RISC-V gaining material design share
Who buys it
Named customer classes from vendor product-page evidence:
- Industrial motor drives and servo control — STM32G4/F3 target field-oriented control of BLDC/PMSM motors [S1][S3].
- Digital power conversion — STM32G4 targets PFC, LLC, phase-shifted full-bridge, and other high-efficiency converters via HRTIM, high-speed ADC, and programmable ramp compensation [S1][S2].
- Solar and energy-storage inverter makers — ST lists renewable-energy control as a target for STM32G4 [S1].
- Electric-vehicle charging and heat-pump/industrial-appliance makers — STM32G4 and STM32F4 are positioned for EV charging and appliance motor drives [S1][S3].
- General embedded/industrial automation OEMs — STM32F4/F7/H7 are used where higher compute, Ethernet, USB, or GUI support matters [S3][S15].
- Robotics, drones, and 3D printers — STM32F4/G4 motor-control and sensor-processing parts are used in these classes; this is a usage inference from ST’s target applications, not a named buyer list, so the individual buyer names are not fabricated.