STM32F411 Black Pill simulator
Mokxi models the WeAct "Black Pill" on our own Cortex-M4 core, running the STM32F411 at 84 MHz. GPIO, TIM1 through TIM5, the ADC, USART1, SysTick and the NVIC use their real addresses. Test finished firmware on the physical board too.
- 8peripheral areas modeled
- 3projects ready to run
- Real timeon your own machine
What is modeled
Taken from the board's own contract document and put in plain words, with what is missing beside it.
Modeled
- Core
- Cortex-M4 (ARMv7-M), no FPU, with the datasheet cycle count of every instruction
- GPIO
- Ports A to D, with the real MODER, OTYPER, PUPDR and BSRR registers at their real addresses
- TIM1 to TIM5
- Up, down and center-aligned counting, with glitch-free PWM through ARPE and OCxPE
- ADC1
- Twelve bits on PA0 to PA7, PB0 and PB1, read through analogRead in STM32duino’s ten by default
- USART1
- Paced at the configured baud rate, wired to the serial monitor
- SysTick and the NVIC
- The real priority bits and interrupt lines, so a handler runs the way the datasheet says
- Sleep
- WFI parks the core between events, so an idle sketch costs almost nothing to simulate
- Memory map
- The real STM32F411 addresses for everything above, so a build is not Mokxi-specific
Not modeled
- DMA, I2C and SPI. Their registers are unmapped, so touching one is a fault rather than a silent zero.
- USB. PA11 and PA12 are plain GPIO here.
- The clock tree. SYSCLK is fixed at 84 MHz from power-on rather than brought up from HSI and the PLL.
- Vendor binaries: the STM32Cube HAL, libopencm3 and the STM32duino core. The firmware runtime here is ours.
Open one and press Run
Each of these opens in the editor exactly as it is drawn here.
Every built-in project on the STM32
Each has its own page with the circuit running, the code and a parts list.
Arduino libraries that compile as they are
Paste a tutorial that includes one of these and it builds. For any other library, the build names the Mokxi header that does the same job.
And 14 more, 22 in all: Adafruit_BME280.h, Adafruit_BMP280.h and SparkFunBME280.h; RTClib.h; Adafruit_SHT31.h; Adafruit_PCF8591.h; Adafruit_ADXL345_U.h; LedControl.h; Adafruit_LEDBackpack.h; Adafruit_TCS34725.h; Adafruit_SGP30.h; Adafruit_INA219.h; Adafruit_ADS1X15.h; Adafruit_MCP23X17.h; Bounce2.h; HX711.h.
Tutorials that use this board
Each one ends in a running circuit, on this same board.
Questions
Is it free?
Yes. Every board and every part is on the free plan, with no account needed.
Which STM32?
The STM32F411CEU6, on the WeAct "Black Pill" v3.x.
Will my firmware run on a real Black Pill?
Yes, as long as it does not reach for DMA, I2C or SPI. The memory map and the register offsets are the real ones.
Do I need an account?
Only to save projects to the cloud and share them by link.
The other boards
Every one of these runs today, and every one is free.
Looking for the shorter introduction? See the STM32 simulator page.
A RISC-V chip at 160 MHz, on the real memory map.
The classic Arduino, with an ATmega328P running at 16 MHz.
The Uno’s chip on a small board that fits a breadboard.
The big Arduino, with 54 digital pins and four serial ports.
An Uno-shaped board whose chip does its own USB serial.
A second RISC-V board, with 31 pins and simulated WiFi.
The classic ESP32 at 240 MHz, with simulated WiFi.
The ESP32-S3 at 240 MHz, with USB serial and an RGB LED.
Try it on your own firmware
What you build here runs on the board on your desk, unchanged. Nothing to install and no account needed.