aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32wb/src/bin/mac_rfd.rs
diff options
context:
space:
mode:
authorGhaithOueslati <[email protected]>2023-07-30 16:46:33 +0100
committerGhaithOueslati <[email protected]>2023-07-30 16:46:33 +0100
commit73057ee241faf20f4b461766239d7cd805741cd7 (patch)
tree87fbba59c54abcafb2336351664e47c0e8d679ed /examples/stm32wb/src/bin/mac_rfd.rs
parent8bed573b88b5b387c7e0183c006520b3b60a7c54 (diff)
wpan: fix examples
Diffstat (limited to 'examples/stm32wb/src/bin/mac_rfd.rs')
-rw-r--r--examples/stm32wb/src/bin/mac_rfd.rs9
1 files changed, 6 insertions, 3 deletions
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::*;
6use embassy_executor::Spawner; 6use embassy_executor::Spawner;
7use embassy_stm32::bind_interrupts; 7use embassy_stm32::bind_interrupts;
8use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; 8use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler};
9use embassy_stm32::rcc::WPAN_DEFAULT;
9use embassy_stm32_wpan::mac::commands::{AssociateRequest, DataRequest, GetRequest, ResetRequest, SetRequest}; 10use embassy_stm32_wpan::mac::commands::{AssociateRequest, DataRequest, GetRequest, ResetRequest, SetRequest};
10use embassy_stm32_wpan::mac::event::MacEvent; 11use embassy_stm32_wpan::mac::event::MacEvent;
11use embassy_stm32_wpan::mac::typedefs::{ 12use 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();