Simulator

Blue Pill simulator, running in this tab

Mokxi is a free STM32 Blue Pill simulator that runs in your browser, with nothing to install and no account needed. Mokxi models the STM32F103 on the "Blue Pill", on our own Cortex-M3 core at 72 MHz, on the real memory map, so a build that runs here runs on the board on your desk.

  • 192parts on the bench
  • 25boards running now
  • 1.00xreal time, on every board
Blue Pill: blinklive0.000 s 0.00x
Click to open it in the editor
Real firmware, running right now on our own core. Click it to open the circuit in the editor.
What is modeled

The numbers, not the marketing

Taken from the board's own contract document and put in plain words.

The core
Cortex-M3 (ARMv7-M), no DSP extension and no FPU, at 72 MHz, with the datasheet cycle count of every instruction.
Peripherals
GPIO on ports A to C through the F1’s own CRL and CRH registers, TIM1 to TIM4 with glitch-free PWM, USART1, a twelve-bit ADC on ten pins, and SysTick with the real NVIC priority bits.
What is not there yet
DMA, USB, CAN, I2C and SPI, and the clock tree: SYSCLK is fixed at 72 MHz from power-on rather than brought up from HSE and the PLL.
Go further

The full board page

Every peripheral area, every example and the wiring notes, in one place.

STM32 Blue Pill simulatorBlink, a button and the serial monitor, running.

Questions

Which STM32 does this simulate?

The STM32F103C8T6, on the board everybody calls the Blue Pill.

Is this the same as the Black Pill?

No. That is an STM32F411, a Cortex-M4 at 84 MHz with a completely different register map. The F103 configures a pin with one four-bit field, takes an input pull out of ODR, and has an ADC.

Why can my sketch not use PA15, PB3 or PB4?

The debug port holds them out of reset. Write AFIO->MAPR = AFIO_MAPR_SWJ_SW_ONLY in setup() and they are yours, exactly as on the chip.

Is it free?

Yes, with no card and no account needed to try it.

Try your own firmware on the Blue Pill

What you build here runs on the board on your desk, unchanged. Nothing to install and no account needed.