Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to import UART5 in the chip F103RC? #3690

Closed
Rainweic opened this issue Dec 27, 2024 · 1 comment
Closed

How to import UART5 in the chip F103RC? #3690

Rainweic opened this issue Dec 27, 2024 · 1 comment

Comments

@Rainweic
Copy link

My chip is stm32f103rc, I want to use UART5 to connect LiDAR, but I can not find UART5 in embassy_stm32::peripherals. But I clearly found this serial port in the STM32-METAPAC (version 15).

I need help~

Cargo.toml:

[package]
name = "lidar"
version = "0.1.0"
edition = "2021"

[dependencies]
cortex-m = { version = "0.7.7", features = ["inline-asm", "critical-section-single-core"] }
cortex-m-rt = "0.7.5"
defmt = { version = "0.3.10", optional = true }
defmt-rtt = { version = "0.4.1", optional = true }
embassy-executor = { version = "0.6.3", features = ["arch-cortex-m", "executor-thread", "integrated-timers"] }
embassy-futures = "0.1.1"
embassy-sync = "0.6.1"
embassy-time = { version = "0.3.2", features = ["tick-hz-32_768"] }
embassy-stm32 = { version = "0.1.0", features = ["rt", "stm32f103rc", "time-driver-any", "exti"] }
panic-halt = "1.0.0"
panic-probe = { version = "0.3.2", features = ["print-defmt"], optional = true }

[profile.dev]
debug = true
lto = true
opt-level = "z"
incremental = true

[profile.release]
debug = false
lto = true
opt-level = "z"
incremental = true

[features]
defmt = ["dep:defmt"]
defmt-rtt = ["dep:defmt-rtt"]
panic-probe = ["dep:panic-probe"]
default = ["debug"]
debug = [
    "defmt",
    "defmt-rtt",
    "panic-probe",
    "embassy-executor/defmt",
    "embassy-sync/defmt",
    "embassy-futures/defmt",
    "embassy-time/defmt",
    "embassy-time/defmt-timestamp-uptime",
    "embassy-stm32/defmt",
]


@Rainweic
Copy link
Author

Ok, I know why.
Edit Cargo.toml, and change version of embassy-stm32 like this:
embassy-stm32 = { version = "0.1.0", git="https://github.com/embassy-rs/embassy.git" }

The version of embassy-stm32 on crates.io is different from the one on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant