Skip to content

quartiq/queenmod

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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-eabi

cargo 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

About

MTS/WMS prototype/testbed with STM32 and Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published