runpatrick/sa-sim-pcb
This code defines PCB footprints for various electronic modules, including BG95 cellular modem, BNO086 sensor, BQ25180 battery charger, and BQ27220 power management IC, detailing their physical pad layouts and key external features.
- Version
- 1.0.6
- License
- unset
- Stars
- 0
firmware/sa-sim.repl
// SA-SIM v1 — Renode platform description
// =========================================
// Models the SA-SIM puck tracker for HIL (hardware-in-the-loop) testing
// of the smoketest firmware (firmware/smoketest.c).
//
// CPU: Nordic nRF52840 (ARM Cortex-M4F)
// I²C0: Mock slaves at 0x6A, 0x55, 0x6E, 0x4A (return ACK on probe)
// UART1: Connected to a Renode shell that echoes "OK\r\n" when it sees "AT"
// GPIO: Status LED on P0.13
//
// Run:
// renode firmware/sa-sim.repl
// (machine LoadPlatformDescription @firmware/sa-sim.repl)
// sysbus LoadELF @build/zephyr/zephyr.elf
// start
//
// See firmware/README.md for the full HIL recipe.
cpu: CPU.CortexM @ sysbus
cpuType: "cortex-m4f"
nvic: nvic
nvic: IRQControllers.NVIC @ sysbus 0xE000E000
-> cpu@0
systickFrequency: 64000000
priorityMask: 0xE0
flash: Memory.MappedMemory @ sysbus 0x00000000
size: 0x100000
ram: Memory.MappedMemory @ sysbus 0x20000000
size: 0x40000
// I²C0 controller @ TWIM0/TWIS0 base on nRF52840
i2c0: I2C.NRF52840_TWI @ sysbus 0x40003000
-> nvic@3
// Mock I²C slaves — register via Python helper at simulation start
bq25180: Mocks.DummyI2CSlave @ i2c0 0x6A
bq27220: Mocks.DummyI2CSlave @ i2c0 0x55
bq51013: Mocks.DummyI2CSlave @ i2c0 0x6E
bno086: Mocks.DummyI2CSlave @ i2c0 0x4A
// UART1 — connected to BG95 modem shell
uart1: UARTs.NRF52840_UART @ sysbus 0x40028000
-> nvic@8
// BG95 modem shell — echoes "OK\r\n" when it receives "AT"
// (Configure via .resc file: SerialPortLogger or AT-command responder)
bg95Modem: UART.UARTHub @ uart1
BaudRate: 115200
// GPIO P0 (status LED on P0.13)
gpio0: GPIOPort.NRF52840_GPIO @ sysbus 0x50000000
-> nvic@6
// Memory map sysbus regions
sysbus:
init:
Tag <0x10000000, 0x10001000> "FICR" 0
Tag <0x10001000, 0x10001100> "UICR" 0