“DeMon” – Debug + monitor (system controller), pronounced “Demon”

CPU overclocked from (1x) 150Mhz (1.1v) to (2x) 300Mhz (1.2v), possibly to (3x) 460Mhz (1.5v) – other have driven the RP2350B to over 600Mhz (2v).

DeMon has 16MB flash, at boot it programs FireStorm (FPGA), simulate the SD card from the SG2000. FRAM is accessed via GPIO-47.

This will connect to the SWD port of the “QWM” chip and “Pulse Sequencer” chip. This will allow it to program those components with their firmware (if it needs updating) and provide hardware debugging for any of the components.

Debug streams will also be sent back from each component and then to the “main processing unit”.

It will be able to reset any of the components remotely. The debug monitor will also control the boot state and act as a watchdog for the SG2000 “main processing unit”.

DeMon can act as an SPI slave for the SG2000, it emulates an SD card interface.

The DeMon is actually a RP2350B chip that has connections to the hardware debug ports of the other chips.

USB host for keyboard, mouse, joypad.

DeMon has 8MB PSRAM available.

The real-time clock chip is the Microchip MCP74910 (64 bytes battery backed SRAM, 128 bytes EEPROM, 8 bytes protected EEPROM, supports 2001 to 2399, cost is less than £1). The battery is a CR2450 as it has much more power than a standard ”coin” battery, can last up to 20 years!

Radio communication

An ESP-C5-WROOM-1-N16R4 chip will be connected to DeMon. This will bring 2.4Ghz/5Ghz Wifi (802.11b/g/n/ax), Thread 1.3, Zigbee 3.0 and Bluetooth 5.3 (LE) and Bluetooth mesh, Remote "debrick".

Debugging will be supported via the Wifi (2.4Ghz, router needed, up to 54mbps), Bluetooth (2mbps) or ESP Now (2.4Ghz/5Ghz, no router needed, 1mbps), or 62.5Mbps over SPI (in practice this may be closer to 10mbps).

Optional Waveshare Core1262 HF LoRa Module (SX1262) for possible LoraWAN or/and Meshtastic use.

An internal micro SD card provides 256GB (default, replaceable) internal storage.

FRAM16 map (000000-FFFFFF)

Start address End address Size Description
0000007FFFFF8000008MB SRAM
800000FFFFFF800000Reserved

Hardware reset button to 3v3
GPIO Function GPIO Function
0SPI0 RX/MISO - JTAG TDI from FireStorm / SG2000 29Power LED G
1SPI0 CSn - JTAG TMS 30Power LED B
2SPI0 SCK - JTAG TCK 31Neopixel data (8 LEDs)
3SPI0 TX/MOSI - JTAG TDO 32Power off
4FireStorm Reconfig 33Power pushed
5FireStorm Ready 34Cartridge DETECT (CD)
6FireStorm Done 35CI1303 PG_EN (PA4)
7Handshake ESP-C5 GPIO10 36TX1 - to CI1303
8TX1 ESP-C5 GPIO12 (RX) 37RX1 - from CI1303
9RX1 ESP-C5 GPIO11 (TX) 38PWM 10B LCD light
10ESP-C5 EN (wifi on/off) 39LCD & TOUCH RESET/RES
11ESP-C5 GPIO28 (auto program) 40LCD CMD/DATA/DC/RS
12TX0 to SG2000 RX0 41SPI1 SELECT 0
13RX0 to SG2000 TX0 42SPI1 SELECT 1
14I2C1 SDA cart + cap touch 43SPI1 TX/MOSI/SDA ESP-C5 GPIO
15I2C1 SCL 44SPI1 RX/MISO ESP-C5 GPIO
16SPI0 (SG2000 slave) RX/MOSI SD emulation 45SPI1 CSn
17SPI0 (SG2000 slave) CSn 46SPI1 SCK/SCL - capacitive touch screen ESP-C5 GPIO9
18SPI0 (SG2000 slave) SCK 47FRAM
19SPI0 (SG2000 slave) TX/MISO SWDIOCart port
20SG2000 RESET SWDCLKCart port
21I2C1 Interrupt ADCREF
22Pulse/QMK RUN (hi = on, lo =off) 3V3
23Pulse/QMK SWD CLK (SM0) BOOTSEL
24Pulse SWD IO USB D-Keyboard
25QMK SWD IO USB D+(12Mbps)
26Buzzer RUN
27Pulse Interrupt 3V3 EN
28Power LED R VBUS

