Arduino Uno R4 Minima simulator, the RA4M1 running
The Uno R4 Minima is the Uno everyone buys now: the same board, the same 5 V pins, an Arm Cortex-M4 underneath. Mokxi models the Renesas RA4M1 at 48 MHz on our own core (the port block with its per-pin PFS registers, GPT PWM, SCI2 as Serial1, a fourteen-bit ADC) and says plainly where the model stops.
- 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 listed underneath.
Not in the model
- A USB stack. Serial is a byte pipe: no enumeration, no descriptors, no SETUP. `while (!Serial)` returns at once here and pauses for a moment on a desk.
- The ICU’s event links, and so every peripheral interrupt: there is no attachInterrupt on this board, and a sketch polls. An ICU with invented event numbers would be worse than none.
- The AGT, the clock generation circuit, the watchdogs, I2C, SPI, CAN, the DTC, the RTC, the DAC and the touch unit.
- Vendor binaries: the Renesas FSP and the Arduino R4 core. The firmware runtime here is ours.
- Some addresses are this model’s belief rather than a page of the user’s manual: the GPT and ADC14 blocks, the USB registers, and which GPT channel each PWM pin is. docs/uno-r4.md section 7 lists every one of them.
Open one and press Run
Each of these opens in the editor exactly as it is drawn here.
Every built-in project on the Uno R4
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: each is written for Mokxi, on its own drivers, under the name the tutorials use. For any other library the build names the Mokxi header that does the same job.
Questions
Is it free?
Yes. Every board and every part is on the free plan, with no account needed.
Which Uno R4 is this?
The Minima, the one with the USB-C socket and no WiFi. The Uno R4 WiFi has a page of its own: the same chip with an LED matrix and a simulated network.
How is it different from an Uno R3?
Same shape, same 5 V pins, same shield header. Underneath it is an Arm Cortex-M4 at 48 MHz rather than an 8-bit AVR at 16: more flash, more RAM, a fourteen-bit ADC, and Serial on the USB rather than on pins 0 and 1.
Why does analogRead give me 0 to 1023 when the ADC is fourteen bits?
Because that is what the Arduino core does, so a sketch written for an Uno reads the same numbers. Call analogReadResolution(14) and you get 0 to 16383; the register always held all fourteen.
Is Serial the same as Serial1?
No, and that is the R4. Serial is the USB socket and reaches no header pin. Serial1 is SCI2, a real UART on D0 and D1. Both show up in the monitor here; only Serial1 moves a pin.
Can I use attachInterrupt?
Not on this board. The RA4M1 routes a peripheral event to an interrupt through the ICU, and this model does not implement the ICU rather than guess at its event numbers. Poll the pin instead.
Will my firmware run on a real Uno R4?
The core, the pins, the port registers and SCI are the real ones. The GPT and ADC addresses, the USB registers and the PWM pin-to-channel map are marked unverified in docs/uno-r4.md section 7. Check that list first, and it is a short one.
The other boards
Every one of these runs today, and every one is free.
Looking for the shorter introduction? See the Arduino Uno R4 simulator page.
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.