Let's take your FRDM-KW41Z for a test drive! You have the choice of watching the sequence in a short video or following the detailed actions list below.
Note: K32W061/41 is preferred for any new Zigbee®, Thread and Bluetooth® LE 5.0 design. No new software releases planned
Your FRDM-KW41Z comes loaded with a demo that flashes the multicolored LEDs when you connect the board. If you do not see the LEDs flashing, first unplug and replug in the board. If that does not resolve the issue, try contacting us through the NXP Community (https://community.nxp.com/t5/Kinetis-Microcontrollers/bd-p/kinetis).
MCUXpresso SDK for the FRDM-KW41Z includes all the wireless connectivity stacks required to develop your solution using Thread, IEEE 802.15.4, Generic FSK, and Bluetooth Low Energy.
Click below to download a preconfigured SDK release for the FRDM-KW41Z that includes all the wireless connectivity stacks for the KW41Z.
You can also use the online SDK Builder to create a custom SDK package for the FRDM-KW41Z using the SDK builder.
NXP offers a complimentary toolchain called MCUXpresso IDE.
Want to use a different toolchain?
No problem! MCUXpresso SDK connectivity stack software also supports IAR.
The MCUXpresso Config Tool is an integrated suite of configuration tools that guides users in creating new MCUXpresso SDK projects, and also provides pin and clock tools to generate initialization C code for custom board support.
Configure your preferred terminal to 115200 baud rate, 8 data bits, no parity, and 1 stop bit. To determine the port number of the FRDM-KW41Z's virtual COM port, open the device manager and look under the "Ports" group.
Not sure how to use a terminal application? Try one of these tutorials:
Tera Term is a very popular open source terminal emulation application. This program can be used to display information sent from your NXP development platform's virtual serial port.
PuTTY is a popular terminal emulation application. This program can be used to display information sent from your NXP development platform's virtual serial port.
The KW41Z Wireless Connectivity software comes with a list of demo applications and driver examples ready to be compiled and run for each connectivity stack.
Generic FSK
The KW41Z Wireless Connectivity Software package comes with the Connectivity Test demo application
for Generic FSK protocol. To see what's available, browse to the 'examples'
folder (
If you are interested in running the preprogrammed Connectivity Test Application that comes with your board, Click here
You probably want to build and debug a demo by yourself. Use the guide below to learn how to build and debug an example application from the Wireless Connectivity Stacks in the MCUXpresso IDE or IAR Embedded Workbench IDE.
IEEE 802.15.4
The KW41Z Wireless Connectivity Software package comes with a long list of demo applications for the
IEEE 802.15.4 protocol. To see what's available, browse to the 'examples' folder
(
If you are interested in running the preprogrammed Connectivity Test Application that comes with your board Click here.
You probably want to build and debug a demo by yourself. Use the guide below to learn how to build and debug an example application from the Wireless Connectivity Stacks in the MCUXpresso IDE or IAR Embedded Workbench IDE.
Hybrid (Bluetooth Low Energy + Thread)
The KW41Z Wireless Connectivity Software package comes with a long list of hybrid demo applications (Thread + Bluetooth Low Energy). To see what's available, browse to the 'examples' folder (\boards\frdmkw41z\wireless_examples\hybrid).
If you are interested in running the preprogrammed Connectivity Test Application that comes with your board, Click here.
In order to use the Bluetooth Low Energy and Hybrid examples, the Kinetis Bluetooth Low Energy Toolbox needs to be installed on a smartphone. This application provides several examples that can be used with the connectivity stack to connect your phone to the development board over Bluetooth Low Energy.
You probably want to build and debug a demo by yourself. Use the guide below to learn how to build and debug an example application from the Wireless Connectivity Stacks in the MCUXpresso IDE or IAR Embedded Workbench IDE.
SMAC
The KW41Z Wireless Connectivity Software package comes with a long list of demo applications for the
SMAC protocol. To see what's available, browse to the 'examples' folder (
If you are interested in running the preprogrammed Connectivity Test Application that comes with your board, Click here.
You probably want to build and debug a demo by yourself. Use the guide below to learn how to build and debug an example application from the Wireless Connectivity Stacks in the MCUXpresso IDE or IAR Embedded Workbench IDE.
These steps show how to:
Load and build the demo application in IAR Embedded Workbench.
Download and run the demo application.
The example used below is for the Generic FSK Connectivity Test demo, but these steps can be applied to any of the Wireless Connectivity demo applications.
Navigate to the Connectivity Test IAR workspace (located at
After the workspace is open, select the project.
Click the Make button to build the project.
Connect your FRDM-KW41Z board to your PC.
Click on the Download and Debug button (green arrow located on the toolbar).
Once the project has loaded, the debugger should stop at main(). Open
a Terminal Emulator program and open a session to your FRDM-KW41Z
COM port.
Configure the terminal with these settings:
Click the Go button to resume operation.
The following output will be displayed in the serial terminal.
If you don't see this output, verify your terminal settings and connections.
Refer to
Open up the MCUXpresso IDE
Switch to the Installed SDKs view within the MCUXpresso IDE window
Open Windows Explorer, and drag and drop the FRDM-KW41Z SDK (unzipped) file into the Installed SDKs view.
You will get the following pop-up. Click on OK to continue the import:
The installed SDK will appear in the Installed SDKs view as shown below:
The following steps will guide you through opening the GenFSK example.
Find the Quickstart Panel in the lower left-hand corner
Then click on Import SDK examples(s)…
Click on the frdmKW41Z board to select that you want to import an example that can run on that board, and then click on Next.
Use the arrow button to expand the wireless_examples category, and then under the genfsk category expand the connectivity_test project and select the freertos version of project. To use the UART for printing (instead of the default semihosting), clear the “Enable semihost” checkbox under the project options. Then, click on Next.
On the Advanced Settings wizard, clear the checkbox “Redirect SDK “PRINTF” to C library “printf”“ in order to use the MCUXpresso SDK console functions for printing instead of generic C library ones. Then click on Finish.
Now build the project by clicking on the project name and then in the Quickstart Panel click on Build.
You can see the status of the build in the Console tab.
Now that the project has been compiled, you can now flash it to the board and run it.
Make sure that the FRDM-KW41Z board is plugged in, and click in the Quickstart Panel click on Debug ‘frdmkw41z_wireless_examples_genfsk_connectivity_test_freertos’ [Debug]
MCUXpresso IDE will probe for connected boards and should find the JLink debug probe that is part of the integrated OpenSDA circuit on the FRDM-KW41Z. Click on OK to continue.
You may see the following message if this is your first debug with JLink of the day. Click on the checkbox at the bottom not to display the message again, and then click on Accept
The firmware will be downloaded to the board and the debugger started
Hit the terminate icon to stop the debugger.
Now disconnect the board, and connect the second FRDM-KW41Z board. Follow the same debugger steps to flash the connectivity software to that board so that both boards have the same firmware on them.
Now with both boards connected, open a Terminal Emulator program and
open a session to your FRDM-KW41Z COM port for each board.
Configure the terminal with these settings:
Hit the reset button on both boards
The following output will be displayed in each of the two serial terminals.
Refer to
These steps show how to:
The example used below is for the SMAC Connectivity Test demo, but these steps can be applied to any of the Wireless Connectivity demo applications.
Navigate to the Connectivity Test IAR workspace (located at
After the workspace is open, select the project.
Click the Make button to build the project.
Connect your FRDM-KW41Z board to your PC.
Click on the Download and Debug button (green arrow located on the toolbar).
Once the project has loaded, the debugger should stop at main(). Open a Terminal Emulator program and open a session to your FRDM-KW41Z COM port.
Configure the terminal with these settings:
Click the Go button to resume operation.
The following output will be displayed in the serial terminal.
If you don’t see this output, verify your terminal settings and connections.
Refer to
Open up the MCUXpresso IDE
Switch to the Installed SDKs view within the MCUXpresso IDE window
Open Windows Explorer, and drag and drop the FRDM-KW41Z SDK (unzipped) file into the Installed SDKs view.
You will get the following pop-up. Click on OK to continue the import:
The installed SDK will appear in the Installed SDKs view as shown below:
The following steps will guide you through opening the SMAC example.
Find the Quickstart Panel in the lower left-hand corner
Then click on Import SDK examples(s)…
Click on the frdmKW41Z board to select that you want to import an example that can run on that board, and then click on Next.
Use the arrow button to expand the wireless_examples category, and then under the SMAC category expand the connectivity_test project and select the freertos version of project. To use the UART for printing (instead of the default semihosting), clear the “Enable semihost” checkbox under the project options. Then, click on Next.
On the Advanced Settings wizard, clear the checkbox “Redirect SDK “PRINTF” to C library “printf”“ in order to use the MCUXpresso SDK console functions for printing instead of generic C library ones. Then click on Finish.
Now build the project by clicking on the project name and then in the Quickstart Panel click on Build.
You can see the status of the build in the Console tab.
Now that the project has been compiled, you can now flash it to the board and run it.
Make sure that the FRDM-KW41Z board is plugged in, and click in the Quickstart Panel click on Debug ‘frdmkw41z_wireless_examples_smac_connectivity_test_freertos’ [Debug]
MCUXpresso IDE will probe for connected boards and should find the JLink debug probe that is part of the integrated OpenSDA circuit on the FRDM-KW41Z. Click on OK to continue.
You may see the following message if this is your first debug with JLink of the day. Click on the checkbox at the bottom not to display the message again, and then click on Accept
The firmware will be downloaded to the board and the debugger started
Hit the terminate icon to stop the debugger.
Now disconnect the board, and connect the second FRDM-KW41Z board. Follow the same debugger steps to flash the connectivity software to that board so that both boards have the same firmware on them.
Now with both boards connected, open a Terminal Emulator program and
open a session to your FRDM-KW41Z COM port for each board.
Configure the terminal with these settings:
Hit the reset button on both boards
The following output will be displayed in each of the two serial terminals.
If you don’t see this output, verify your terminal settings and connections.
Refer to
The following steps will guide you through creating a simple Thread network.. A hybrid Bluetooth Low Energy+Thread project will be loaded onto the 1st board so that the board can be controlled via a Bluetooth smartphone application, while a Thread-only project will be loaded onto the 2nd board and controlled via a serial terminal.
Navigate to the Hybrid Bluetooth Low Energy Thread Router workspace
(located at
After the workspace is open, select the project.
Click the Make button to build the project.
Connect the first FRDM-KW41Z board to your PC.
Click on the Download and Debug button (green arrow located on the toolbar).
You may see the following message if this is your first debug with JLink of the day. Click on the checkbox at the bottom not to display the message again, and then click on Accept
The firmware will be downloaded to the board and the debugger started.
Right now we only want to load the firmware to the first board, so hit the terminate icon to stop the debugger.
The Hybrid board needs a Thread node to communicate with, so Thread firmware needs to be loaded onto the second board. The Router Eligible End Device project will be loaded onto board #2.
Unplug the first FRDM-KW41Z board and plug-in the second FRDM-KW41Z board to your PC
Navigate to the Router Eligible End Device project workspace (located
at
Build and flash the Router Eligible End Device demo using the same steps as before so that the 2nd FRDM-KW41Z has the thread_router firmware loaded onto it.
Stop the debugger.
Open a Terminal Emulator program and open a session to your FRDM-KW41Z COM port that has the thread_router_eligible project firmware on it (board #2)
Configure the terminal with these settings:
Hit the Reset button on board #2, which can be found near where the USB cable is plugged in. You should see the following on the terminal:
Plug-in board #1 that has the Hybrid Bluetooth Low Energy+Thread firmware loaded on it, so that both boards are now connected.
Open the Kinetis Bluetooth Low Energy Toolbox application on your mobile device and click on the Thread Shell function.
The Kinetis Bluetooth Low Energy Toolbox application should start scanning and find the FRDM-KW41Z board (NXP_THR). Select the NXP_THR device
The Kinetis Bluetooth Low Energy Toolbox should now be connected to the device. Using the keyboard on your mobile app that appears, you can type commands to the FRDM-KW41Z device. Type “help” to see the list of possible commands. Outputs from the FRDM-KW41Z board should appear in the app as well.
Start a new Thread network by typing “thr create” or by selecting that command in the Shortcuts menu
Inside the TeraTerm connectionto the second board (that is just running Thread), join this new network by typing “thr join”.
Take note of the ML64 address listed in the terminal for R2 by typing “ifconfig”
Inside the smartphone app terminal, type in the command to toggle the LED.
“coap CON POST
Refer to
The following steps will guide you through creating a simple Thread network.. A hybrid Bluetooth Low Energy+Thread project will be loaded onto the 1st board so that the board can be controlled via a Bluetooth smartphone application, while a Thread-only project will be loaded onto the 2nd board and controlled via a serial terminal.
Open up the MCUXpresso IDE
Switch to the Installed SDKs view within the MCUXpresso IDE window
Open Windows Explorer, and drag and drop the FRDM-KW41Z SDK (unzipped) file into the Installed SDKs view.
You will get the following pop-up. Click on OK to continue the import:
The installed SDK will appear in the Installed SDKs view as shown below:
The following steps will guide you through opening the hybrid example. This project will be loaded to one board, while another project will be loaded on the 2nd board.
Find the Quickstart Panel in the lower left-hand corner
Then click on Import SDK examples(s)…
Click on the frdmKW41Z board to select that you want to import an example that can run on that board, and then click on Next.
Use the arrow button to expand the wireless_examples category, and then under the hybrid category expand the ble_thread_router_wireless_uart project and select the freertos version of project. To use the UART for printing (instead of the default semihosting), clear the “Enable semihost” checkbox under the project options. Then, click on Next.
On the Advanced Settings wizard, clear the checkbox “Redirect SDK “PRINTF” to C library “printf”“ in order to use the MCUXpresso SDK console functions for printing instead of generic C library ones. Then click on Finish.
Now build the project by clicking on the project name and then in the Quickstart Panel click on Build.
You can see the status of the build in the Console tab.
Now that the project has been compiled, you can now flash it to the board and run it.
Make sure that the FRDM-KW41Z board is plugged in, and click in the Quickstart Panel click on Debug ‘frdmkw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos’ [Debug]
MCUXpresso IDE will probe for connected boards and should find the JLink debug probe that is part of the integrated OpenSDA circuit on the FRDM-KW41Z. Click on OK to continue.
You may see the following message if this is your first debug with JLink of the day. Click on the checkbox at the bottom not to display the message again, and then click on Accept
The firmware will be downloaded to the board and the debugger started
Right now we only want to load the firmware to the first board, so hit the terminate icon to stop the debugger.
The Hybrid board needs a Thread node to communicate with, so Thread firmware needs to be loaded onto the second board. The Router Eligible End Device project will be loaded onto board #2.
Unplug the first FRDM-KW41Z board and plug-in the second FRDM-KW41Z board to your PC
Import the wireless_demos->thread->router_eligible_device->freertos demo using the same steps as you did for the hybrid demo.
Build and load the end device demo using the same steps as before so that the 2nd FRDM-KW41Z has the thread_router firmware on it.
Stop the debugger.
Open a Terminal Emulator program and open a session to your FRDM-KW41Z COM port that has the thread_router_eligible project firmware on it (board #2)
Configure the terminal with these settings:
Hit the Reset button on board #2, which can be found near where the USB cable is plugged in. You should see the following on the terminal:
Plug-in board #1 that has the Hybrid Bluetooth Low Energy+Thread firmware loaded on it, so that both boards are now connected.
Open the Kinetis Bluetooth Low Energy Toolbox application on your mobile device and click on the Thread Shell function.
The Kinetis Bluetooth Low Energy Toolbox application should start scanning and find the FRDM-KW41Z board (NXP_THR). Select the NXP_THR device
The Kinetis Bluetooth Low Energy Toolbox should now be connected to the device. Using the keyboard on your mobile app that appears, you may type commands to the FRDM-KW41Z device. Type “help” to see the list of possible commands. Outputs from the FRDM-KW41Z board should appear in the app as well.
Start a new Thread network by typing “thr create” or by selecting that command in the Shortcuts menu
Inside the TeraTerm connectionto the second board (that is just running Thread), join this new network by typing “thr join”.
Take note of the ML64 address listed in the terminal for R2 by typing “ifconfig”
Inside the smartphone app terminal, type in the command to toggle
the LED.
“coap CON POST
Refer to
Option A: Use the MCUXpresso IDE to clone an example project.
Option B: Use the MCUXpresso Config Tool to clone an existing MCUXpresso SDK example for use with third-party IDEs.
Now, let’s use the Pins tool that is part of the MCUXpresso Config Tool to show how to add a new GPIO pin to your project to blink an LED.
Next use the Clocks tool that is part of the MCUXpresso Config Tool to change the clock settings and change the rate that the LED blinks.
With the application modified, you will see the FRDM-KW41Z’s blue LED slowly blinking. You can also view terminal output using the terminal program.
Now export the pin_mux.c and pin_mux.h files by clicking on the Sources tab on the right side to get to the Sources view, and selecting the export icon.
Select the directory to export the pin_mux.c and pin_mux.h files. In this example export to the “board” folder in the led_output project in the workspace that was created in the previous section.
(i.e. C:\nxp_workspace\frdmkw41z_driver_examples_gpio_led_output\board). Select Finish.
Select the directory to export the pin_mux.c and pin_mux.h files. In this example export to the “board” folder in the led_output project in the workspace that was created in the previous section.
(i.e. C:\nxp_workspace\frdmkw41z_driver_examples_gpio_led_output\board). Select Finish.
Explore beyond the FRDM-KW41Z by integrating other NXP solutions and software to your project and interact with our worldwide design community.
The NXP modular IoT Gateway reference design enables large node networks (LNNs) with preintegrated, tested, and RF certified support for a wide array of wireless communications protocols including: Thread, ZigBee, and Wi-Fi. This range of capability allows developers to easily build gateways based on this solution, using their choice of wireless protocols for end-to-end wireless communications in LNN configurations with supporting cloud options such as Amazon Web Services (AWS).
Thread is an IPv6-based mesh networking protocol developed by industry leading technology companies, like NXP®, for connecting products around the home and in buildings to each other, to the internet and to the cloud. Thread networks are simple to install, highly secure, scalable to hundreds of devices, and developed to run on low-power IEEE 802.15.4 chipsets. Learn more at http://nxp.com/thread and http://threadgroup.org
Explore the world with a full assortment of NXP sensor solutions. From accelerometers, pressure sensors, touch sensors, and many more, NXP has a sensor solution for your project. Find out more at http://nxp.com/sensors
Near Field Communication is a simple, intuitive technology that lets you interact securely with the world around you with a simple touch. Learn more about NXP’s NFC solutions at http://nxp.com/nfc
Connect with other engineers and get expert advice on designing with Kinetis MCUs and Wireless Connectivity software. Join the community discussion in one of our two dedicated communities: Kinetis MCU Community or Wireless Connectivity Community
The Connectivity Test Application is a SMAC-based Demo Application, which provides the user with means to test basic transmission-reception functionalities along with several advanced testing features based on the ASP and SMAC APIs.
The runtime configuration is performed using shortcut keys, which are available in most of the application’s menus. The menus or tests will change their behavior based on what settings are applied
The Connectivity Test Application has four main features:
The Carrier Sense test performs ED continuously until the ED value is above the CCA threshold and then transmit a packet, which contains pseudo-random data with the payload size configured using 'n' and 'm' shortcuts.
The Transmission Control test displays a selection menu for number of packets identical with the one in PER TX test and then it prompts the user to enter the interpacket delay. After that, the application will start sending the selected number of packets with the selected interpacket delay, using pseudo-random data for the payload with the size configured with 'n' and 'm' shortcuts.
For additional details on how to run the Connectivity Test Application, please refer to the SMAC’s Demonstration Applications User’s Guide.
These steps show how to:
Load and build the demo application in IAR Embedded Workbench.
Download and run the demo application.
The example used below is for the IEEE 802.15.4 "MyWirelessApplication" (mwa) demo, but these steps can be applied to any of the Wireless Connectivity demo applications.
Navigate to the mwa_coordinator IAR workspace (located at
After the workspace is open, select the project.
Click the Make button to build the project.
Connect your FRDM-KW41Z board to your PC.
Click on the Download and Debug button (green arrow located on the toolbar).
Once the project has loaded, the debugger should stop at main(). At this point, we need to program an end device. So terminate this debug session by clicking the terminate button shown in the figure below.
Unplug this board and connect a second FRDM-KW41Z board.
Navigate to the mwa_end_device IAR workspace (located at
After the workspace is open, select the project.
Click the Make button to build the project.
Connect your second FRDM-KW41Z board to your PC (if not done so already).
Click on the Download and Debug button (green arrow located on the toolbar).
Once the project has loaded, the debugger should stop at main(). At this point, we need to run the coordinator and end device together. So terminate this debug session by clicking the terminate button shown in the figure below.
Unplug this board and connect both boards to your host PC.
Open a Terminal Emulator program and open a session to one of the FRDM-KW41Z COM ports.
Open a second Terminal Emulator program and open a session to the other FRDM-KW41Z COM port.
Configure the terminal with these settings:
Press the reset button on both boards.
The coordinator device should display the following screen:
The end device should display the following screen:
Press any switch on the coordinator board first. The screen should then display the following:
Then press any switch on the end device board. The end device should then connect and display the following screen.
You should now be able to type characters into either terminal and see the characters echoed in the opposite terminal.
Refer to
Open up the MCUXpresso IDE
Switch to the Installed SDKs view within the MCUXpresso IDE window
Open Windows Explorer, and drag and drop the FRDM-KW41Z SDK (unzipped) file into the Installed SDKs view.
You will get the following pop-up. Click on OK to continue the import:
The installed SDK will appear in the Installed SDKs view as shown below:
The following steps will guide you through opening the 802.15.4 example.
Find the Quickstart Panel in the lower left-hand corner
Then click on Import SDK examples(s)…
Click on the frdmKW41Z board to select that you want to import an example that can run on that board, and then click on Next.
Use the arrow button to expand the wireless_examples category, and then under the ieee_802_15_4 category expand the mwa_coordinator project and select the freertos version of project. To use the UART for printing (instead of the default semihosting), clear the “Enable semihost” checkbox under the project options. Then, click on Next.
On the Advanced Settings wizard, clear the checkbox “Redirect SDK “PRINTF” to C library “printf”“ in order to use the MCUXpresso SDK console functions for printing instead of generic C library ones. Then click on Finish.
Now build the project by clicking on the project name and then in the Quickstart Panel click on Build.
You can see the status of the build in the Console tab.
Now that the project has been compiled, you can now flash it to the board and run it.
Make sure that the FRDM-KW41Z board is plugged in, and click in the Quickstart Panel click on Debug ‘frdmkw41z_wireless_examples_ieee_802_15_4_maw_coordinator_freertos’ [Debug]
MCUXpresso IDE will probe for connected boards and should find the JLink debug probe that is part of the integrated OpenSDA circuit on the FRDM-KW41Z. Click on OK to continue.
You may see the following message if this is your first debug with JLink of the day. Click on the checkbox at the bottom not to display the message again, and then click on Accept
The firmware will be downloaded to the board and the debugger started
6. At this point, we need to program an end device. So terminate this debug session by clicking the terminate button shown in the figure below. Then unplug this board, and plug up your second board.
Connect your second FRDM-KW41Z board to your PC (if not already done).
Import the wireless_demos->ieee_802_15_4->mwa_end_device_freertos demo using the same steps as you did for the coordinator demo.
Build and load the end device demo using the same steps as before so that the 2nd FRDM-KW41Z has this firmware on it.
Stop the debugger.
Open a Terminal Emulator program and open a session to one of the FRDM-KW41Z
COM ports.
Configure the terminal with these settings:
Open a second Terminal Emulator program and open a session to the other
FRDM-KW41Z COM port.
Configure the terminal with these settings:
Press the reset button on both boards.
The coordinator device should display the following screen:
The end device should display the following screen:
Press any switch on the coordinator board first. The screen should then display the following:
Then press any switch on the end device board. The end device should then connect and display the following screen.
You should now be able to type characters into either terminal and see the characters echoed in the opposite terminal.
Refer to
Click the small arrow next to the green bug icon.
Select Debug Configurations.
Select a project under the GDB SEGGER J-Link Debugging category, and then select the Debugger tab.
Then select “Variables…” next to the Executable box.
In the next dialog box, find the jlink_path variable, select it, and then select Edit Variables...
The Preferences dialog box will open. Select the jlink_path variable and then select Edit.
In the Edit Variable: jlink_path dialog box, ensure that the path and description are as shown below.
Be sure to click “OK” when closing all dialog boxes.