diff --git a/Cargo.lock b/Cargo.lock index 8b406516c..693d2a05f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -600,15 +600,6 @@ dependencies = [ "num_enum_derive 0.5.11", ] -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive 0.6.1", -] - [[package]] name = "num_enum" version = "0.7.1" @@ -629,17 +620,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", -] - [[package]] name = "num_enum_derive" version = "0.7.1" @@ -657,12 +637,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" -[[package]] -name = "portable-atomic" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -986,7 +960,9 @@ dependencies = [ [[package]] name = "stm32h7xx-hal" -version = "0.15.0" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08bcfbdbe4458133f2fd55994a5c4f1b4bf28084f0218e93cdbc19d7c70219f" dependencies = [ "bare-metal 1.0.0", "cast", @@ -1028,6 +1004,8 @@ dependencies = [ [[package]] name = "synopsys-usb-otg" version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678f3707a7b1fd4863023292c42f73c6bab0e9b0096f41ae612d1af0ff221b45" dependencies = [ "cortex-m 0.7.7", "embedded-hal", @@ -1066,19 +1044,18 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "usb-device" -version = "0.3.0" -dependencies = [ - "heapless", - "num_enum 0.6.1", - "portable-atomic", -] +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f6cc3adc849b5292b4075fc0d5fdcf2f24866e88e336dd27a8943090a520508" [[package]] name = "usbd-serial" version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db75519b86287f12dcf0d171c7cf4ecc839149fe9f3b720ac4cfce52959e1dfe" dependencies = [ "embedded-hal", - "nb 1.1.0", + "nb 0.1.3", "usb-device", ] diff --git a/Cargo.toml b/Cargo.toml index 14aba4662..6e0fc2f7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,16 +63,15 @@ rand_xorshift = "0.3.0" rand_core = "0.6.4" minimq = "0.8.0" # patch with https://github.com/rust-embedded-community/usb-device/pull/129 -usbd-serial = {path = "../../rust-embedded-community/usbd-serial"} +usb-device = "0.2.9" +usbd-serial = "0.1.1" # Keep this synced with the miniconf version in py/setup.py miniconf = "0.9.0" smoltcp-nal = { version = "0.4.1", features = ["shared-stack"]} bbqueue = "0.5" -usb-device = { path = "../../rust-embedded-community/usb-device" } [dependencies.stm32h7xx-hal] -path = "../stm32h7xx-hal" -#version = "0.15.0" +version = "0.15.0" features = ["stm32h743v", "rt", "ethernet", "xspi", "usb_hs"] [features] diff --git a/memory.x b/memory.x index ade59a942..02afe9eba 100644 --- a/memory.x +++ b/memory.x @@ -44,9 +44,3 @@ BUG(cortex-m-rt): .itcm is not 8-byte aligned"); ASSERT(__siitcm % 4 == 0, " BUG(cortex-m-rt): the LMA of .itcm is not 4-byte aligned"); - -/* Place the stack in AXISRAM. - * Note: This is done because the sequential-storage crate needs to buffer flash sectors on - * the stack, each of which are 128KB. This can cause for excessive stack sizes. - */ -_stack_start = ORIGIN(AXISRAM) + LENGTH(AXISRAM); diff --git a/src/bin/dual-iir.rs b/src/bin/dual-iir.rs index e629f451f..2479985a2 100644 --- a/src/bin/dual-iir.rs +++ b/src/bin/dual-iir.rs @@ -67,7 +67,7 @@ const BATCH_SIZE: usize = 8; // The logarithm of the number of 100MHz timer ticks between each sample. With a value of 2^7 = // 128, there is 1.28uS per sample, corresponding to a sampling frequency of 781.25 KHz. -const SAMPLE_TICKS_LOG2: u8 = 8; +const SAMPLE_TICKS_LOG2: u8 = 7; const SAMPLE_TICKS: u32 = 1 << SAMPLE_TICKS_LOG2; const SAMPLE_PERIOD: f32 = SAMPLE_TICKS as f32 * hardware::design_parameters::TIMER_PERIOD; diff --git a/src/bin/lockin.rs b/src/bin/lockin.rs index e0accc39e..18f8e6e34 100644 --- a/src/bin/lockin.rs +++ b/src/bin/lockin.rs @@ -37,7 +37,7 @@ use core::{ use fugit::ExtU64; use mutex_trait::prelude::*; -use idsp::{Accu, Complex, ComplexExt, Filter, Lockin, Lowpass, Repeat, RPLL}; +use idsp::{Accu, Chain, Complex, ComplexExt, Filter, Lockin, Lowpass, RPLL}; use stabilizer::{ hardware::{ @@ -237,7 +237,7 @@ mod app { adcs: (Adc0Input, Adc1Input), dacs: (Dac0Output, Dac1Output), pll: RPLL, - lockin: Lockin>>, + lockin: Lockin>>, signal_generator: signal_generator::SignalGenerator, generator: FrameGenerator, cpu_temp_sensor: stabilizer::hardware::cpu_temp_sensor::CpuTempSensor, diff --git a/src/hardware/setup.rs b/src/hardware/setup.rs index 7f7037c3d..329518b8d 100644 --- a/src/hardware/setup.rs +++ b/src/hardware/setup.rs @@ -1061,11 +1061,9 @@ pub fn setup( usb_bus.as_ref().unwrap(), usb_device::device::UsbVidPid(0x1209, 0x392F), ) - .strings(&[usb_device::device::StringDescriptors::default() - .manufacturer("ARTIQ/Sinara") - .product("Stabilizer") - .serial_number(serial_number.as_ref().unwrap())]) - .unwrap() + .manufacturer("ARTIQ/Sinara") + .product("Stabilizer") + .serial_number(serial_number.as_ref().unwrap()) .device_class(usbd_serial::USB_CLASS_CDC) .build();