MMDVM POG board mods and notes
The MMDVM POG board is a widely-available Raspberry Pi HAT. It uses an STM32F105RBT6 microcontroller with a simple analogue front-end to connect a Raspberry Pi to a radio transceiver.
Warning – some MMDVM POG boards (especially the Chinese clones) are built in a Raspberry Pi HAT form-factor and have the 3.3V LDO regulator fitted. The regulator must not be fitted if the board is being used as a HAT!. Leaving the POG's LDO fitted may damage or destroy the power management IC on your Pi (this is especially common on the Pi 3)! Remove the LDO regulator before using the HAT.
In-system re-flash
The POG board is normally reflashed by installing a jumper (JP1) and toggling the reset pin. Later HAT boards like S75NAN's Hotspot series and the MMDVM-HS-HAT don't need the jumper. It's easy to modify a POG to allow this. You will need:
- One 10k 0805 surface-mount resistor
- Two small lengths of thin wire (e.g. wire-wrap wire)
- A 2×3 breakaway socket or two 1×3.
The two GPIO pins we'll be using are:
- GPIO20 (pin 38): BOOT0 (boot mode)
- GPIO21 (pin 40): NRST (negative reset)
Installation is fairly easy:
- Refer to the S75NAN V2 schematic and the MMDVM POG schematic.
- Install two pieces of stripped wire-wrap wire into the holes for pins 38 and 40 of the Pi GPIO header.
- Fit the 2×3 breakaway header into the holes too, and plug the board into the Raspberry Pi.
- Cut the stripped lengths of the wire back so they are at the same level as the top of the pins.
- Solder the six pins.
- Route the wire from GPIO header pin 40 to the NRST pin of the programming header and solder it. This is the pin adjacent to the missing pin.
- Install a 10k resistor to pin 2 of JP1 (the 2-pin “boot mode” jumper).
- Tin the other side of the 10k resistor and connect it to the wire from GPIO header pin 38.
- Secure the wire with tape, hot-glue or similar.
It should now be possible to upgrade the board's firmware using the tools included with Pi-Star.
To flash manually:
stm32flash -v -w firmware.bin -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0 # -v: verify writes # -w: write flash from file # -g: start execution at specified address (after loading) # -R: reset device at exit # -i: GPIO sequence -- # enter with GPIO20 high and toggle GPIO21 L->H # exit with GPIO20 low and GPIO21 H # /dev/ttyAMA0: Pi serial port # # default baud rate is 57600
The output should be similar to:
stm32flash 0.5 http://stm32flash.sourceforge.net/ Using Parser : Intel HEX Interface serial_posix: 57600 8E1 Version : 0x22 Option 1 : 0x00 Option 2 : 0x00 Device ID : 0x0418 (STM32F105xx/F107xx) - RAM : 64KiB (4096b reserved by bootloader) - Flash : 256KiB (size first sector: 2x2048) - Option RAM : 16b - System RAM : 18KiB Write to memory Erasing memory Wrote and verified address 0x0800d07c (100.00%) Done. Starting execution at address 0x08000000... done.