Hello, I'm Felipe Balbi.

I build firmware and tools for embedded systems. I work mostly in Rust and C, with detours through Python and shell when the job calls for it. This site is where I keep notes that might be useful to someone other than me.

Embedded systems · Rust · the craft of writing software

Recent posts

  • Tamal: Wiring Uart Through Composition

    The receiver we read yesterday closed the keystone. It wired the transmitter’s line into its own, shared one tick between them, fed a random byte in one end and got the same byte, bit-for-bit, out the other — first with an always-true tick, then with the real fractional-3.125 heartbeat the baud gene…

    Read more →
  • Tamal: The receiver

    The transmitter we read yesterday drove a wire. It owned the line: it held each level for sixteen ticks, and it made every output a pure function of its own state, so the serial output sat rock-steady between bit boundaries and never once twitched. That was a luxury, and we spent most of the post ad…

    Read more →
  • Tamal: The transmitter

    The baud generator we read last time produces a heartbeat — a Bool that says now sixteen times a bit — and nothing else. It had no state machine at all, just a phase accumulator counting against a modulus. That was the point: the smallest possible clocked block, a register fed back through some arit…

    Read more →
  • Tamal: The baud generator

    The CRC unit we read last time was pure combinational logic — a truth table wearing a Haskell type, the same output for the same input, no memory, no clock. It was the gentlest possible first block precisely because time never entered into it. The primer closed by promising that the next rung up was…

    Read more →
  • Tamal: The CRC block

    As mentioned before Tamal is an FPGA eSPI exerciser with its gateware written in Haskell and compiled to verilog with Clash. In a previous post we presented a very short introduction on Haskell, just enough such that the code blocks below don’t look too foreign. Today we start looking at one of the …

    Read more →
  • Enough Haskell to Read Tamal

    Tamal is an FPGA eSPI exerciser, and its gateware — the UART, the cycle engine, the ALU, the CRC unit, the loader, the trace ring — is written in Haskell and compiled straight to hardware by Clash. This is the first post in a series that opens up that gateware one block at a time and reads each one …

    Read more →
  • Tamal: an eSPI exerciser

    mole is an FPGA bit-cycle engine for exercising I²C and I³C — you write a little program, it drives the bus edge by edge, legal or illegal, and hands you back a structured trace of what happened. Tamal is that same idea aimed at a different, meaner bus: Intel’s Enhanced Serial Peripheral Interface (…

    Read more →
  • From 'it works' to 'I trust it': two torture loops on a NOR driver

    The FlexSPI NOR driver for the NXP MCXA5xx already worked. The blocking self-test was green, the examples ran, I could erase a sector, program a page, read it back, and watch the same bytes come out of the memory-mapped window. By the usual bar for “the driver works,” it worked. That bar is too low.…

    Read more →
  • Pico de Gallo: Release Announcement

    Pico de Gallo turns an RP2350 into a USB-attached bridge that lets a host program drive real I²C, SPI, GPIO, PWM, ADC, UART, and 1-Wire from std Rust, C, or Python — so you can write and test device drivers on your laptop instead of cross-compiling for an MCU every time. Today’s release moves the wh…

    Read more →
  • I3C target mode on MCXA: three things the datasheet didn't warn me about

    I spent the last several weeks bringing up an I3C target driver for the NXP MCXA family (MCXA2xx and MCXA5xx share the same I3C IP) inside the embassy HAL. “Target” is what I3C calls the role I²C calls “slave”: the device that sits on the bus, responds to a controller, and can also raise an in-band …

    Read more →

All posts →