mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 14:22:33 +00:00
Update chip from stm32u585ai to stm32u5g9zj and fix pinout
This commit is contained in:
parent
bfff50a361
commit
76606b6fe0
@ -1,6 +1,6 @@
|
||||
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
|
||||
# replace STM32U585AIIx with your chip as listed in `probe-rs chip list`
|
||||
runner = "probe-rs run --chip STM32U585AIIx"
|
||||
# replace STM32U5G9ZJTxQ with your chip as listed in `probe-rs chip list`
|
||||
runner = "probe-rs run --chip STM32U5G9ZJTxQ"
|
||||
|
||||
[build]
|
||||
target = "thumbv8m.main-none-eabihf"
|
||||
|
@ -5,8 +5,8 @@ version = "0.1.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
# Change stm32u585ai to your chip name, if necessary.
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "unstable-pac", "stm32u585ai", "time-driver-any", "memory-x" ] }
|
||||
# Change stm32u5g9zj to your chip name, if necessary.
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "unstable-pac", "stm32u5g9zj", "time-driver-any", "memory-x" ] }
|
||||
embassy-sync = { version = "0.6.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.6.1", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
|
@ -13,7 +13,7 @@ const WHOAMI: u8 = 0x0F;
|
||||
#[embassy_executor::main]
|
||||
async fn main(_spawner: Spawner) {
|
||||
let p = embassy_stm32::init(Default::default());
|
||||
let mut i2c = I2c::new_blocking(p.I2C2, p.PH4, p.PH5, Hertz(100_000), Default::default());
|
||||
let mut i2c = I2c::new_blocking(p.I2C2, p.PF1, p.PF0, Hertz(100_000), Default::default());
|
||||
|
||||
let mut data = [0u8; 1];
|
||||
unwrap!(i2c.blocking_write_read(HTS221_ADDRESS, &[WHOAMI], &mut data));
|
||||
|
@ -13,7 +13,7 @@ use embassy_usb::Builder;
|
||||
use panic_probe as _;
|
||||
|
||||
bind_interrupts!(struct Irqs {
|
||||
OTG_FS => usb::InterruptHandler<peripherals::USB_OTG_FS>;
|
||||
OTG_HS => usb::InterruptHandler<peripherals::USB_OTG_HS>;
|
||||
});
|
||||
|
||||
#[embassy_executor::main]
|
||||
@ -48,7 +48,7 @@ async fn main(_spawner: Spawner) {
|
||||
// to enable vbus_detection to comply with the USB spec. If you enable it, the board
|
||||
// has to support it or USB won't work at all. See docs on `vbus_detection` for details.
|
||||
config.vbus_detection = false;
|
||||
let driver = Driver::new_fs(p.USB_OTG_FS, Irqs, p.PA12, p.PA11, &mut ep_out_buffer, config);
|
||||
let driver = Driver::new_hs(p.USB_OTG_HS, Irqs, p.PA12, p.PA11, &mut ep_out_buffer, config);
|
||||
|
||||
// Create embassy-usb Config
|
||||
let mut config = embassy_usb::Config::new(0xc0de, 0xcafe);
|
||||
|
Loading…
Reference in New Issue
Block a user