Part 1
요약·해설
기능 12종과 pin 12행, transceiver-derived MCU clock, USB device-only 조건, RTT attach/debug console을 설명합니다.
2.4 GHz IEEE 802.15.4
USB Type-A dongle · PCB antenna
SEGGER RTT · debug session only
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
05C5FC50B576E0768A7DB2C4E618543A06ECFB189DBDFC4E4A014BEC34B19B31
.. _usb_kw24d512:
NXP USB-KW24D512
################
Overview
********
The USB-KW24D512 is an evaluation board in a convenient USB dongle
form factor based on the NXP MKW24D512 System-in-Package (SiP) device
(KW2xD wireless MCU series).
MKW24D512 wireless MCU provides a low-power, compact device with
integrated IEEE 802.15.4 radio. The board can be used as a packet sniffer,
network node, border router or as a development board.
Hardware
********
- Kinetis KW2xD-2.4 GHz 802.15.4 Wireless Radio Microcontroller
(50 MHz, 512 KB flash memory, 64 KB RAM, low-power, crystal-less USB)
- USB Type A Connector
- Two blue LEDs
- One user push button
- One reset button
- Integrated PCB Folded F-type antenna
- 10-pin (0.05”) JTAG debug port for target MCU
For more information about the KW2xD SiP and USB-KW24D512 board:
- `KW2xD Website`_
- `KW2xD Datasheet`_
- `KW2xD Reference Manual`_
- `USB-KW24D512 Website`_
- `USB-KW24D512 Hardware Reference Manual`_
Supported Features
==================
The USB-KW24D512 board configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+-------------------------------------+
| PINMUX | on-chip | pinmux |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
| WATCHDOG | on-chip | watchdog |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| FLASH | on-chip | soc flash |
+-----------+------------+-------------------------------------+
| USB | on-chip | USB device |
+-----------+------------+-------------------------------------+
| RNGA | on-chip | entropy; |
| | | random |
+-----------+------------+-------------------------------------+
| FTFL | on-chip | flash programming |
+-----------+------------+-------------------------------------+
The default configuration can be found in
:zephyr_file:`boards/nxp/usb_kw24d512/usb_kw24d512_defconfig`
Other hardware features are not currently supported by the port.
Connections and IOs
===================
The KW2xD SoC has five pairs of pinmux/gpio controllers.
+-------+-----------------+--------------------------------------+
| Name | Function | Usage |
+=======+=================+======================================+
| PTA1 | UART0_RX | UART Console |
+-------+-----------------+--------------------------------------+
| PTA2 | UART0_TX | UART Console |
+-------+-----------------+--------------------------------------+
| PTC4 | GPIO | SW1 |
+-------+-----------------+--------------------------------------+
| PTD4 | GPIO | Blue LED (D2) |
+-------+-----------------+--------------------------------------+
| PTD5 | GPIO | Blue LED (D3) |
+-------+-----------------+--------------------------------------+
| PTB10 | SPI1_PCS0 | internal connected to MCR20A |
+-------+-----------------+--------------------------------------+
| PTB11 | SPI1_SCK | internal connected to MCR20A |
+-------+-----------------+--------------------------------------+
| PTB16 | SPI1_SOUT | internal connected to MCR20A |
+-------+-----------------+--------------------------------------+
| PTB17 | SPI1_SIN | internal connected to MCR20A |
+-------+-----------------+--------------------------------------+
| PTB19 | GPIO | internal connected to MCR20A (Reset) |
+-------+-----------------+--------------------------------------+
| PTB3 | GPIO | internal connected to MCR20A (IRQ_B) |
+-------+-----------------+--------------------------------------+
| PTC0 | GPIO | internal connected to MCR20A (GPIO5) |
+-------+-----------------+--------------------------------------+
System Clock
============
USB-KW24D512 contains 32 MHz oscillator crystal, which is connected to the
clock pins of the radio transceiver. The MCU is configured to
use the 4 MHz external clock from the transceiver with the on-chip PLL
to generate a 48 MHz system clock.
Serial Port
===========
The KW2xD SoC has three UARTs. One is configured and can be used for the
console, but it uses the same pins as the JTAG interface and is only
accessible via the JTAG SWD connector.
USB
===
The KW2xD SoC has a USB OTG (USBOTG) controller that supports both
device and host functions. Only USB device function is supported in Zephyr
at the moment. The USB-KW24D512 board has a USB Type A connector and
can only be used in device mode.
Programming and Debugging
*************************
Build and flash applications as usual (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Configuring a Debug Probe
=========================
A debug probe is used for both flashing and debugging the board. This board is
configured by default to use the :ref:`jlink-external-debug-probe`.
:ref:`jlink-external-debug-probe`
---------------------------------
Install the :ref:`jlink-debug-host-tools` and make sure they are in your search
path.
Attach a J-Link 10-pin connector to J1.
Configuring a Console
=====================
The console is available using `Segger RTT`_.
Connect a USB cable from your PC to J5.
Once you have started a debug session, run telnet:
.. code-block:: console
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SEGGER J-Link V6.44 - Real time terminal output
SEGGER J-Link ARM V10.1, SN=600111924
Process: JLinkGDBServerCLExe
Flashing
========
Here is an example for the :ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: usb_kw24d512
:goals: flash
The Segger RTT console is only available during a debug session. Use ``attach``
to start one:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: usb_kw24d512
:goals: attach
Run telnet as shown earlier, and you should see the following message in the
terminal:
.. code-block:: console
***** Booting Zephyr OS v1.14.0-rc1 *****
Hello World! usb_kw24d512
Debugging
=========
Here is an example for the :ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: usb_kw24d512
:goals: debug
Run telnet as shown earlier, step through the application in your debugger, and
you should see the following message in the terminal:
.. code-block:: console
***** Booting Zephyr OS v1.14.0-rc1 *****
Hello World! usb_kw24d512
.. _USB-KW24D512 Website:
https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/kinetis-cortex-m-mcus/w-serieswireless-conn.m0-plus-m4/ieee-802.15.4-packet-sniffer-usb-dongle-form-factor:USB-KW24D512
.. _USB-KW24D512 Hardware Reference Manual:
https://www.nxp.com/webapp/Download?colCode=USB-KW2XHWRM
.. _KW2xD Website:
https://www.nxp.com/products/wireless/thread/kinetis-kw2xd-2.4-ghz-802.15.4-wireless-radio-microcontroller-mcu-based-on-arm-cortex-m4-core:KW2xD
.. _KW2xD Datasheet:
https://www.nxp.com/docs/en/data-sheet/MKW2xDxxx.pdf
.. _KW2xD Reference Manual:
https://www.nxp.com/webapp/Download?colCode=MKW2XDXXXRM
.. _Segger RTT:
https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/
Part 3
한국어 전문 번역
개요
USB-KW24D512는 NXP MKW24D512 System-in-Package, 즉 KW2xD wireless MCU 계열을 사용한 USB dongle 형태의 평가 보드입니다. MKW24D512는 IEEE 802.15.4 radio를 통합한 작고 저전력인 wireless MCU이며 packet sniffer, network node, border router 또는 development board로 사용할 수 있습니다.
하드웨어
- Kinetis KW2xD 2.4 GHz 802.15.4 wireless radio MCU: 50 MHz, 512 KB flash, 64 KB RAM, low-power, crystal-less USB
- USB Type-A connector
- Blue LED 2개
- User push-button 1개와 reset button 1개
- 통합 PCB folded F-type antenna
- Target MCU용 10-pin 0.05-inch JTAG debug port
지원 기능
| 인터페이스 | 컨트롤러 | 드라이버/컴포넌트 |
|---|---|---|
NVIC | on-chip | nested vector interrupt controller |
SYSTICK | on-chip | systick |
PINMUX | on-chip | pinmux |
GPIO | on-chip | gpio |
I2C | on-chip | i2c |
SPI | on-chip | spi |
WATCHDOG | on-chip | watchdog |
UART | on-chip | serial port-polling; serial port-interrupt |
FLASH | on-chip | soc flash |
USB | on-chip | USB device |
RNGA | on-chip | entropy; random |
FTFL | on-chip | flash programming |
기본 구성은 boards/nxp/usb_kw24d512/usb_kw24d512_defconfig에 있습니다. 표 밖의 하드웨어 기능은 현재 port에서 지원하지 않습니다.
연결과 I/O
KW2xD SoC에는 pinmux/GPIO controller 쌍이 5개 있습니다.
| 이름 | 기능 | 용도 |
|---|---|---|
PTA1 | UART0_RX | UART Console |
PTA2 | UART0_TX | UART Console |
PTC4 | GPIO | SW1 |
PTD4 | GPIO | Blue LED (D2) |
PTD5 | GPIO | Blue LED (D3) |
PTB10 | SPI1_PCS0 | MCR20A에 내부 연결 |
PTB11 | SPI1_SCK | MCR20A에 내부 연결 |
PTB16 | SPI1_SOUT | MCR20A에 내부 연결 |
PTB17 | SPI1_SIN | MCR20A에 내부 연결 |
PTB19 | GPIO | MCR20A에 내부 연결 (Reset) |
PTB3 | GPIO | MCR20A에 내부 연결 (IRQ_B) |
PTC0 | GPIO | MCR20A에 내부 연결 (GPIO5) |
시스템 클록
USB-KW24D512의 32 MHz oscillator crystal은 radio transceiver clock pin에 연결됩니다. MCU는 transceiver가 제공하는 4 MHz external clock과 on-chip PLL을 사용해 48 MHz system clock을 생성하도록 구성됩니다.
직렬 포트
KW2xD SoC에는 UART가 3개 있습니다. 하나가 console로 구성되지만 JTAG interface와 같은 pin을 사용하므로 JTAG SWD connector를 통해서만 접근할 수 있습니다.
USB
KW2xD SoC의 USB OTG controller는 device와 host 기능을 모두 지원하지만 현재 Zephyr에서는 USB device 기능만 지원합니다. USB-KW24D512는 USB Type-A connector를 사용하며 device mode로만 쓸 수 있습니다.
프로그래밍과 디버깅
일반 application과 같은 방식으로 build하고 flash합니다. 기본 debug probe는 외부 J-Link입니다. J-Link host tool을 설치하고 검색 경로에 넣은 뒤 J-Link 10-pin connector를 J1에 연결합니다.
SEGGER RTT console
Console은 SEGGER Real Time Transfer(RTT)로 제공합니다. PC의 USB cable을 J5에 연결하고 debug session을 시작한 뒤 telnet을 실행하면 다음과 같이 연결됩니다.
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SEGGER J-Link V6.44 - Real time terminal output
SEGGER J-Link ARM V10.1, SN=600111924
Process: JLinkGDBServerCLExe
플래시와 console attach
# Zephyr 저장소 루트에서
west build -b usb_kw24d512 samples/hello_world
west flash
SEGGER RTT console은 debug session 동안에만 사용할 수 있습니다. 다음 attach로 session을 시작합니다.
# Zephyr 저장소 루트에서
west build -b usb_kw24d512 samples/hello_world
west attach
앞의 방식으로 telnet을 실행하면 다음 메시지가 표시됩니다.
***** Booting Zephyr OS v1.14.0-rc1 *****
Hello World! usb_kw24d512
디버깅
# Zephyr 저장소 루트에서
west build -b usb_kw24d512 samples/hello_world
west debug
앞의 방식으로 telnet을 실행하고 debugger에서 application을 단계 실행하면 다음 메시지가 표시됩니다.
***** Booting Zephyr OS v1.14.0-rc1 *****
Hello World! usb_kw24d512
참고 자료
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.