stm32f1xx-hal icon indicating copy to clipboard operation
stm32f1xx-hal copied to clipboard

PB3, PB4 does not work correctly

Open sb-child opened this issue 2 years ago • 4 comments

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"

sb-child avatar Aug 16 '22 03:08 sb-child

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

burrbull avatar Aug 16 '22 05:08 burrbull

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

sb-child avatar Aug 16 '22 05:08 sb-child

UPDATE: STM32F103C8T6 works fine, but STM32F103RBT6 not.

sb-child avatar Aug 16 '22 06:08 sb-child

Those chips should be identical inside except memory size, so I can't say what is wrong.

burrbull avatar Aug 16 '22 08:08 burrbull