Comparing STM32 and RP2350 Performance
The RP2350 is unusual: it has two Arm Cortex-M33 cores and two Hazard3 RISC-V cores, and the bootrom starts whichever pair matches the image in flash. That makes it possible to compare the two architectures on the exact same silicon, and to put both against well known STM32 parts.
All RP2350 numbers on this page were measured on a Streamline RP2354 MCU board, flashed and monitored through a Streamline Connect running Hybridlink firmware. Every benchmark runs on both cores at the same time. Each core reports its own result (the two cores always agree to within 0.1%), and the tables show both the per core figure and the both cores total, which is the sum of the two. The source for all benchmarks is in the rpfun repository (see #Source code).
Compilers used: Arm GNU Toolchain 15.2 (Arm) and the Raspberry Pi RISC-V toolchain RISCV_PICO_2_3_1_0 / GCC 16.1 (RISC-V), Pico SDK 2.3.1, -O3.
CoreMark
EEMBC CoreMark is the most widely published MCU benchmark, so it is the best one for comparing against STM32. The RP2350 runs are standard 2K performance runs, each about 14-16 seconds, and both report "Correct operation validated".
| MCU | Core | Clock | CoreMark | CoreMark/MHz | Source |
|---|---|---|---|---|---|
| STM32F103 | Cortex-M3 | 72 MHz | ~81-96 | ~1.1-1.3 | Community runs (ST does not publish CoreMark for F1)[1][2] |
| STM32F405/407 | Cortex-M4F | 168 MHz | 566 | 3.37 | ST[3] |
| STM32H562 | Cortex-M33 | 250 MHz | 1023 | 4.09 | ST datasheet, Arm Compiler 6.16[4][5] |
| STM32H723 | Cortex-M7 | 550 MHz | 2778 | 5.05 | ST[6] (one user reached 2136 with GCC[7]) |
| RP2350 Arm | Cortex-M33 | 150 MHz | 380 | 2.53 | Measured, per core |
| RP2350 RISC-V | Hazard3 | 150 MHz | 441 | 2.94 | Measured, per core |
| RP2350 Arm, both cores | 2 × Cortex-M33 | 150 MHz | 760 | 5.06 | Measured, sum of both cores |
| RP2350 RISC-V, both cores | 2 × Hazard3 | 150 MHz | 883 | 5.88 | Measured, sum of both cores |
| RP2350 Arm, both cores | 2 × Cortex-M33 | 540 MHz (overclocked) | 2735 | 5.06 | Measured, sum of both cores |
| RP2350 RISC-V, both cores | 2 × Hazard3 | 540 MHz (overclocked) | 3164 | 5.86 | Measured, sum of both cores |
The RP2350 at stock and overclocked speeds:
| Core | 150 MHz / 1.10 V | 320 MHz / 1.30 V | 540 MHz / 1.60 V | |||
|---|---|---|---|---|---|---|
| Per core | Both cores | Per core | Both cores | Per core | Both cores | |
| Arm Cortex-M33 | 380 | 760 | 811 | 1622 | 1367 | 2735 |
| Hazard3 RISC-V | 441 | 883 | 942 | 1884 | 1582 | 3164 |
Things to keep in mind when reading the table:
- The STM32 figures are vendor best case, typically built with Arm Compiler or IAR and tuned flags. The RP2350 figures are stock GCC
-O3. CoreMark results vary a lot with compiler and settings, which ST itself points out[5]. - The STM32H562 has the same Cortex-M33 core as the Arm side of the RP2350, yet ST gets 4.09 CoreMark/MHz versus 2.53 here. Most of that difference is compiler (Arm Compiler vs GCC) and memory: the H562 runs from 0 wait state internal flash, the RP2350 runs from external QSPI flash through a 16 kB XIP cache.
- Even at the stock 150 MHz a single RP2350 core is roughly 4× an STM32F103. Both cores together beat an STM32F405 running at 168 MHz.
- Overclocked to 540 MHz, both Arm cores together (2735) are level with ST's best case figure for the STM32H723 (2778), and both RISC-V cores together (3164) beat it. Per core the Cortex-M7 in the H723 is of course still much faster.
- On the RP2350 the Hazard3 RISC-V core is about 16% faster than the Cortex-M33 in this integer benchmark.
Dhrystone
Dhrystone 2.1, reported in DMIPS (1757 Dhrystones per second = 1 DMIPS), with both cores running at the same time.
| Core | 150 MHz / 1.10 V | 320 MHz / 1.30 V | 540 MHz / 1.60 V | |||
|---|---|---|---|---|---|---|
| Per core | Both cores | Per core | Both cores | Per core | Both cores | |
| Arm Cortex-M33 | 225 | 451 | 481 | 962 | 807 | 1615 |
| Hazard3 RISC-V | 270 | 541 | 576 | 1152 | 989 | 1979 |
The results (here and for CoreMark) scale almost perfectly with clock speed. The two cores always score the same as each other, so the both-cores total is essentially twice the per-core figure. Above 320 MHz the flash has to be switched to the slow serial command XIP mode, but because the benchmark lives in the XIP cache this makes no measurable difference.
For reference, ST quotes 1.25 DMIPS/MHz for the STM32F103 (about 90 DMIPS at 72 MHz)[8] and 210 DMIPS at 168 MHz for the STM32F405/407[3].
Whetstone (floating point)
Whetstone in single and double precision, reported in MWIPS, with both cores running at the same time.
| Core | Precision | 150 MHz / 1.10 V | 320 MHz / 1.30 V | 540 MHz / 1.60 V | |||
|---|---|---|---|---|---|---|---|
| Per core | Both cores | Per core | Both cores | Per core | Both cores | ||
| Arm Cortex-M33 | float | 320 | 641 | 675 | 1350 | 1139 | 2277 |
| Hazard3 RISC-V | float | 35 | 70 | 75 | 149 | 127 | 255 |
| Arm Cortex-M33 | double | 138 | 277 | 295 | 589 | 497 | 994 |
| Hazard3 RISC-V | double | 15 | 31 | 33 | 65 | 55 | 110 |
This is where the architectures really differ. The Cortex-M33 cores have a single precision FPU (plus the RP2350 double precision coprocessor), while the Hazard3 cores have no FPU at all and do floating point in software. The Pico SDK ships hand optimised Hazard3 routines for single precision add, subtract and multiply (about 37% faster than plain libgcc in this test), but division, the math library and all double precision come from the generic libraries. The result is roughly a 9× advantage for Arm in floating point.
Summary
- Integer code (CoreMark, Dhrystone): the RISC-V cores are 16-20% faster than the Arm cores at the same clock.
- Floating point code (Whetstone): the Arm cores are about 9× faster.
- Per core at stock clock the RP2350 sits between an STM32F1 and an STM32F4. Both cores at stock clock beat an STM32F4. Both cores overclocked to 540 MHz reach STM32H723 level in CoreMark (2735 Arm, 3164 RISC-V vs 2778).
Source code
All benchmarks are in the rpfun repository for the RPPicoWorld YouTube channel. Each pair differs only in PICO_PLATFORM and the toolchain:
- CoreMark: coremark_arm / coremark_riscv
- Dhrystone: dhrystone_arm / dhrystone_riscv
- Whetstone: whetstone_arm / whetstone_riscv
All projects default to the stock 150 MHz / 1.10 V. To overclock, configure with for example -DSYS_CLOCK_KHZ=320000 -DCORE_VOLTAGE=VREG_VOLTAGE_1_30 or -DSYS_CLOCK_KHZ=540000 -DCORE_VOLTAGE=VREG_VOLTAGE_1_60. The repository README explains how to flash Arm and RISC-V images back to back with a CMSIS-DAP probe without falling back to BOOTSEL.
References
- ↑ kreier: CoreMark benchmark table
- ↑ hacklabos: CoremarkPlatform
- ↑ 3.0 3.1 ST: STM32F405/415 and STM32F407/417 line
- ↑ ST: STM32H562 product page and datasheet
- ↑ 5.0 5.1 ST Community: How to run a CoreMark benchmark on an STM32
- ↑ ST: STM32H723/733 product page
- ↑ ST Community: STM32H723, how to achieve the CoreMark figure
- ↑ ST: STM32F103 product page