An experimental Ada radio appliance framework for the RP2040 without a dedicated RF transceiver.
Status: Autonomous radio appliance framework for the RP2040 (Carrier, CW, FM, 2-FSK, CRC-16, ChaCha20, Dual-Core AMP, Health Guardian, Hardware Watchdog).
Radio_Kit turns a standalone Raspberry Pi Pico (RP2040) into a dedicated radio transmitter appliance using the RP2040's native clock-generation hardware and General Purpose Clock Outputs (GPOUT).
-
Current Version:
v1.0.0 -
Release Highlights: Modular 3-parent package architecture (
System,Modulation,Protocol), decoupled health guardian, dual-core AMP engine, hardware watchdog & non-volatile crash diagnostics, ADC die temperature &$V_{sys}$ voltage monitoring, RF power/slew control, 2-FSK digital modulation, table-driven CRC-16, 256-bit ChaCha20 encryption, CW Morse beacon, and unified master demonstration.
All modules are structured in a clean parent-child relationship. Only Radio_Kit.Types is imported as a direct child of the root package:
Radio_Kit
├── Types (root data types, clock config, drive strength, slew rate)
├── System
│ ├── Clock (RP2040 GPOUT carrier generation, RF power & slew rate)
│ ├── Engine (Dual-Core AMP appliance supervisor and worker pipeline)
│ ├── Health (ADC die temperature & Vsys supply voltage guardian)
│ ├── Multicore (Hardware SIO FIFO command dispatch and Core 1 launcher)
│ └── Watchdog (Hardware watchdog, crash telemetry scratchpad, TOT)
├── Modulation
│ ├── FSK (Continuous-phase 2-FSK digital modulator)
│ ├── Morse (Continuous-Wave PARIS-timed Morse code keying)
│ └── Audio_FM (Real-time analog FM audio & tone modulation)
└── Protocol
├── Channels (In-band frequency sets & antenna matching plans)
├── CRC (High-performance table-driven CRC-16-CCITT checksums)
├── Crypto (256-bit ChaCha20 encryption & anti-replay validation)
└── Framing (Data link packet framing, sync words, and Manchester coding)
-
Written in Ada 2012 with zero compiler warnings, zero errors, and zero runtime exception propagation under
light-cortex-m0p. -
Root Data Types (
Radio_Kit.Types): Frequency ranges (1.374 kHz to 45 MHz), clock configs, drive strength, slew rates, bit ordering, and byte arrays. -
System Subsystem (
Radio_Kit.System):-
Hardware Clock & RF Power (
Radio_Kit.System.Clock): Drive currents (2mA,4mA,8mA,12mA) and slew rate control (Slew_FastvsSlew_Slow). -
Dedicated Dual-Core Engine (
Radio_Kit.System.Engine): Decoupled appliance configuration with supervisor/worker AMP model. -
Hardware Watchdog & Diagnostics (
Radio_Kit.System.Watchdog): Watchdog timer, non-volatile scratchpad telemetry across warm resets (SCRATCH0..SCRATCH3), and non-propagating Time-Out Timer (TOT). -
Hardware Health Guardian (
Radio_Kit.System.Health): Decoupled standalone ADC sensor monitoring (die temperature +$V_{sys}$ voltage) with cascading auto-throttling. -
Multicore Launcher (
Radio_Kit.System.Multicore): Inter-core SIO FIFO queues and Core 1 bootloader management.
-
Hardware Clock & RF Power (
-
Modulation Subsystem (
Radio_Kit.Modulation):-
Continuous-Phase 2-FSK (
Radio_Kit.Modulation.FSK): Configurable Mark/Space frequencies and symbol duration (Baud rate). -
CW / Morse Code Engine (
Radio_Kit.Modulation.Morse): Standard PARIS WPM speed keying engine. -
Analog FM Audio & Voice (
Radio_Kit.Modulation.Audio_FM): Frequency deviation modulation for PCM audio and tones.
-
Continuous-Phase 2-FSK (
-
Protocol Subsystem (
Radio_Kit.Protocol):-
In-Band Channels (
Radio_Kit.Protocol.Channels): Resonant frequency sets (LOW_FREQ,MEDIUM_LOW_FREQ,MEDIUM_FREQ,HIGH_FREQ,VERY_HIGH_FREQ). -
Data Link & Packet Framing (
Radio_Kit.Protocol.Framing): Preamble, sync words (0xD391), headers, payloads, and addressing. -
Fast Table-Driven CRC-16 (
Radio_Kit.Protocol.CRC): 256-word precomputed lookup table. -
Lightweight Cryptography (
Radio_Kit.Protocol.Crypto): Inlined 256-bit ChaCha20 stream cipher with sequence-derived nonces and anti-replay window.
-
In-Band Channels (
| GPIO Pin | Clock Generator | Board Note (Raspberry Pi Pico) |
|---|---|---|
| GPIO 21 | GPOUT 0 | Dedicated pin header (Pin 27) - Recommended RF output |
| GPIO 23 | GPOUT 1 | Connected to SMPS_PS (Power supply regulator mode) |
| GPIO 24 | GPOUT 2 | Dedicated pin header (Pin 29) |
| GPIO 25 | GPOUT 3 | Connected to on-board user LED |
The repository includes a single, comprehensive master demonstration appliance:
-
examples/radio_kit_demo: Autonomous 24/7 transmitter demonstrating:- Boot telemetry and scratchpad diagnostics tracking across resets.
- Standalone Hardware Health Guardian initialization (ADC die temp +
$V_{sys}$ voltage). - Clean
Engine_Config(fully decoupled from health configuration). - Dedicated Dual-Core AMP engine execution with SIO FIFO message dispatch.
- 8mA RF drive with fast slew rate.
- Unmodulated carrier burst generation.
- 1 kHz narrowband FM audio tone generation.
- Automated 20 WPM Morse code CW beacon (
CQ PICOKIT). - 1,200 baud 2-FSK encrypted telemetry packet with CRC-16 and 256-bit ChaCha20.
- Supervised low-power rest interval with continuous watchdog servicing.
# Clone the repository
git clone https://github.com/thirstymelon/Radio_Kit.git
cd Radio_Kit
# Build the root library
alr build
# Build the master demonstration
cd examples/radio_kit_demo
alr buildA complete technical manual adhering to the ASD-STE100 (Simplified Technical English) standard is provided in DOCUMENTATION.md.
Warning
Radio_Kit generates physical radio frequency electromagnetic fields when connected to a wire, probe, or antenna.
- Always terminate the RF output with a 50-ohm dummy load or attenuator for laboratory development.
- Obey all national and local telecommunications laws and spectrum allocations.
- Avoid unauthorized transmissions on restricted or licensed frequencies.
Apache License 2.0.