diff options
| author | xoviat <[email protected]> | 2023-07-30 15:53:28 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-30 15:53:28 +0000 |
| commit | 39c1cc9f00e35d2862a24ad8ef345037fc02a5be (patch) | |
| tree | 87fbba59c54abcafb2336351664e47c0e8d679ed /examples | |
| parent | 8bed573b88b5b387c7e0183c006520b3b60a7c54 (diff) | |
| parent | 73057ee241faf20f4b461766239d7cd805741cd7 (diff) | |
Merge pull request #1717 from OueslatiGhaith/wpan
wpan: fix examples
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32wb/src/bin/eddystone_beacon.rs | 5 | ||||
| -rw-r--r-- | examples/stm32wb/src/bin/gatt_server.rs | 5 | ||||
| -rw-r--r-- | examples/stm32wb/src/bin/mac_ffd.rs | 9 | ||||
| -rw-r--r-- | examples/stm32wb/src/bin/mac_ffd_net.rs | 9 | ||||
| -rw-r--r-- | examples/stm32wb/src/bin/mac_rfd.rs | 9 | ||||
| -rw-r--r-- | examples/stm32wb/src/bin/tl_mbox.rs | 5 | ||||
| -rw-r--r-- | examples/stm32wb/src/bin/tl_mbox_ble.rs | 5 | ||||
| -rw-r--r-- | examples/stm32wb/src/bin/tl_mbox_mac.rs | 9 |
8 files changed, 40 insertions, 16 deletions
diff --git a/examples/stm32wb/src/bin/eddystone_beacon.rs b/examples/stm32wb/src/bin/eddystone_beacon.rs index 451bd7d29..ea150c67e 100644 --- a/examples/stm32wb/src/bin/eddystone_beacon.rs +++ b/examples/stm32wb/src/bin/eddystone_beacon.rs | |||
| @@ -8,6 +8,7 @@ use defmt::*; | |||
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_stm32::bind_interrupts; | 9 | use embassy_stm32::bind_interrupts; |
| 10 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; | 10 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; |
| 11 | use embassy_stm32::rcc::WPAN_DEFAULT; | ||
| 11 | use embassy_stm32_wpan::hci::host::uart::UartHci; | 12 | use embassy_stm32_wpan::hci::host::uart::UartHci; |
| 12 | use embassy_stm32_wpan::hci::host::{AdvertisingFilterPolicy, EncryptionKey, HostHci, OwnAddressType}; | 13 | use embassy_stm32_wpan::hci::host::{AdvertisingFilterPolicy, EncryptionKey, HostHci, OwnAddressType}; |
| 13 | use embassy_stm32_wpan::hci::types::AdvertisingType; | 14 | use embassy_stm32_wpan::hci::types::AdvertisingType; |
| @@ -54,7 +55,9 @@ async fn main(_spawner: Spawner) { | |||
| 54 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. | 55 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. |
| 55 | */ | 56 | */ |
| 56 | 57 | ||
| 57 | let p = embassy_stm32::init(Default::default()); | 58 | let mut config = embassy_stm32::Config::default(); |
| 59 | config.rcc = WPAN_DEFAULT; | ||
| 60 | let p = embassy_stm32::init(config); | ||
| 58 | info!("Hello World!"); | 61 | info!("Hello World!"); |
| 59 | 62 | ||
| 60 | let config = Config::default(); | 63 | let config = Config::default(); |
diff --git a/examples/stm32wb/src/bin/gatt_server.rs b/examples/stm32wb/src/bin/gatt_server.rs index 0f6419d45..dd67249c7 100644 --- a/examples/stm32wb/src/bin/gatt_server.rs +++ b/examples/stm32wb/src/bin/gatt_server.rs | |||
| @@ -8,6 +8,7 @@ use defmt::*; | |||
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_stm32::bind_interrupts; | 9 | use embassy_stm32::bind_interrupts; |
| 10 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; | 10 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; |
| 11 | use embassy_stm32::rcc::WPAN_DEFAULT; | ||
| 11 | use embassy_stm32_wpan::hci::event::command::{CommandComplete, ReturnParameters}; | 12 | use embassy_stm32_wpan::hci::event::command::{CommandComplete, ReturnParameters}; |
| 12 | use embassy_stm32_wpan::hci::host::uart::{Packet, UartHci}; | 13 | use embassy_stm32_wpan::hci::host::uart::{Packet, UartHci}; |
| 13 | use embassy_stm32_wpan::hci::host::{AdvertisingFilterPolicy, EncryptionKey, HostHci, OwnAddressType}; | 14 | use embassy_stm32_wpan::hci::host::{AdvertisingFilterPolicy, EncryptionKey, HostHci, OwnAddressType}; |
| @@ -62,7 +63,9 @@ async fn main(_spawner: Spawner) { | |||
| 62 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. | 63 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. |
| 63 | */ | 64 | */ |
| 64 | 65 | ||
| 65 | let p = embassy_stm32::init(Default::default()); | 66 | let mut config = embassy_stm32::Config::default(); |
| 67 | config.rcc = WPAN_DEFAULT; | ||
| 68 | let p = embassy_stm32::init(config); | ||
| 66 | info!("Hello World!"); | 69 | info!("Hello World!"); |
| 67 | 70 | ||
| 68 | let config = Config::default(); | 71 | let config = Config::default(); |
diff --git a/examples/stm32wb/src/bin/mac_ffd.rs b/examples/stm32wb/src/bin/mac_ffd.rs index 1379ac6ba..881dc488d 100644 --- a/examples/stm32wb/src/bin/mac_ffd.rs +++ b/examples/stm32wb/src/bin/mac_ffd.rs | |||
| @@ -6,6 +6,7 @@ use defmt::*; | |||
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_stm32::bind_interrupts; | 7 | use embassy_stm32::bind_interrupts; |
| 8 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; | 8 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; |
| 9 | use embassy_stm32::rcc::WPAN_DEFAULT; | ||
| 9 | use embassy_stm32_wpan::mac::commands::{AssociateResponse, ResetRequest, SetRequest, StartRequest}; | 10 | use embassy_stm32_wpan::mac::commands::{AssociateResponse, ResetRequest, SetRequest, StartRequest}; |
| 10 | use embassy_stm32_wpan::mac::event::MacEvent; | 11 | use embassy_stm32_wpan::mac::event::MacEvent; |
| 11 | use embassy_stm32_wpan::mac::typedefs::{MacChannel, MacStatus, PanId, PibId, SecurityLevel}; | 12 | use embassy_stm32_wpan::mac::typedefs::{MacChannel, MacStatus, PanId, PibId, SecurityLevel}; |
| @@ -30,7 +31,7 @@ async fn main(spawner: Spawner) { | |||
| 30 | 31 | ||
| 31 | - Obtain a NUCLEO-STM32WB55 from your preferred supplier. | 32 | - Obtain a NUCLEO-STM32WB55 from your preferred supplier. |
| 32 | - Download and Install STM32CubeProgrammer. | 33 | - Download and Install STM32CubeProgrammer. |
| 33 | - Download stm32wb5x_FUS_fw.bin, stm32wb5x_BLE_Stack_full_fw.bin, and Release_Notes.html from | 34 | - Download stm32wb5x_FUS_fw.bin, stm32wb5x_BLE_Mac_802_15_4_fw.bin, and Release_Notes.html from |
| 34 | gh:STMicroelectronics/STM32CubeWB@2234d97/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x | 35 | gh:STMicroelectronics/STM32CubeWB@2234d97/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x |
| 35 | - Open STM32CubeProgrammer | 36 | - Open STM32CubeProgrammer |
| 36 | - On the right-hand pane, click "firmware upgrade" to upgrade the st-link firmware. | 37 | - On the right-hand pane, click "firmware upgrade" to upgrade the st-link firmware. |
| @@ -39,7 +40,7 @@ async fn main(spawner: Spawner) { | |||
| 39 | - In the Release_Notes.html, find the memory address that corresponds to your device for the stm32wb5x_FUS_fw.bin file | 40 | - In the Release_Notes.html, find the memory address that corresponds to your device for the stm32wb5x_FUS_fw.bin file |
| 40 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". | 41 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". |
| 41 | - Once complete, in the Release_Notes.html, find the memory address that corresponds to your device for the | 42 | - Once complete, in the Release_Notes.html, find the memory address that corresponds to your device for the |
| 42 | stm32wb5x_BLE_Stack_full_fw.bin file. It should not be the same memory address. | 43 | stm32wb5x_BLE_Mac_802_15_4_fw.bin file. It should not be the same memory address. |
| 43 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". | 44 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". |
| 44 | - Select "Start Wireless Stack". | 45 | - Select "Start Wireless Stack". |
| 45 | - Disconnect from the device. | 46 | - Disconnect from the device. |
| @@ -49,7 +50,9 @@ async fn main(spawner: Spawner) { | |||
| 49 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. | 50 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. |
| 50 | */ | 51 | */ |
| 51 | 52 | ||
| 52 | let p = embassy_stm32::init(Default::default()); | 53 | let mut config = embassy_stm32::Config::default(); |
| 54 | config.rcc = WPAN_DEFAULT; | ||
| 55 | let p = embassy_stm32::init(config); | ||
| 53 | info!("Hello World!"); | 56 | info!("Hello World!"); |
| 54 | 57 | ||
| 55 | let config = Config::default(); | 58 | let config = Config::default(); |
diff --git a/examples/stm32wb/src/bin/mac_ffd_net.rs b/examples/stm32wb/src/bin/mac_ffd_net.rs index bbcd0a70f..f8c76b5a4 100644 --- a/examples/stm32wb/src/bin/mac_ffd_net.rs +++ b/examples/stm32wb/src/bin/mac_ffd_net.rs | |||
| @@ -6,6 +6,7 @@ use defmt::*; | |||
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_stm32::bind_interrupts; | 7 | use embassy_stm32::bind_interrupts; |
| 8 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; | 8 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; |
| 9 | use embassy_stm32::rcc::WPAN_DEFAULT; | ||
| 9 | use embassy_stm32_wpan::mac::commands::{ResetRequest, SetRequest, StartRequest}; | 10 | use embassy_stm32_wpan::mac::commands::{ResetRequest, SetRequest, StartRequest}; |
| 10 | use embassy_stm32_wpan::mac::typedefs::{MacChannel, PanId, PibId}; | 11 | use embassy_stm32_wpan::mac::typedefs::{MacChannel, PanId, PibId}; |
| 11 | use embassy_stm32_wpan::mac::{self, Runner}; | 12 | use embassy_stm32_wpan::mac::{self, Runner}; |
| @@ -36,7 +37,7 @@ async fn main(spawner: Spawner) { | |||
| 36 | 37 | ||
| 37 | - Obtain a NUCLEO-STM32WB55 from your preferred supplier. | 38 | - Obtain a NUCLEO-STM32WB55 from your preferred supplier. |
| 38 | - Download and Install STM32CubeProgrammer. | 39 | - Download and Install STM32CubeProgrammer. |
| 39 | - Download stm32wb5x_FUS_fw.bin, stm32wb5x_BLE_Stack_full_fw.bin, and Release_Notes.html from | 40 | - Download stm32wb5x_FUS_fw.bin, stm32wb5x_BLE_Mac_802_15_4_fw.bin, and Release_Notes.html from |
| 40 | gh:STMicroelectronics/STM32CubeWB@2234d97/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x | 41 | gh:STMicroelectronics/STM32CubeWB@2234d97/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x |
| 41 | - Open STM32CubeProgrammer | 42 | - Open STM32CubeProgrammer |
| 42 | - On the right-hand pane, click "firmware upgrade" to upgrade the st-link firmware. | 43 | - On the right-hand pane, click "firmware upgrade" to upgrade the st-link firmware. |
| @@ -45,7 +46,7 @@ async fn main(spawner: Spawner) { | |||
| 45 | - In the Release_Notes.html, find the memory address that corresponds to your device for the stm32wb5x_FUS_fw.bin file | 46 | - In the Release_Notes.html, find the memory address that corresponds to your device for the stm32wb5x_FUS_fw.bin file |
| 46 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". | 47 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". |
| 47 | - Once complete, in the Release_Notes.html, find the memory address that corresponds to your device for the | 48 | - Once complete, in the Release_Notes.html, find the memory address that corresponds to your device for the |
| 48 | stm32wb5x_BLE_Stack_full_fw.bin file. It should not be the same memory address. | 49 | stm32wb5x_BLE_Mac_802_15_4_fw.bin file. It should not be the same memory address. |
| 49 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". | 50 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". |
| 50 | - Select "Start Wireless Stack". | 51 | - Select "Start Wireless Stack". |
| 51 | - Disconnect from the device. | 52 | - Disconnect from the device. |
| @@ -55,7 +56,9 @@ async fn main(spawner: Spawner) { | |||
| 55 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. | 56 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. |
| 56 | */ | 57 | */ |
| 57 | 58 | ||
| 58 | let p = embassy_stm32::init(Default::default()); | 59 | let mut config = embassy_stm32::Config::default(); |
| 60 | config.rcc = WPAN_DEFAULT; | ||
| 61 | let p = embassy_stm32::init(config); | ||
| 59 | info!("Hello World!"); | 62 | info!("Hello World!"); |
| 60 | 63 | ||
| 61 | let config = Config::default(); | 64 | let config = Config::default(); |
diff --git a/examples/stm32wb/src/bin/mac_rfd.rs b/examples/stm32wb/src/bin/mac_rfd.rs index 4d8b6601a..000355de6 100644 --- a/examples/stm32wb/src/bin/mac_rfd.rs +++ b/examples/stm32wb/src/bin/mac_rfd.rs | |||
| @@ -6,6 +6,7 @@ use defmt::*; | |||
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_stm32::bind_interrupts; | 7 | use embassy_stm32::bind_interrupts; |
| 8 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; | 8 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; |
| 9 | use embassy_stm32::rcc::WPAN_DEFAULT; | ||
| 9 | use embassy_stm32_wpan::mac::commands::{AssociateRequest, DataRequest, GetRequest, ResetRequest, SetRequest}; | 10 | use embassy_stm32_wpan::mac::commands::{AssociateRequest, DataRequest, GetRequest, ResetRequest, SetRequest}; |
| 10 | use embassy_stm32_wpan::mac::event::MacEvent; | 11 | use embassy_stm32_wpan::mac::event::MacEvent; |
| 11 | use embassy_stm32_wpan::mac::typedefs::{ | 12 | use embassy_stm32_wpan::mac::typedefs::{ |
| @@ -32,7 +33,7 @@ async fn main(spawner: Spawner) { | |||
| 32 | 33 | ||
| 33 | - Obtain a NUCLEO-STM32WB55 from your preferred supplier. | 34 | - Obtain a NUCLEO-STM32WB55 from your preferred supplier. |
| 34 | - Download and Install STM32CubeProgrammer. | 35 | - Download and Install STM32CubeProgrammer. |
| 35 | - Download stm32wb5x_FUS_fw.bin, stm32wb5x_BLE_Stack_full_fw.bin, and Release_Notes.html from | 36 | - Download stm32wb5x_FUS_fw.bin, stm32wb5x_BLE_Mac_802_15_4_fw.bin, and Release_Notes.html from |
| 36 | gh:STMicroelectronics/STM32CubeWB@2234d97/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x | 37 | gh:STMicroelectronics/STM32CubeWB@2234d97/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x |
| 37 | - Open STM32CubeProgrammer | 38 | - Open STM32CubeProgrammer |
| 38 | - On the right-hand pane, click "firmware upgrade" to upgrade the st-link firmware. | 39 | - On the right-hand pane, click "firmware upgrade" to upgrade the st-link firmware. |
| @@ -41,7 +42,7 @@ async fn main(spawner: Spawner) { | |||
| 41 | - In the Release_Notes.html, find the memory address that corresponds to your device for the stm32wb5x_FUS_fw.bin file | 42 | - In the Release_Notes.html, find the memory address that corresponds to your device for the stm32wb5x_FUS_fw.bin file |
| 42 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". | 43 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". |
| 43 | - Once complete, in the Release_Notes.html, find the memory address that corresponds to your device for the | 44 | - Once complete, in the Release_Notes.html, find the memory address that corresponds to your device for the |
| 44 | stm32wb5x_BLE_Stack_full_fw.bin file. It should not be the same memory address. | 45 | stm32wb5x_BLE_Mac_802_15_4_fw.bin file. It should not be the same memory address. |
| 45 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". | 46 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". |
| 46 | - Select "Start Wireless Stack". | 47 | - Select "Start Wireless Stack". |
| 47 | - Disconnect from the device. | 48 | - Disconnect from the device. |
| @@ -51,7 +52,9 @@ async fn main(spawner: Spawner) { | |||
| 51 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. | 52 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. |
| 52 | */ | 53 | */ |
| 53 | 54 | ||
| 54 | let p = embassy_stm32::init(Default::default()); | 55 | let mut config = embassy_stm32::Config::default(); |
| 56 | config.rcc = WPAN_DEFAULT; | ||
| 57 | let p = embassy_stm32::init(config); | ||
| 55 | info!("Hello World!"); | 58 | info!("Hello World!"); |
| 56 | 59 | ||
| 57 | let config = Config::default(); | 60 | let config = Config::default(); |
diff --git a/examples/stm32wb/src/bin/tl_mbox.rs b/examples/stm32wb/src/bin/tl_mbox.rs index 9fc4b8aac..fc49c3c4a 100644 --- a/examples/stm32wb/src/bin/tl_mbox.rs +++ b/examples/stm32wb/src/bin/tl_mbox.rs | |||
| @@ -6,6 +6,7 @@ use defmt::*; | |||
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_stm32::bind_interrupts; | 7 | use embassy_stm32::bind_interrupts; |
| 8 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; | 8 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; |
| 9 | use embassy_stm32::rcc::WPAN_DEFAULT; | ||
| 9 | use embassy_stm32_wpan::TlMbox; | 10 | use embassy_stm32_wpan::TlMbox; |
| 10 | use embassy_time::{Duration, Timer}; | 11 | use embassy_time::{Duration, Timer}; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 12 | use {defmt_rtt as _, panic_probe as _}; |
| @@ -41,7 +42,9 @@ async fn main(_spawner: Spawner) { | |||
| 41 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. | 42 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. |
| 42 | */ | 43 | */ |
| 43 | 44 | ||
| 44 | let p = embassy_stm32::init(Default::default()); | 45 | let mut config = embassy_stm32::Config::default(); |
| 46 | config.rcc = WPAN_DEFAULT; | ||
| 47 | let p = embassy_stm32::init(config); | ||
| 45 | info!("Hello World!"); | 48 | info!("Hello World!"); |
| 46 | 49 | ||
| 47 | let config = Config::default(); | 50 | let config = Config::default(); |
diff --git a/examples/stm32wb/src/bin/tl_mbox_ble.rs b/examples/stm32wb/src/bin/tl_mbox_ble.rs index 90349422e..5745ebd02 100644 --- a/examples/stm32wb/src/bin/tl_mbox_ble.rs +++ b/examples/stm32wb/src/bin/tl_mbox_ble.rs | |||
| @@ -6,6 +6,7 @@ use defmt::*; | |||
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_stm32::bind_interrupts; | 7 | use embassy_stm32::bind_interrupts; |
| 8 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; | 8 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; |
| 9 | use embassy_stm32::rcc::WPAN_DEFAULT; | ||
| 9 | use embassy_stm32_wpan::TlMbox; | 10 | use embassy_stm32_wpan::TlMbox; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 12 | ||
| @@ -40,7 +41,9 @@ async fn main(_spawner: Spawner) { | |||
| 40 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. | 41 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. |
| 41 | */ | 42 | */ |
| 42 | 43 | ||
| 43 | let p = embassy_stm32::init(Default::default()); | 44 | let mut config = embassy_stm32::Config::default(); |
| 45 | config.rcc = WPAN_DEFAULT; | ||
| 46 | let p = embassy_stm32::init(config); | ||
| 44 | info!("Hello World!"); | 47 | info!("Hello World!"); |
| 45 | 48 | ||
| 46 | let config = Config::default(); | 49 | let config = Config::default(); |
diff --git a/examples/stm32wb/src/bin/tl_mbox_mac.rs b/examples/stm32wb/src/bin/tl_mbox_mac.rs index 5931c392b..f32e07d96 100644 --- a/examples/stm32wb/src/bin/tl_mbox_mac.rs +++ b/examples/stm32wb/src/bin/tl_mbox_mac.rs | |||
| @@ -6,6 +6,7 @@ use defmt::*; | |||
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_stm32::bind_interrupts; | 7 | use embassy_stm32::bind_interrupts; |
| 8 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; | 8 | use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; |
| 9 | use embassy_stm32::rcc::WPAN_DEFAULT; | ||
| 9 | use embassy_stm32_wpan::sub::mm; | 10 | use embassy_stm32_wpan::sub::mm; |
| 10 | use embassy_stm32_wpan::TlMbox; | 11 | use embassy_stm32_wpan::TlMbox; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 12 | use {defmt_rtt as _, panic_probe as _}; |
| @@ -27,7 +28,7 @@ async fn main(spawner: Spawner) { | |||
| 27 | 28 | ||
| 28 | - Obtain a NUCLEO-STM32WB55 from your preferred supplier. | 29 | - Obtain a NUCLEO-STM32WB55 from your preferred supplier. |
| 29 | - Download and Install STM32CubeProgrammer. | 30 | - Download and Install STM32CubeProgrammer. |
| 30 | - Download stm32wb5x_FUS_fw.bin, stm32wb5x_BLE_Stack_full_fw.bin, and Release_Notes.html from | 31 | - Download stm32wb5x_FUS_fw.bin, stm32wb5x_BLE_Mac_802_15_4_fw.bin, and Release_Notes.html from |
| 31 | gh:STMicroelectronics/STM32CubeWB@2234d97/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x | 32 | gh:STMicroelectronics/STM32CubeWB@2234d97/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x |
| 32 | - Open STM32CubeProgrammer | 33 | - Open STM32CubeProgrammer |
| 33 | - On the right-hand pane, click "firmware upgrade" to upgrade the st-link firmware. | 34 | - On the right-hand pane, click "firmware upgrade" to upgrade the st-link firmware. |
| @@ -36,7 +37,7 @@ async fn main(spawner: Spawner) { | |||
| 36 | - In the Release_Notes.html, find the memory address that corresponds to your device for the stm32wb5x_FUS_fw.bin file | 37 | - In the Release_Notes.html, find the memory address that corresponds to your device for the stm32wb5x_FUS_fw.bin file |
| 37 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". | 38 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". |
| 38 | - Once complete, in the Release_Notes.html, find the memory address that corresponds to your device for the | 39 | - Once complete, in the Release_Notes.html, find the memory address that corresponds to your device for the |
| 39 | stm32wb5x_BLE_Stack_full_fw.bin file. It should not be the same memory address. | 40 | stm32wb5x_BLE_Mac_802_15_4_fw.bin file. It should not be the same memory address. |
| 40 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". | 41 | - Select that file, the memory address, "verify download", and then "Firmware Upgrade". |
| 41 | - Select "Start Wireless Stack". | 42 | - Select "Start Wireless Stack". |
| 42 | - Disconnect from the device. | 43 | - Disconnect from the device. |
| @@ -46,7 +47,9 @@ async fn main(spawner: Spawner) { | |||
| 46 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. | 47 | Note: extended stack versions are not supported at this time. Do not attempt to install a stack with "extended" in the name. |
| 47 | */ | 48 | */ |
| 48 | 49 | ||
| 49 | let p = embassy_stm32::init(Default::default()); | 50 | let mut config = embassy_stm32::Config::default(); |
| 51 | config.rcc = WPAN_DEFAULT; | ||
| 52 | let p = embassy_stm32::init(config); | ||
| 50 | info!("Hello World!"); | 53 | info!("Hello World!"); |
| 51 | 54 | ||
| 52 | let config = Config::default(); | 55 | let config = Config::default(); |
