Go to file
kai 6154d953ba add pdh-test 2021-08-18 17:41:01 +08:00
.cargo set target-cpu=cortex-m7, MSRV 1.52.0, use probe-run 2021-05-13 11:58:36 +02:00
.github Fixing directory, site-url 2021-08-09 16:54:19 +02:00
ad9959 build(deps): bump embedded-hal from 0.2.5 to 0.2.6 2021-08-05 04:01:47 +00:00
book Fixing directory, site-url 2021-08-09 16:54:19 +02:00
dsp relicense as MIT OR Apache-2.0 2021-07-26 17:32:48 +02:00
hitl Fixing verbage 2021-08-10 14:13:02 +02:00
miniconf-mqtt add pdh-test 2021-08-18 17:41:01 +08:00
nix add pdh-test 2021-08-18 17:41:01 +08:00
py Updating clear method 2021-08-09 16:23:18 +02:00
scripts add pdh-test 2021-08-18 17:41:01 +08:00
src add pdh-test 2021-08-18 17:41:01 +08:00
.gitignore Adding mdbook-based user manual 2021-08-09 15:21:42 +02:00
.rustfmt.toml travis: clippy and rustfmt 2019-11-24 15:10:01 +01:00
CHANGELOG.md refine panic handler and add some logging info 2021-05-13 15:18:22 +02:00
Cargo.lock Merge #424 2021-08-10 11:01:55 +00:00
Cargo.toml add pdh-test 2021-08-18 17:41:01 +08:00
Embed.toml Adding Embed.toml file 2021-02-02 17:34:49 +01:00
LICENSE.APACHE2 relicense as MIT OR Apache-2.0 2021-07-26 17:32:48 +02:00
LICENSE.MIT LICENSE.MIT: fix copyright 2021-07-27 18:09:16 +02:00
README.md add pdh-test 2021-08-18 17:41:01 +08:00
build.rs itcm: implement in rust and execute during setup() 2021-05-14 17:23:38 +02:00
memory.x memory.x: remove comment about old cortex-m-rt 2021-04-29 16:45:30 +02:00
mosquitto.conf Adding docker instructions 2021-08-09 13:12:27 +02:00
openocd.gdb Removing invalid GDB command 2021-01-29 10:18:47 +01:00
shell.nix add pdh-test 2021-08-18 17:41:01 +08:00
stabilizer.cfg working 2019-03-18 13:10:00 +00:00
stabilizer_pid.png Squashing manual changes 2021-07-15 13:28:19 +02:00

README.md

Pounder_test

This Pounder quick noise floor test folder is forked from quartiq_stabilizer. Check out quartiq/stabilizer github page for more details.

For this quick test, I simply hard code the Pounder DDS setting in the init section in src/bin/pdh-test.rs , currently the DDS setting in this pdh-test has no MQTT control support yet. The stabilizer DAC is disabled and set to 0 here for simplicity. Change anything ask you like.

How to use this

This nix shell cotains rust, mqtt-explorer ... and python packages of gmqtt, miniconf-mqtt and some other packages. Simply clone this repo and run this to set up the environment. I only tested it with nixos-21.05 channel.

nix-shell shell.nix

Connect stabilizer JTAG connector to a ST-link V2 (or other debuggers) and then connect the debugger to your PC. Run the pdh-test.rs by calling this in the terminal: (Cargo.toml default features contain pounder_v1_1 and the broker IP is set to be 192.168.1.139 , change it if necessary)

BROKER="192.168.1.139" cargo run --release --bin pdh-test

Open another terminal and start mosquitto broker with this:

mosquitto -c mosquitto.conf

Open another terminal and change the stabilizer setting via MQTT. For example this will change the gain of the stabilizer ADC_ch0 to 10 (change the broker IP and topic path's mac address to your own one) and you should see the update log in the cargo run terminal:

python -m miniconf --broker 192.168.1.139 dt/sinara/pdh-test/04-91-62-d9-f5-e5 afe/0='"G10"'    

Another example is to start the stabilizer UDP datastream, which is currently streaming data of (adc_0, adc_1, dac_0, dac_1). You can change the UDP listener IP and port. To turn it off, just set the target ip to 0.0.0.0 and port to 0.

python -m miniconf --broker 192.168.1.139 dt/sinara/pdh-test/04-91-62-d9-f5-e5 stream_target='{"ip":[192,168,1,139], "port":1883}'       

To see and plot the stabilizer ADC_ch0 data, run this. Change the port and the python file if you want to plot data of other adc or dac channel.

python scripts/stabilizer_adc_stream_test.py --port 1883