Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
[target.thumbv7m-none-eabi]
runner = 'arm-none-eabi-gdb'
runner = 'probe-rs run --chip STM32F103C8Tx'
rustflags = [
"-C", "link-arg=-Tlink.x",
#"-C", "link-arg=-Tdefmt.x",
]

[build]
target = "thumbv7m-none-eabi"

[env]
DEFMT_LOG = "info"
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ features = ["stm32f103", "rtic", "high"]
default-target = "x86_64-unknown-linux-gnu"

[dependencies]
cortex-m = "0.7.6"
cortex-m-rt = "0.7.1"
defmt = { version = "0.3.8", optional = true }
cortex-m = { version = "0.7.7", features = ["critical-section-single-core"] }
cortex-m-rt = "0.7.3"
nb = "1.1"
embedded-dma = "0.2.0"
bxcan = "0.8.0"
Expand Down Expand Up @@ -73,7 +74,7 @@ stm32f103 = ["stm32f1/stm32f103", "has-can", "stm32-usbd"]
stm32f105 = ["stm32f1/stm32f107", "connectivity"]
stm32f107 = ["stm32f1/stm32f107", "connectivity"]

defmt = ["stm32f1/defmt"]
defmt = ["dep:defmt", "stm32f1/defmt"]

# Devices with 64 or 128 Kb ROM
medium = []
Expand Down
6 changes: 3 additions & 3 deletions src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ where
}
8..=15 => {
gpio.crh()
.modify(|_, w| unsafe { w.mode(N - 16).bits(speed as u8) });
.modify(|_, w| unsafe { w.mode(N - 8).bits(speed as u8) });
}
_ => unreachable!(),
}
Expand Down Expand Up @@ -979,8 +979,8 @@ where
}
8..=15 => {
gpio.crh().modify(|_, w| unsafe {
w.mode(N - 16).bits(MODE::MODE as u8);
w.cnf(N - 16).bits(MODE::CNF as u8)
w.mode(N - 8).bits(MODE::MODE as u8);
w.cnf(N - 8).bits(MODE::CNF as u8)
});
}
_ => unreachable!(),
Expand Down
Loading