Merge branch 'master' into feature/dhcp-support
This commit is contained in:
commit
e5505925a9
|
@ -532,12 +532,6 @@ dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "panic-halt"
|
|
||||||
version = "0.2.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "de96540e0ebde571dc55c73d60ef407c653844e6f9a1e2fdbd40c07b9252d812"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "panic-semihosting"
|
name = "panic-semihosting"
|
||||||
version = "0.5.6"
|
version = "0.5.6"
|
||||||
|
@ -740,7 +734,6 @@ dependencies = [
|
||||||
"mcp23017",
|
"mcp23017",
|
||||||
"miniconf",
|
"miniconf",
|
||||||
"nb 1.0.0",
|
"nb 1.0.0",
|
||||||
"panic-halt",
|
|
||||||
"panic-semihosting",
|
"panic-semihosting",
|
||||||
"paste",
|
"paste",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
|
@ -33,7 +33,6 @@ cortex-m-rt = { version = "0.6", features = ["device"] }
|
||||||
cortex-m-log = { version = "0.7", features = ["log-integration"] }
|
cortex-m-log = { version = "0.7", features = ["log-integration"] }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
panic-semihosting = { version = "0.5", optional = true }
|
panic-semihosting = { version = "0.5", optional = true }
|
||||||
panic-halt = "0.2"
|
|
||||||
serde = { version = "1.0", features = ["derive"], default-features = false }
|
serde = { version = "1.0", features = ["derive"], default-features = false }
|
||||||
heapless = { version = "0.5", features = ["serde"] }
|
heapless = { version = "0.5", features = ["serde"] }
|
||||||
cortex-m-rtic = "0.5.6"
|
cortex-m-rtic = "0.5.6"
|
||||||
|
|
|
@ -865,6 +865,14 @@ pub fn setup(
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let cycle_counter = {
|
||||||
|
// Set TRCENA bit, which is required for DWT counter to tick. (This is also
|
||||||
|
// set automatically when running in the debugger, and only cleared on power
|
||||||
|
// reset, not on soft reset.)
|
||||||
|
core.DCB.enable_trace();
|
||||||
|
CycleCounter::new(core.DWT, ccdr.clocks.c_ck())
|
||||||
|
};
|
||||||
|
|
||||||
let stabilizer = StabilizerDevices {
|
let stabilizer = StabilizerDevices {
|
||||||
afes,
|
afes,
|
||||||
adcs,
|
adcs,
|
||||||
|
@ -873,7 +881,7 @@ pub fn setup(
|
||||||
net: network_devices,
|
net: network_devices,
|
||||||
adc_dac_timer: sampling_timer,
|
adc_dac_timer: sampling_timer,
|
||||||
timestamp_timer,
|
timestamp_timer,
|
||||||
cycle_counter: CycleCounter::new(core.DWT, ccdr.clocks.c_ck()),
|
cycle_counter,
|
||||||
};
|
};
|
||||||
|
|
||||||
// info!("Version {} {}", build_info::PKG_VERSION, build_info::GIT_VERSION.unwrap());
|
// info!("Version {} {}", build_info::PKG_VERSION, build_info::GIT_VERSION.unwrap());
|
||||||
|
|
|
@ -4,9 +4,6 @@ use stm32h7xx_hal as hal;
|
||||||
#[cfg(feature = "semihosting")]
|
#[cfg(feature = "semihosting")]
|
||||||
use panic_semihosting as _;
|
use panic_semihosting as _;
|
||||||
|
|
||||||
#[cfg(not(any(feature = "nightly", feature = "semihosting")))]
|
|
||||||
use panic_halt as _;
|
|
||||||
|
|
||||||
mod adc;
|
mod adc;
|
||||||
mod afe;
|
mod afe;
|
||||||
mod configuration;
|
mod configuration;
|
||||||
|
@ -47,15 +44,16 @@ pub use configuration::{setup, PounderDevices, StabilizerDevices};
|
||||||
|
|
||||||
#[inline(never)]
|
#[inline(never)]
|
||||||
#[panic_handler]
|
#[panic_handler]
|
||||||
#[cfg(all(feature = "nightly", not(feature = "semihosting")))]
|
#[cfg(all(not(feature = "semihosting")))]
|
||||||
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
||||||
let gpiod = unsafe { &*hal::stm32::GPIOD::ptr() };
|
let gpiod = unsafe { &*hal::stm32::GPIOD::ptr() };
|
||||||
gpiod.odr.modify(|_, w| w.odr6().high().odr12().high()); // FP_LED_1, FP_LED_3
|
// Turn on both red LEDs, FP_LED_1, FP_LED_3
|
||||||
#[cfg(feature = "nightly")]
|
gpiod.odr.modify(|_, w| w.odr6().high().odr12().high());
|
||||||
core::intrinsics::abort();
|
loop {
|
||||||
#[cfg(not(feature = "nightly"))]
|
// Halt
|
||||||
unsafe {
|
core::sync::atomic::compiler_fence(
|
||||||
core::intrinsics::abort();
|
core::sync::atomic::Ordering::SeqCst,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue