Cloud Testing 2

上次修改时间: 2023-11-09 12:38:00支持 CLOUD-PROD-TSP1

1. 连接

让我们开始试用FRDM-KW38!您可以选择观看短片中的操作顺序或遵循下面列出的详细操作。

1.1 Get Started with the FRDM-KW38 Development Board

1.2 连接USB线缆

FRDM-KW38 Evaluation Board – top

1.3 运行开箱即用的演示

Your FRDM-KW38 comes loaded with a demo that flashes the multi-colored LEDs when you connect the board.

FRDM-KW38-LED-COLORS

低功耗蓝牙(LE) Beacon

BLE Beacon应用演示了信标功能。信标是通过三个广播信道发送的不可连接的广播包。后者包含以下字段。

  • 公司标识符(两个字节):0x0025(由Bluetooth SIG定义的恩智浦ID)
  • Beacon Identifier (1 byte): 0xBC (Allows identifying an NXP Beacon alongside with the Company Identifier)
  • UUID(16个字节):信标传感器唯一标识符
  • A(两个字节):信标应用数据
  • B(两个字节):信标应用数据
  • C(两个字节):信标应用数据
  • RSSI at 1 m (1 byte): Allows distance-based applications

默认情况下,UUID值是基于电路板唯一标识符的随机值。

应用范围

为了查看信标,请下载并安装支持BLE的智能手机上的恩智浦物联网工具箱移动应用。

在Google Play上获取它

安装了恩智浦物联网工具箱后,Open the application. Then, open the "Beacons" demo and the FRDM-KW38 Beacon will be displayed.

FRDMKW38-BEACON-APP-COMPLETE

The IoT Toolbox can also perform actions once the beacon is identified, as an example, with this demo the IoT Toolbox can show a message when the beacon is detected. 您可以通过执行以下步骤来启用该操作:

  1. Click in the beacon shown by the IoT Toolbox
  2. In the "Action" panel change the None option to Message
  3. 选择找到信标时将显示的消息。By default, it shows "Thank you for choosing NXP BLE solutions"
  4. Click on the check mark located in the top right corner
  5. Now, once the beacon is found, it will also display the preconfigured message
IOT-TOOLBOX-APP-IMG2 IOT-TOOLBOX-APP-IMG3

Finally, user can also turn off or deactivate the beacons by holding the SW2 button for about 2-3 seconds in the FRDM-KW38. If the user wants to activate the beacons again, just press SW2 button.

2. 获取软件

2.1 Installing Software for the FRDM-KW38

2.2 Download MCUXpresso SDK with Connectivity Software

面向FRDM-KW38的MCUXpresso SDK包括所有必要的无线连接协议栈,支持您借助Generic FSK和BLE开发解决方案。

Click below to download a preconfigured SDK release for the FRDM-KW38 that includes all the wireless connectivity stacks for the KW38.

MCUXPRESSO-SDK-TN

获取MCUXpresso SDK

You can also use the online SDK Builder  to create a custom SDK package for the FRDM-KW38.

2.3 安装工具链

恩智浦提供名为MCUXpresso IDE的免费工具链。

MCUXpresso IDE

获取MCUXpresso IDE

想使用不同的工具链?

没问题!MCUXpresso SDK connectivity stack software also supports IAR .

IAR

2.4 MCUXpresso配置工具

MCUXpresso配置工具是一套集成的配置工具,可指导用户创建新的MCUXpresso SDK项目,还可提供引脚和时钟工具,以生成面向定制板支持的初始化C代码。

获取MCUXpresso配置工具

To learn more about the basic interactions between the tools while working with either an imported MCUXpresso SDK example project or creating a new project within the IDE, watch this three-part video series: Basic Application Development Using MCUXpresso IDE and MCUXpresso Config Tools.

2.5 PC配置

许多示例应用通过MCU UART输出数据,因此您需要确保已安装了板虚拟COM端口的驱动程序。运行驱动程序之前,必须将板插入您的PC。

下载驱动程序

FRDM-K64F-GS-configuration

借助已安装的串行端口驱动程序,运行您喜欢的终端应用,查看MCU UART的串行输出。Configure the terminal to 115,200 baud rate, 8 data bits, no parity and 1 stop bit. 如需确定FRDM-KW38虚拟COM端口的端口号,请打开设备管理器并在“端口”分组下查找。

不确定如何使用终端应用?尝试以下任一教程:Tera Term教程PuTTY教程

Test of Save.

3. 构建、运行

