diff options
| author | GhaithOueslati <[email protected]> | 2023-07-30 16:46:33 +0100 |
|---|---|---|
| committer | GhaithOueslati <[email protected]> | 2023-07-30 16:46:33 +0100 |
| commit | 73057ee241faf20f4b461766239d7cd805741cd7 (patch) | |
| tree | 87fbba59c54abcafb2336351664e47c0e8d679ed /examples/stm32wb/src/bin/mac_ffd.rs | |
| parent | 8bed573b88b5b387c7e0183c006520b3b60a7c54 (diff) | |
wpan: fix examples
Diffstat (limited to 'examples/stm32wb/src/bin/mac_ffd.rs')
| -rw-r--r-- | examples/stm32wb/src/bin/mac_ffd.rs | 9 |
1 files changed, 6 insertions, 3 deletions
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(); |
