https://github.com/quartiq/queenmod
MTS/WMS prototype/testbed with STM32 and Rust
https://github.com/quartiq/queenmod
Last synced: 3 months ago
JSON representation
MTS/WMS prototype/testbed with STM32 and Rust
- Host: GitHub
- URL: https://github.com/quartiq/queenmod
- Owner: quartiq
- Created: 2018-06-26T15:54:46.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-07T06:10:14.000Z (almost 3 years ago)
- Last Synced: 2025-02-16T19:01:50.762Z (3 months ago)
- Language: Rust
- Size: 69.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# QUEEN WMS modulator/demodulator
* nucleo64 stm32f446
* rust# Design
## Modulation
* GPIO PA15 square phase modulation ~100 kHz
* has zeros at even harmonics (dick-effect)
* maximum power in the relevant sidebands (especially given fixed amplitude,
not fixed rms power), zero carrier, zero even harmonics## Detection
* PA0 ADC input
* sample rate ~1 MHz
* DMA## Demod, filtering
* frequency shifted rectangular window
* has zeros at multiples of the modulation (especially 2f/3f/dick-like effect)
* highest gain
* lowest noise bw
* scallopping loss not problematic
* sidelobes not problematic
* demodulation IQ or higher orders, or square, or dc/zero/avg## IIR filtering
* anything goes
## Output
* DAC output PA4, PA5
# Build
## Features
* **itm**: use the ITM cell for debugging output
* **simd**: use DSP SIMDs for MACC
* **bkpt**: place breakpoints around the ISR for timing## Commands
```
rustup override add nightly
rustup install nightly
rustup target add thumbv7em-none-eabicargo install itm # features=itm
mkfifo itm.fifo # features=itm
openocd -f stm32f446-nucleo64.cfg
cargo run --release
itmdump -f itm.fifo
```# TODO
* ADC1,2 should be interleaved
* use 15 sample+acquisition cycles, 17+x sample interval
* use either
* continuous mode with DDS
* alternate trigger mode and a 1/n trigger from TIMx, TIMx synced to TIM2
* maybe:
* interpolate DAC samples
* DMA double buffer write to DAC with TIMy, TIMy synced to TIM2