FRDM-KW38无线连接软件都自带一系列演示应用和驱动示例,可供每个连接协议栈直接编译和运行。

3.1 Gen FSK

在FRDM-KW38上构建并运行连接演示

3.2 Explore the Connectivity Example Code

Generic FSK

KW38无线连接软件包附带了一系列针对Generic FSK协议的连接测试演示。To see what's available, browse to the 'examples' folder: \boards\frdmkw38\wireless_examples\genfsk.

3.3 Build, Run and Debug Wireless Connectivity Examples

您也许想自己构建并调试演示。采用以下指南,了解如何从MCUXpresso IDE或IAR Embedded Workbench IDE中的“无线连接协议栈”中构建和调试应用示例。

3.4 BLE

在FRDM-KW38上构建并运行连接演示

3.5 Explore the Connectivity Example Codes

低功耗蓝牙

KW38无线连接软件包附带了一系列BLE协议的演示应用。To see what's available, browse to the 'examples' folder: \boards\frdmkw38\wireless_examples\bluetooth.

3.6 Download the NXP IoT Toolbox for your Smartphone

为了使用BLE和混合示例,需要在智能手机上安装恩智浦物联网工具箱。此应用程序提供了几个可与连接协议栈结合使用的示例,以通过BLE将手机连接到开发板上。

在Google Play上获取

3.7 Build, Run and Debug Wireless Connectivity Examples

您也许想自己构建并调试演示。采用以下指南,了解如何从MCUXpresso IDE或IAR Embedded Workbench IDE中的“无线连接协议栈”中构建和调试应用示例。

3.8 混合模式(Gen FSK + BLE)

在FRDM-KW38上构建并运行连接演示

3.9 Explore the Connectivity Example Codes

混合模式(Gen FSK + BLE)

The KW38 Wireless Connectivity Software package comes with a hybrid demo application (Gen FSK + Bluetooth LE). To see the hybrid demo application, browse to the 'examples' folder: \boards\frdmkw38\wireless_examples\hybrid.

3.10 Download the NXP IoT Toolbox for your Smartphone

khfhfdjgfjhgfkj

3.11 Build, Run and Debug Wireless Connectivity Examples

jdhjgfhjfkjfjkgvh

4. Create an Application for the FRDM-KW38

4.1 从MCUXpresso SDK克隆示例项目

选项A:使用MCUXpresso IDE来克隆示例项目。

选项B:使用MCUXpresso配置工具来克隆与第三方IDE配套使用的现有MCUXpresso SDK示例。

4.2 使用引脚工具

首先,我们使用属于MCUXpresso配置工具的引脚工具来显示如何在项目中添加一个新的GPIO引脚来使LED闪烁。

4.3 使用时钟工具

Next use the Clocks tool that is part of the MCUXpresso Config Tools to change the clock settings and change the rate that the LED blinks.

4.4 成功

With the application modified, you will see the FRDM-KW38's blue LED slowly blinking. 您还可以使用终端程序查看终端输出。

Tera Term教程

Tera Term教程

Tera Term是一款备受欢迎的开源终端仿真应用。此程序可用来显示从恩智浦开发平台虚拟串行端口发送的信息。

  1. DownloadTera Term from SourceForge. 下载完成后,运行安装程序,然后返回到该页面继续操作。
  2. 下载

  3. 启动Tera Term。首次启动时,会显示以下对话。选择串行选项。假设已连接了板,列表中会自动填充一个COM端口。
  4. Tera-Term-Connection
  5. Configure the serial port settings (using the COM port number identified earlier) to 115,200 baud rate, 8 data bits, no parity and 1 stop bit. 要进行此操作,进入Setup→Serial Port并更改设置
  6. 确认连接已打开。如已连接,Tera Term将在标题栏中显示以下内容
  7. Tera-Term-Console
  8. 一切就绪

PuTTY教程

PuTTY教程

PuTTY是一款备受欢迎的终端仿真应用。此程序可用来显示从恩智浦开发平台虚拟串行端口发送的信息。

  1. 使用以下按钮下载PuTTY。下载完成后,运行安装程序,然后返回到该页面继续操作。
  2. 下载

  3. 启动PuTTY,可双击下载的*.exe文件或从开始菜单启动,具体取决于您所选的下载类型
  4. In the window that launches, select the Serial radio button and enter the COM port number that you determined earlier. 还要输入波特率,在本例中,为115,200
  5. PUTTY-Configuration
  6. 点击“Open”(打开),打开串行连接。假设板已连接,并已输入正确的COM端口,此终端窗口会打开。如果配置不正确,PuTTY将会发出提示
  7. 一切就绪

网络安全和完整性

网络安全和完整性

文档和视频 说明
AN4507 Using the Kinetis Security and Flash Protection Features Using the system security and flash protection features on Kinetis MCUs to protect code and data from unauthorized access or modification.

有线通信

有线通信

The FRDM-KW38 includes an NXP TJA1057 CAN transceiver and an NXP TJA1027 LIN transceiver.

文档和视频 说明
AN12377 Tuning I²C Timing in Target Mode How to configure the I²C timing of a responder device to meet application needs, which apply to Kinetis parts that contain I²C IP instead of LPI2C.
AN12948 Using LIN or CAN Bus to Upgrade Image on the KW36/38 How to use the LIN or CAN nodes, which have OTAP capability to upgrade the nodes, which have no OTAP capability, by LIN or CAN bus.

MCUXpresso SDK示例

SDK中提供了几个示例、演示和驱动程序,帮助您快速入门。下面列出了有线通信的一些常见示例。

Bubble Demo (I²C example)

Demonstrates basic usage of the onboard accelerometer to implement a bubble level. A bubble level utilizes two axes to visually show deviation from a level plane (0 degrees) on a given axis.

Path: /boards/frdmkw38/demo_apps/bubble

LIN Demo

Demonstrates signal transfer between controller and responder nodes using the LIN stack driver built on Low Power UART.

Path: /boards/frdmkw38/demo_apps/lin_stack

Shell演示(UART示例)

演示如何实现命令行shell应用。

Path: /boards/frdmkw38/demo_apps/shell

驱动程序示例

A number of driver examples exist within the SDK including I²C, DSPI, FLEXCAN and Low Power UART.

Path: /boards/frdmkw38/driver_examples

无线连接

无线连接

文档和视频 说明
AN12561 Kinetis KW38 Bluetooth Low Energy 5.0 Advertising Extension Enablement in Legacy Bluetooth Low Energy Examples Provides instructions on how to enable new Bluetooth Low Energy 5.0 Advertising extension features in a legacy Bluetooth Low Energy example.
AN2731 Compact Planar Antennas for 2.4 GHz Communication This document focuses on helping customers understand enough board layout and antenna basics to select a correct antenna type for their application and avoid typical layout mistakes that cause performance issues. Several popular antennas are presented as possible solutions for IEEE 802.15.4 and Bluetooth low energy applications.
AN12872 Anti-relay Attack Using GFSK This document introduces the anti-relay attack using GFSK, focusing on the multi-link monitoring concepts and applications. It proposes a system implementation using KW36 or KW38 Wireless MCU.
AN12977 KW38/KW36 Localization Based on RSSI Ranging Provides an introduction to localization based on the Bluetooth LE RSSI ranging. It implements a simple trilateral localization system using the Kinetis KW38 wireless MCU.
AN12517 FRDM-KW38 Co-existence with RF System Evaluation Report for Bluetooth Low Energy Application Provides the RF evaluation test results of the FRDM-KW38 for Bluetooth LE applications (2FSK modulation). It includes the test setup description and the tools used to perform the tests on your own.
AN12272 Use of Unique 40-bit MAC Address in Kinetis Wireless Microcontrollers Describes how IEEE MAC addresses are handled in the Bluetooth low energy (BLE) and IEEE 802.15.4.
FRDM-KW38 Radio Certification Documents FRDM-KW38 platforms have passed the CE RED and RCC radio certification. Find information on the certification documents and test reports here.
KW37/38/39 Bluetooth LE Range Performance Provides information on distance measurements depending on the Bluetooth LE data rate using the FRDM-KW38 board.

MCUXpresso SDK示例

SDK中提供了几个示例、演示和驱动程序,帮助您快速入门。下面列出了无线连接的一些常见示例。

Bluetooth Low Energy Demos

How to use the Bluetooth Low Energy protocol.

Path: /boards/frdmkw38/wireless_examples/bluetooth

Generic FSK Demos

How to use the Generic FSK.

Path: /boards/frdmkw38/wireless_examples/genfsk

Hybrid Bluetooth LE and GenFSK Demo

How to use the Bluetooth Low Energy protocol and Generic FSK in a single application.

Path: /boards/frdmkw38/wireless_examples/hybrid

电源管理

电源管理

文档和视频 说明
AN4503 Power Management for Kinetis MCUs When and how to use Kinetis low-power modes.
AN12459 Kinetis KW38 Power Consumption Analysis Provides information about the power consumption of Kinetis KW39/38/37 wireless MCU when using BLE protocol and how the software and hardware are configured to achieve best low-power operation.
AN5025 MKW4xZ/3xZ/3xA/2xZ DC-DC Power Management Describes the usage and operation of the DC-DC switching Power Supply converter for the MKW4xZ/3xZ/3xA/2Xz families.
Configuration for Unused pins/GPIOs on Kinetis Best practices to configure a GPIO if the pin is not used.

MCUXpresso SDK示例

SDK中提供了几个示例、演示和驱动程序,帮助您快速入门。Some common examples for power management are listed below.

Power Mode Switch Demo

Demonstrates the use of power modes in the SDK.

Path: /boards/frdmkw38/demo_apps/power_mode_switch

电源管理器演示

How to change power modes in the SDK.

Path: /boards/frdmkw38/demo_apps/power_manager

ADC Low Power Demo

Demonstrates the usage of the ADC peripheral while in a low power mode.

Path: /boards/frdmkw38/demo_apps/adc16_low_power

Bluetooth LE Responder Low Power Demo

Demonstrates the usage of low power mode on a Bluetooth LE responder device.

Path: /boards/frdmkw38/reference_design/bluetooth/lp

Bluetooth LE Controller Low Power Demo

Demonstrates the usage of low power mode on a Bluetooth LE controller device.

Path: /reference_design/bluetooth/lp_master

设备管理和安全OTA

设备管理和安全OTA

文档和视频 说明 下载
AN4282 Using the Kinetis Family Enhanced EEPROM Functionality Explains the features and usage of the Enhanced EEPROM functionality. -
FRDM-KW38 OpenSDA Bootloader and Application Webpage Provides information about the power consumption of Kinetis KW39/38/37 wireless MCU when using BLE protocol and how the software and hardware are configured to achieve best low-power operation. -
AN12979 KW38 Integrating the OTAP Client Service into a Bluetooth LE Peripheral Device Describes the integration of the Over The Air Profile into Bluetooth LE peripheral examples. 下载
AN12980 KW38 Integrating the OTAP Client Service into a Bluetooth LE Central Device Describes the integration of the Over The Air Profile into Bluetooth LE examples. 下载
Reprogramming a KW38 device using the OTAP Client Software This document guides to load a new software image in a KW38 device through (Over The Air Programming) OTAP Bluetooth LE service. -

MCUXpresso SDK示例

SDK中提供了几个示例、演示和驱动程序,帮助您快速入门。Some common examples for device management and secure OTA are listed below.

Bluetooth Low Energy Demos

How to use the Bluetooth Low Energy protocol.

Path: /boards/frdmkw38/wireless_examples/bluetooth

Flash Examples

Demonstrate flash driver usage in the SDK environment.

Path: /boards/frdmkw38/driver_examples/flash

Generic FSK Demos

How to use the Generic FSK.

Path: /boards/frdmkw38/wireless_examples/genfsk

Hybrid Bluetooth LE and GenFSK Demo

How to use the Bluetooth Low Energy protocol and Generic FSK in a single application.

Path: /boards/frdmkw38/wireless_examples/hybrid

支持

培训

Want to learn more about using the FRDM-KW38? 请查看我们提供的各种培训产品,从在线微型技术课程到动手实践的深入培训,获得帮助。

文档和视频 说明
使用MCUXpresso IDE和MCUXpresso配置工具开发基础应用 该视频系列分为三部分,介绍使用导入的SDK示例项目或创建新项目时,MCUXpresso IDE和Config Tools之间的基础交互。
AN12518 Hardware Design Considerations for MK39A/38A/37A/38Z/37Z Bluetooth LE Devices Describes Printed Circuit Board (PCB) design considerations for the MKW39A/38A/37A/38Z/37Z 48-pin QFN (HVQFN-7 x 7 Pitch 0.5 mm) wettable flank package. Included are layouts of the component copper layer, solder mask and solder paste stencil.
The Best Way to Build Your PCB Right the First Time Using the KW38 All of the important documents in one place concerning radio performance, low power and radio certification.
KW38 KW39 KW37 Hardware Board PCB Design-in Checklist Describes the usage and operation of the DC-DC switching Power Supply converter for the MKW4xZ/3xZ/3xA/2Xz families.
开启Project CHIP的未来 In this session, we'll take a closer look at Project CHIP and illustrate how NXP's portfolio is uniquely positioned to support Project CHIP-based designs.

论坛

Connect with other engineers and get expert advice on designing with the FRDM-KW38 on one of our community sites.