🛠 Advanced I/O Management on Romu: Debug Pads and Internal Peripherals

Bitmerse Romu Compact USB Development Board (RP2354A) · avance · Apprenez à exploiter les pads de débug et les composants internes de la carte Romu pour créer des interfaces homme-machine personnalisées sans GPIO externes.

Objectifs

This tutorial aims to master Input/Output management on the Bitmerse Romu board, which lacks standard external GPIO pins. You will learn to interact with debug pads for serial debugging, control the integrated RGB LED for visual feedback, and read the state of physical buttons. These skills are essential for developing complex HID peripherals like macro pads or MIDI controllers, where local feedback is crucial despite the extreme compactness (15.5 x 12 mm) of the RP2354A-based board.

Matériel nécessaire

Étapes

  1. Identify debug pads: On the bottom or side of the Romu, locate pads marked TX/RX or SWD. Unlike standard boards, you cannot solder standard connectors without risking damage to the chip. Use fine alligator clips or pogo pins to temporarily access these pads for serial debugging (UART) or wire debugging (SWD).

``python import machine import time # Generic example, check specific Romu pins led_r = machine.PWM(machine.Pin(25)) # Verify exact pin led_r.freq(1000) for duty in range(0, 1024, 10): led_r.duty_u16(duty) time.sleep(0.01) ``

  1. Configure the RGB LED: The RGB LED is wired directly to the RP2354A's internal GPIOs. In your code, identify the corresponding pins (often GP25 for the standard user LED, but check the specific Romu schematic). For advanced control, use PWM (Pulse Width Modulation) to vary intensity and create color gradients.

``python button = machine.Pin(20, machine.Pin.IN, machine.Pin.PULL_UP) # Pin to confirm while True: if button.value() == 0: print("Button pressed") time.sleep(0.2) # Simple debounce ``

  1. Read physical buttons: Buttons are typically wired with internal pull-up or pull-down. Configure the associated GPIOs as inputs. To avoid bouncing (debounce), implement a simple software filter or use hardware interrupts if available on the RP2354A.
  1. Interact with pads for debugging: To send serial logs without blocking the main USB (used for HID/MIDI), configure UART on the debug pads. This allows monitoring the microcontroller's internal state while the board functions as a USB peripheral.

Vérification

Pour aller plus loin

Explore the RP2354A's hybrid architecture by moving button reading tasks to the RISC-V cores to free up Arm cores for complex USB HID management. Consider adding external components soldered directly to pads if extension is absolutely necessary, respecting the thermal constraints of the ultra-compact board.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials