STM32F4: Bare Metal + LwIP Wi-Fi FMAC Driver Example
The WF200/WFM200 Wi-Fi Expansion Board is the best and fastest way to explore the capabilities of the WF200 Series of Wi-Fi Transceivers. The kit contains an expansion board that can be connected to a STM32 MCU starter-kit. The expansion board allows the STM32 MCU to connect to a WF200/WFM200 Wi-Fi module, which can connect to Wi-Fi networks, but also be an Access Point to which other devices can connect.
This document describes how to connect the WF200/WFM200 Wi-Fi EXP Board to a STM32 MCU and run the demonstration.
This demonstration runs the Wi-Fi Full MAC driver meant to communicate with the WF(M)200 Silicon Labs Wi-Fi transceivers.
- SoftAP: WF(M)200 configured in Wi-Fi Software-enabled Access Point mode
- Station: WF(M)200 configured in Wi-Fi Station mode
- AP: Any 'home network' or 'office network' Wi-Fi Access Point
- Device: The PC or phone used to access the demo
The WF200 Wi-Fi Expansion Board contains a Wi-Fi module. To use the board, an MCU starter-kit is required, where the MCU will be the host that communicates and controls the Wi-Fi module.
- One of the two Wi-Fi® expansion kits listed below:
|WF200 Wi-Fi® Expansion Kit SLEXP8022A||WFM200 Wi-Fi® Expansion Kit SLEXP8023A|
- An Arduino/NUCLEO interposer (Available through support ticket request, more information in the Additional Resources section) or some flying wires
- A NUCLEO-F429ZI development board
- A micro USB cable
- A PC to load a binary file in the NUCLEO board or to compile the IAR/TrueSTUDIO projects. In addition, it can be used to test the example if it is equipped with a Wi-Fi interface.
In addition to the previous hardware, a user needs software listed below:
- The software example named commissioning/F429ZI_bare_metal available on GitHub
- Licensed IAR Embedded Workbench IDE for ARM installed or Atollic TrueSTUDIO for STM32 IDE
- The correct ST-link driver installed on your machine
- A serial terminal to communicate with the NUCLEO-F429ZI board. For example, Tera Term or Putty
Set up your Kit
After you have the above resources, follow the steps described below (you can refer to the image below):
Connect the Arduino/Nucleo interposer board to the NUCLEO-F429ZI board.
Connect the WF200 expansion kit to the Arduino/Nucleo interposer board.
Make sure the "Power" switch on the WF200 expansion kit is in the [On Board LDO] position.
Select [SPI] or [SDIO] on the bus switch depending on the bus you want to use.
Connect the NUCLEO board to your PC using the USB cable. The board should appear as a mass storage device named "NODE_F429ZI".
Clone the GitHub Repository
The example is hosted at GitHub. To download a copy of the example, go to the following link: https://github.com/SiliconLabs/wfx-fullMAC-tools. Press the Green button [Clone or Download] on the right side to download the repository as a zip file.
After the download is complete, extract the zip file to a folder on your PC with a short name to avoid any issues with long path names (e.g. C:\).
Flash the STM32 MCU
Use the Binary Files
The first option to run the demonstration is to use the precompiled binaries provided under wfx-fullMAC-tools/Examples/STM32/commissioning/F429ZI_bare_metal/Binaries/. Depending on the bus selected on the switch, choose the corresponding binary file:
To use this method, drag-and-drop or copy the F429ZI_bare_metal_XXX.bin file to the "NODE_F429ZI" mass storage.
After the STM32 is successfully flashed, you can jump to the Start the Example section.
Compile the Project
Alternatively, use your preferred IDE to compile and flash the project into the NUCLEO board.
Open the project with either IAR or TrueSTUDIO IDEs.
Select the bus configuration (SPI or SDIO). Make sure it matches the switch position on the WF200 EXP board.
Build the project.
Flash the project to the NUCLEO-F429ZI board.
After the STM32 is successfully flashed, jump to the Start the Example section.
Start the Example
- While the toolchain builds the project and launches the debug session, open the Device Manager in Windows OS to see the COM Port Number assigned to the USB device [STMicroelectronics STLink Virtual COM Port].
Open a Serial Terminal application, such as PuTTY, configure it to the COM Port Number you found in the previous step, and set the UART settings to 115200 bps, 8 data bits, 1 stop bit and no parity.
Reset the NUCLEO board using the black button.
Watch the application’s progress on the Serial Terminal. The application will go through the following stages before it is ready:
FMAC Driver version 2.3.0 WF200 Firmware version 3.3.0 WF200 initialization successful IP address = 10.10.0.1 AP started Join the AP with SSID: silabs_softap
You are ready to move to the Wi-Fi commissioning demonstration page.