-
Notifications
You must be signed in to change notification settings - Fork 49
AirSpy firmware directory structure and software architecture
-
airspy_m0
directory contains code for M0 core and it manages (fileairspy_m0.c
):- Boot initialization (function
main
) manages:- USB init
- M0 core IRQ (USB0 & M4 Core)
- R820T
- Manage R820T depending on USB command see
airspy_usb_req.c
function
- Manage R820T depending on USB command see
- Communication with M4 core
- It is done through M4 core IRQ function
m4core_isr
and just acknowledge M4 IRQ
- It is done through M4 core IRQ function
- Settings depending on Sample Rate and containing R820T BW conf are stored in file
firmware/common/airspy_xxx_conf.c
with xxx corresponding to board model name. - Main loop
main
function just check shared "data offset" to transfer the data over USB. - USB command/answer are managed through
airspy_usb_req.c
function- Main USB manager is
usb_vendor_request()
which dispatch all commands supported and defined inairspy_usb_req_init()
- Main USB manager is
- Boot initialization (function
-
airspy_m0s
directory contains code for M0s core (fileairspy_m0s.c
):- M0s is free for custom firmware (it is disabled and shall be enabled, see main in airspy_m4.c).
-
airspy_m4
directory contains code for M4F core and it manages (fileairspy_m4.c
):- Boot initialization (function
main
) manages:- Pin setup
- System clock init
- M4 core IRQ (DMA & M0 Core)
- ADC init
- Boot M0 core
- Analog to digital conversion (ADC)
- Managed through
dma_isr
function, it mainly manages:- Some error/performances statistics
- Update data offset (corresponding to ADC data read from DMA) shared with M0 core
- Managed through
- Communication with M0 core
- It is done through M0 core IRQ function
m0core_isr
and manages: - Commands from M0 in order to Start/Stop ADC and change Sample Rate
- It is done through M0 core IRQ function
- Settings for Init, ADC, SI5351C are stored in file
firmware/common/airspy_xxx_conf.c
with xxx corresponding to board model name. - Main loop
main
function do nothing except entering in low power mode(Wait For Event).
- Boot initialization (function
-
airspy_rom_to_ram
directory contains: -
m0, m0s and m4 built together in final firmware
airspy_rom_to_ram.bin
-
usbprog_airspy
directory contains tools to flash the firmware through USB firmware mode (only for Windows) -
dfuprog_airspy
directory contains tools to flash the firmware through USB DFU/Recovery mode (only for Windows) -
common
directory contains code for M0 or M4 core and specific to AirSpy hardware:- It contains mainly drivers:
- CORE mainly dedicated to LPC4370
- R820T
- SI5351C
- USB
- SPI Flash(W25Q80BV/S25FL032P)
- It contains mainly drivers:
-
libopencm3
directory contains mainly code for M0, M0s or M4 peripherals/boot -
scripts
contains Python scripts mainly to retrieve FW version from git release
In this architecture the main manager is the M0 core mainly because it manage USB answer/reply in order to be as low power as possible and to let M4F core free for future features.