Using SPI1, and different CSn lines, DeMon controls:

  • A Pulse Sequencer SPI slave port
  • The ESP32-C5-WROOM-1-N8R4 Wifi subsystem + optional SX1262 lora subsystem
  • A cartridge port (using spi interface – slow, Pulse expansion, etc)
  • The keyboard 320x480 touch screen
  • SPI1 CTRL:

    Value Selected Device
    0Pulse Sequencer
    1ESP32-C5 GPIO 10
    2Cartridge
    3Touch TFT

    ESP32-C5-WROOM-1-N16R4 (v1.2 chip layout)

    Pin Function Pin Function
    1GND 28GND
    23v3 27IO26 - SX1262 SCK
    3EN - DeMon GPIO12, resistor to gnd 26IO25 - DeMon GP43 MISO
    4IO2 - SPI Q/MISO - DeMon GP43 (set to 1 via resistor = 48Mhz crystal) 25IO11 - TX to DeMon RXD
    5IO3 (set to 0 via resistor = 3.3v flash) 24IO12 - RX to DeMon TXD
    6IO0 – SX1262 MOSI (set to vcc via resistor) 23IO23 - NSS
    7IO1 – SX1262 MISO 22NC
    8IO6 SPI CLK - DeMon GP46 21IO15 SX1262 D0 - Input button
    9IO7 SPI ID/MOSI - DeMon GP44 20NC
    10IO8 – Handshake - DeMon GP8 19NC (using internal PSRAM)
    11IO9 – SX1262 RF_SW 18IO27 – SX1262 RST
    12IO10 SPI CS0 (IN) DeMon CS 17*IO4 – SX1262 Busy
    13IO13 – SX1262 TX (d6) 16*IO5 – SX1262 DIO1
    14IO12 - SX1262 RX (d7) 15IO28 - (in) auto-program (Demon GPIO11, set to 1 via resistor)
    The ESP32-C5-1-N16R4 has spare connections for a socket for an optional SX1262 (Waveshare Core1262 HF LoRa Module for possible LoraWAN or/and Meshtastic use).

    "Smart cart" cartridge port

    A 30-pin edge connector cartridge port (42mm 2.54 pitch wide) is connected to DeMon. If present, then this is booted in preference to the SD card slot. If a cart is inserted or swapped whilst powered on, the Ant64 will normally automatically be rebooted to it (this can be disabled in options). However, a cartridge can safely be removed whilst powered on and the Ant64 will not reboot, reinserting the same cartridge will also not reboot.

    ABCDEFGHIJKLMNO
    GND3.3vCSRX/MISOSCKTX/MOSICDDeMon ICP SWDCLKDeMon ICP SWDIORESETDeMon SCLDeMon SDAIRQ5vLED
    HSTX0HSTX1CRAM CSCRAM MISOCRAM SCKCRAM MOSIHSTX2HSTX3HSTX4HSTX5Pulse SCLPulse SDAHSTX6HSTX7GND
    123456789101112131415
    A special NFC "Card cartridge" will have an NFC reader (via I2C with IRQ), a hardware reset, and a MicroSD card slot for game "cache". The NFC card can have the web location or ID of the game and unique serial number, it could transfer the data and do future loads from the Micro SD in the card slot.

    Pins A and 15 on the cartridge will extend further than others. The cartridge has been designed so that a “ROM” cart can be a simple single sided PCB (the letter side), the other side being for enhanced "Pulse" cartridges. The port also allows in-circuit programming of the DeMon chip (the boot system).

    Neopixels

    No Name Description
    0PowerOff, white during self test, then amber during boot, green when fully booted
    1Internal micro SDNone=off, blue = detected, green = read/write, red = error
    2Cartridge (SD)None=off, blue = detected, green = read/write, red = error
    3Main (fast) SDNone=off, blue = detected, green = read/write, red = error
    4NetworkNone=off, blue = connected, green = read/write, red = error
    5WiFiNone=off, blue = connected, green = read/write, red = error
    6BluetoothNone=off, green = read/write, red = error
    7MidiNone=off, green = read/write, red = error
    The documentation will show the current settings of the LEDs, this way the function can be re-purposed if needed. During self test all the LEDs will be white, each LED will have a different purpose – each changing dependant on if the self test has past or not. Green = passed, Red = failed.

    Antibrick built-in:

    The ESP32 can unbrick DeMon remotely over wifi, or via the ICP cartridge.

    Links

  • JTAG - github.com/kholia/xvc-pico
  • JTAG - github.com/phdussud/pico-dirtyJtag
  • Pico debug - github.com/essele/pico_debug
  • Important: The Ant64 family of home computers are at early design/prototype stage, everything you see here is subject to change.