stm32f1xx-hal
stm32f1xx-hal copied to clipboard
PB3, PB4 does not work correctly
Hi,
I am trying this example, PA15 is working fine but PB3, PB4 seems not blinking.
I have tested on STM32F103RBT6
and GD32F103RET6
with same results.
After searching related issues, but I have no idea how to fix that.
My Cargo.toml
(deps are latest):
[package]
name = "example"
version = "1.0.0"
edition = "2021"
[profile.release]
opt-level = 'z'
lto = true
debug = false
[dependencies]
stm32f1xx-hal = { version = "*", features = ["stm32f103", "rt", "medium"] }
cortex-m-rt = { version = "*", features = ["device"] }
cortex-m = "*"
panic-halt = "*"
micromath = "*"
ssd1306 = "*"
embedded-hal = "*"
embedded-graphics = "*"
nb = "*"
memory.x
:
MEMORY
{
FLASH : ORIGIN = 0x08000000, LENGTH = 512K
RAM : ORIGIN = 0x20000000, LENGTH = 64K
}
.cargo/config
:
[target.thumbv7m-none-eabi]
rustflags = [
"-C", "link-arg=-Tlink.x",
]
[build]
target = "thumbv7m-none-eabi"
https://docs.rs/stm32f1xx-hal/0.9.0/stm32f1xx_hal/gpio/index.html#accessing-pa15-pb3-and-pb14
https://github.com/stm32-rs/stm32f1xx-hal/blob/master/examples/nojtag.rs
https://github.com/stm32-rs/stm32f1xx-hal/blob/master/examples/nojtag.rs
sorry that this example still doesn't work. PA15 is working fine but PB3, PB4 not
UPDATE: STM32F103C8T6
works fine, but STM32F103RBT6
not.
Those chips should be identical inside except memory size, so I can't say what is wrong.