Home

Awesome

Müsli USB Pmod™ compatible module

Overview

Müsli is a 12-pin Pmod™ compatible module with a RP2040 MCU and a USB type A port. Müsli can be configured to act as a USB host or USB device. In host mode the 5V USB VBUS power is supplied by a boost converter.

Müsli PMOD

This repo contains documentation, schematics and example host/device firmware.

Find more information on the Müsli product page.

Modes

Careful attention should be paid to jumpers J1 and J2 to avoid unintended consequences, please read the warnings below.

J1J2ModePower
OPENOPENPMOD USB DEVICEVSYS from PMOD. VBUS disconnected.
OPENSHORTPMOD USB HOSTVSYS from PMOD. VBUS from VSYS.
SHORTOPENUSB STAND-ALONE DEVICEVSYS from VBUS.

Warnings

Linux Device Setup

On Linux you may need to configure udev rules to allow access to the device, for example by adding the following lines to your udev rules:

SUBSYSTEM=="usb", GROUP="plugdev", ATTR{idVendor}=="2e8a", ATTRS{idProduct}=="0003"
SUBSYSTEM=="usb", GROUP="plugdev", ATTR{idVendor}=="2e8a", ATTRS{idProduct}=="1025"

Firmware

This repo contains example firmware based on the Raspberry Pi Pico USB examples.

The host firmware example host_musli_kbd sends USB keyboard keypresses as ascii characters over the UART. It also acts as an SPI master and sends PS2 scancodes over the SPI pins. See the Zucker SOC for example Verilog code that acts as an SPI slave to receive the scancodes.

The device firmware example dev_musli implements a Vendor Specific Device that provides commands for bitbanging GPIO and performing SPI master data transfers. This firmware is used by ldprog to program Lone Dynamics FPGA boards.

To build the firmware you will need to install the Raspberry Pi Pico SDK.

Set the PICO_SDK_PATH environment variable to your SDK path.

$ git clone https://github.com/machdyne/musli
$ cd musli/firmware/dev_musli
$ mkdir build
$ cd build
$ cmake ..
$ make

Note: If your Müsli has a non-Winbond flash chip, you may need to build the firmware using the following commands:

$ cmake .. -DPICO_DEFAULT_BOOT_STAGE2_FILE=/your-pico-sdk-directory/pico-sdk/src/rp2_common/boot_stage2/boot2_generic_03h.S
$ make

This will create an ELF file that can be programmed via SWD as well as a UF2 file that can be copied to the USB Mass Storage Device when boot mode is selected (by holding the Müsli BOOT button during power-up).

Resources

Pinouts

12-pin PMOD Header

1  2  3  4  5  6
7  8  9  10 11 12
PinSignalDevice FirmwareHost Firmware
1GPIO0UART0 TXUART0 TX
2GPIO1UART0 RXUART0 RX
3GPIO2GPIO
4GPIO3GPIO
5GND
6PWR3V3
7GPIO8SPI1 RX
8GPIO9SSSS
9GPIO10SPI1 SCKSPI1 SCK
10GPIO11SPI1 TXSPI1 TX
11GND
12PWR3V3

The GPIO numbers correspond with RP2040 GPIO numbers.

3-pin SWD Header

PinSignal
1SWDIO
2SWCLK
3GND

Pin 1 is closest to the PMOD header.