Provides comprehensive pinout reference, board specifications, and TinyGo development guide for the Arduino Uno R4 Minima (Renesas RA4M1) microcontroller. Use when writing TinyGo firmware for the Arduino Uno R4 Minima, wiring peripherals, or configuring pins. Keywords: Arduino, Uno, R4, Minima, RA4M1, Renesas, Cortex-M4, TinyGo, pinout, GPIO, I2C, SPI, UART, DAC, CAN, analog, digital, PWM, 5V, 32-bit, USB-C, 14-bit ADC.
Provides comprehensive reference for developing TinyGo firmware for the Arduino Uno R4 Minima (Renesas RA4M1).
Arduino-UnoR4Minima-Arduino skillArduino-UnoR4WiFi-TinyGo skillArduino-UnoR3-TinyGo skillArduino-Nano-TinyGo skill| Parameter | Value |
|---|
| MCU | Renesas RA4M1 (R7FA4M1AB3CFM) |
| Architecture | 32-bit Arm Cortex-M4 |
| Clock Speed | 48 MHz |
| Flash | 256 kB |
| SRAM | 32 kB |
| EEPROM | 8 kB (data flash) |
| USB | USB-C (native USB) |
| Operating Voltage | 5V |
| Input Voltage (VIN) | 6–24V |
| DC Current per I/O Pin | 8 mA |
| Dimensions | 68.85 × 53.34 mm |
| Digital I/O | 14 (D0–D13) |
| PWM Outputs | 6 (D3, D5, D6, D9, D10, D11) |
| Analog Inputs | 6 (A0–A5, up to 14-bit ADC) |
| DAC Output | 1 (A0) |
| CAN Bus | 1 (requires external transceiver) |
| Built-in LED | D13 |
[USB-C] [Barrel Jack]
┌──────────────────────────────┐
│ RESET IOREF 5V GND VIN │ ← Power Header
│ 3.3V AREF GND │
├──────────────────────────────┤
SCL/A5 ──┤ A5 D13 ├── SCK / Built-in LED
SDA/A4 ──┤ A4 D12 ├── CIPO (MISO)
A3 ──┤ A3 ~D11 ├── COPI (MOSI) / PWM
A2 ──┤ A2 ~D10 ├── CS (SS) / PWM
A1 ──┤ A1 ~D9 ├── PWM
DAC/A0 ──┤ A0 D8 ├──
│ │
│ [Renesas RA4M1] │
│ │
│ D7 ├──
│ ~D6 ├── PWM
│ ~D5 ├── PWM
│ D4 ├──
│ ~D3 ├── PWM / INT1
│ D2 ├── INT0
TX ─────┤ D1 D1 ├── TX
RX ─────┤ D0 D0 ├── RX
├──────────────────────────────┤
│ [ICSP] │
└──────────────────────────────┘
~ = PWM capable INT = External interrupt
CAN TX/RX available on dedicated header (requires transceiver)
| Pin | Digital | Analog | PWM | Interrupt | SPI | I2C | UART | Other |
|---|---|---|---|---|---|---|---|---|
| D0 | ✓ | — | — | — | — | — | RX | — |
| D1 | ✓ | — | — | — | — | — | TX | — |
| D2 | ✓ | — | — | INT0 | — | — | — | — |
| D3 | ✓ | — | ✓ | INT1 | — | — | — | — |
| D4 | ✓ | — | — | — | — | — | — | — |
| D5 | ✓ | — | ✓ | — | — | — | — | — |
| D6 | ✓ | — | ✓ | — | — | — | — | — |
| D7 | ✓ | — | — | — | — | — | — | — |
| D8 | ✓ | — | — | — | — | — | — | — |
| D9 | ✓ | — | ✓ | — | — | — | — | — |
| D10 | ✓ | — | ✓ | — | CS | — | — | — |
| D11 | ✓ | — | ✓ | — | COPI | — | — | — |
| D12 | ✓ | — | — | — | CIPO | — | — | — |
| D13 | ✓ | — | — | — | SCK | — | — | Built-in LED |
| A0 | ✓ | ADC0 | — | — | — | — | — | DAC |
| A1 | ✓ | ADC1 | — | — | — | — | — | — |
| A2 | ✓ | ADC2 | — | — | — | — | — | — |
| A3 | ✓ | ADC3 | — | — | — | — | — | — |
| A4 | ✓ | ADC4 | — | — | — | SDA | — | — |
| A5 | ✓ | ADC5 | — | — | — | SCL | — | — |
| Pin | Function |
|---|---|
| VIN | Input voltage (6–24V) |
| 5V | Regulated 5V output |
| 3.3V | Regulated 3.3V output |
| GND | Ground |
| AREF | Analog reference voltage |
| IOREF | I/O reference voltage |
| RESET | Reset (active LOW) |
arduino-uno-r4-minima
tinygo info -target=arduino-uno-r4-minima
# Build only
tinygo build -target=arduino-uno-r4-minima -o firmware.bin ./main.go
# Build and flash (board must be connected via USB-C)
tinygo flash -target=arduino-uno-r4-minima ./main.go
# Monitor serial output
tinygo monitor -target=arduino-uno-r4-minima
Note: If the board is not detected, double-tap the reset button to enter bootloader mode. The board will appear as a USB mass storage device.
machine.I2C0)machine.SPI0)machine.UART0)machine.ADCConfigpackage main
import (
"machine"
"time"
)
func main() {
led := machine.D13 // Built-in LED
led.Configure(machine.PinConfig{Mode: machine.PinOutput})
for {
led.High()
time.Sleep(500 * time.Millisecond)
led.Low()
time.Sleep(500 * time.Millisecond)
}
}
machine.I2C0i2c := machine.I2C0
err := i2c.Configure(machine.I2CConfig{
SDA: machine.SDA_PIN, // A4
SCL: machine.SCL_PIN, // A5
Frequency: 400000, // 400 kHz fast mode
})
if err != nil {
println("I2C init failed:", err)
}
// Write to device
data := []byte{0x00, 0x01}
i2c.Tx(0x3C, data, nil)
// Read from device
buf := make([]byte, 2)
i2c.Tx(0x3C, []byte{0x00}, buf)
machine.SPI0spi := machine.SPI0
err := spi.Configure(machine.SPIConfig{
SCK: machine.D13,
SDO: machine.D11, // COPI (MOSI)
SDI: machine.D12, // CIPO (MISO)
Frequency: 4000000, // 4 MHz
})
if err != nil {
println("SPI init failed:", err)
}
cs := machine.D10
cs.Configure(machine.PinConfig{Mode: machine.PinOutput})
cs.High()
// Transfer data
cs.Low()
result := make([]byte, 1)
spi.Tx([]byte{0x00}, result)
cs.High()
machine.UART0machine.Serial (USB CDC)// USB serial (for println / serial monitor)
// println() outputs to USB CDC by default
// Hardware UART on D0/D1
uart := machine.UART0
uart.Configure(machine.UARTConfig{
TX: machine.UART_TX_PIN, // D1
RX: machine.UART_RX_PIN, // D0
BaudRate: 9600,
})
uart.Write([]byte("Hello from Uno R4 Minima\r\n"))
adc := machine.ADC{Pin: machine.ADC0} // A0
adc.Configure(machine.ADCConfig{
Resolution: 14, // Up to 14-bit on RA4M1 (check TinyGo support)
})
value := adc.Get() // Returns 16-bit scaled value
println("ADC:", value)
// DAC on A0 — check TinyGo support for RA4M1
// If supported:
// dac := machine.DAC{Pin: machine.A0}
// dac.Configure(machine.DACConfig{})
// dac.Set(32768) // Mid-range output (~2.5V at 5V reference)
Note: DAC support on the RA4M1 in TinyGo may be limited. Check the latest TinyGo release notes.
The Arduino Uno R4 Minima operates at 5V logic. This is different from 3.3V boards (XIAO, ESP32, etc.):
The Uno R4 Minima has a maximum of 8 mA per GPIO pin — significantly lower than the Uno R3's 20 mA:
The RA4M1 supports low-power modes, but TinyGo support may be limited:
// TinyGo low-power support on RA4M1 is evolving
// Check latest TinyGo release notes for sleep mode support
// For production low-power applications, consider Arduino/C++