boards/nxp/twr_kv58f220m/doc/index.html · boards/nxp/twr_kv58f220m/doc/index.rst 공식 원문 ↗

Zephyr 3.7.0 · Boards · NXP · Kinetis KV5x

NXP TWR-KV58F220M

240 MHz급 Cortex-M7 KV58, motor header와 6-axis sensor를 갖춘 motor-control development board입니다.

Official pathboards/nxp/twr_kv58f220m/doc/index.html
Source fileboards/nxp/twr_kv58f220m/doc/index.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

기능 10종, 237.5 MHz clock, FXOS8700 jumper·Kconfig, OpenSDA/pyOCD 한계와 외부 J-Link 연결을 설명합니다.

Motor MCU

KV58 · 최대 240 MHz · 1 MB flash

Sensor trigger

J2/J9 shunt · Kconfig

Debug

외부 J-Link · J13

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 030A36AAFC0305C3D98169F930A798851AAF35846540B631671B9774B699C85D
.. _twr_kv58f220m:

NXP TWR-KV58F220M
#################

Overview
********

The TWR-KV58F220M is a development board for NXP Kinetis KV5x 32-bit
MCU-based platforms. The onboard OpenSDAv2 serial and debug adapter,
running an open source bootloader, offers options for serial
communication, flash programming, and run-control debugging.

.. figure:: ../../../../../../../boards/nxp/twr_kv58f220m/doc/twr_kv58f220m.jpg
   :align: center
   :alt: TWR-KV58F220M

   TWR-KV58F220M (Credit: NXP)

Hardware
********

- MKV58F1M0VLQ24 MCU (up to 240 MHz, 1 MB flash memory, 256 KB RAM,
  and 144 Low profile Quad Flat Package (LQFP))
- 1.8 V or 3.3 V MCU operation
- 6-axis FXOS8700CQ digital accelerometer and magnetometer
- Four user LEDs
- Four user push-buttons
- Potentiometer
- Two general purpose TWRPI headers
- Motor pin header

For more information about the KV5x SoC and the TWR-KV58F220M board, see
these NXP reference documents:

- `KV5x Website`_
- `KV5x Datasheet`_
- `KV5x Reference Manual`_
- `TWR-KV58F220M Website`_
- `TWR-KV58F220M User Guide`_
- `TWR-KV58F220M Schematics`_

Supported Features
==================

The twr_kv58f220m 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                                |
+-----------+------------+-------------------------------------+
| UART      | on-chip    | serial port-polling;                |
|           |            | serial port-interrupt               |
+-----------+------------+-------------------------------------+
| FLASH     | on-chip    | soc flash                           |
+-----------+------------+-------------------------------------+
| I2C       | on-chip    | i2c                                 |
+-----------+------------+-------------------------------------+
| SENSOR    | off-chip   | fxos8700 polling;                   |
|           |            | fxos8700 trigger                    |
+-----------+------------+-------------------------------------+
| SPI       | on-chip    | spi                                 |
+-----------+------------+-------------------------------------+
| ADC       | on-chip    | adc                                 |
+-----------+------------+-------------------------------------+

The default configuration can be found in the defconfig file:
:zephyr_file:`boards/nxp/twr_kv58f220m/twr_kv58f220m_defconfig`.

Other hardware features are not currently supported by the port.

System Clock
============

The KV58 SoC is configured to use the 50 MHz external oscillator on the
board with the on-chip PLL to generate a 237.5 MHz system clock.

Serial Port
===========

The KV58 SoC has six UARTs. UART0 is configured for the console. The
remaining UARTs are not used.

Accelerometer and magnetometer
==============================

The TWR-KV58F220M board by default only supports polling the FXOS8700
accelerometer and magnetometer for sensor values
(``CONFIG_FXOS8700_TRIGGER_NONE=y``).

In order to support FXOS8700 triggers (interrupts), shunts must be placed on
the jumpers ``J2`` and ``J9``. A trigger option also must be enabled in Kconfig
(either ``CONFIG_FXOS8700_TRIGGER_GLOBAL_THREAD=y`` or
``CONFIG_FXOS8700_TRIGGER_OWN_THREAD=y``).

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
=========================

This board integrates an OpenSDA debug probe. However, it can currently only be
used for flashing the KV58 SoC by copying the compiled firmware to the USB Mass
Storage Device. The board cannot be debugged using the OpenSDA probe, since
pyOCD does not support the target. The OpenSDA J-Link firmware (as of release
2019-06-03) also cannot be used, since the flash algorithm for the KV58 seems to
be broken at the time of writing.

An external J-Link debug probe connected to the JTAG header J13 is used to debug
the target.

Install the :ref:`jlink-debug-host-tools` and make sure they are in your search
path.

.. zephyr-app-commands::
   :zephyr-app: samples/hello_world
   :tool: all
   :board: twr_kv58f220m
   :goals: build

Configuring a Console
=====================

Even though the OpenSDA probe cannot be used for debugging, we will use it as a
USB-to-serial adapter for the serial console.

Connect a USB cable from your PC to J22.

Use the following settings with your serial terminal of choice (minicom, putty,
etc.):

- Speed: 115200
- Data: 8 bits
- Parity: None
- Stop bits: 1

Flashing
========

Here is an example for the :ref:`hello_world` application.

.. zephyr-app-commands::
   :zephyr-app: samples/hello_world
   :board: twr_kv58f220m
   :goals: flash

Open a serial terminal, reset the board (press the SW1 button), and you should
see the following message in the terminal:

.. code-block:: console

   ***** Booting Zephyr OS v1.14.0-xxx-gxxxxxxxxxxxx *****
   Hello World! twr_kv58f220m

Debugging
=========

Here is an example for the :ref:`hello_world` application.

.. zephyr-app-commands::
   :zephyr-app: samples/hello_world
   :board: twr_kv58f220m
   :goals: debug

Open a serial terminal, 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-xxx-gxxxxxxxxxxxx *****
   Hello World! twr_kv58f220m

.. _TWR-KV58F220M Website:
   https://www.nxp.com/TWR-KV58F220M

.. _TWR-KV58F220M User Guide:
   https://www.nxp.com/webapp/Download?colCode=TWRKV58F220MUG

.. _TWR-KV58F220M Schematics:
   https://www.nxp.com/webapp/Download?colCode=TWR-KV58F220M-SCH

.. _KV5x Website:
   https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/general-purpose-mcus/kv-series-cortex-m4-m0-plus-m7/kinetis-kv5x-240-mhz-motor-control-and-power-conversion-ethernet-mcus-based-on-arm-cortex-m7:KV5x

.. _KV5x Datasheet:
   https://www.nxp.com/docs/en/data-sheet/KV5XP144M240.pdf

.. _KV5x Reference Manual:
   https://www.nxp.com/webapp/Download?colCode=KV5XP144M240RM

Part 3

한국어 전문 번역

개요

TWR-KV58F220M은 NXP Kinetis KV5x 32-bit MCU platform용 development board입니다. Open-source bootloader를 실행하는 on-board OpenSDAv2 serial/debug adapter가 serial communication, flash programming, run-control debugging 선택지를 제공합니다.

NXP TWR-KV58F220M 보드
TWR-KV58F220M. 이미지 출처: NXP, Zephyr v3.7.0 공식 문서.

하드웨어

  • MKV58F1M0VLQ24 MCU: 최대 240 MHz, 1 MB flash, 256 KB RAM, 144-pin LQFP
  • 1.8 V 또는 3.3 V MCU 동작
  • 6-axis FXOS8700CQ digital accelerometer·magnetometer
  • User LED 4개와 user push-button 4개
  • Potentiometer
  • 범용 TWRPI header 2개
  • Motor pin header

지원 기능

인터페이스컨트롤러드라이버/컴포넌트
NVICon-chipnested vector interrupt controller
SYSTICKon-chipsystick
PINMUXon-chippinmux
GPIOon-chipgpio
UARTon-chipserial port-polling; serial port-interrupt
FLASHon-chipsoc flash
I2Con-chipi2c
SENSORoff-chipfxos8700 polling; fxos8700 trigger
SPIon-chipspi
ADCon-chipadc

기본 구성은 boards/nxp/twr_kv58f220m/twr_kv58f220m_defconfig에 있습니다. 표 밖의 하드웨어 기능은 현재 port에서 지원하지 않습니다.

시스템 클록

KV58 SoC는 보드의 50 MHz external oscillator와 on-chip PLL로 237.5 MHz system clock을 생성하도록 구성됩니다.

직렬 포트

KV58 SoC에는 UART가 6개 있습니다. UART0을 console로 구성하고 나머지는 사용하지 않습니다.

Accelerometer와 magnetometer

기본 TWR-KV58F220M은 CONFIG_FXOS8700_TRIGGER_NONE=y로 FXOS8700 sensor 값을 polling하는 방식만 지원합니다.

FXOS8700 trigger, 즉 interrupt를 사용하려면 jumper J2와 J9에 shunt를 장착합니다. 또한 Kconfig에서 CONFIG_FXOS8700_TRIGGER_GLOBAL_THREAD=y 또는 CONFIG_FXOS8700_TRIGGER_OWN_THREAD=y를 활성화해야 합니다.

프로그래밍과 디버깅

일반 application과 같은 방식으로 build하고 flash합니다. 보드에 OpenSDA debug probe가 통합되어 있지만 현재는 compile된 firmware를 USB Mass Storage Device에 복사해 KV58 SoC를 flash하는 용도로만 쓸 수 있습니다.

pyOCD가 이 target을 지원하지 않으므로 OpenSDA probe로 debug할 수 없습니다. 문서 작성 시점의 OpenSDA J-Link firmware, release 2019-06-03도 KV58 flash algorithm이 동작하지 않아 사용할 수 없습니다.

Target을 debug하려면 JTAG header J13에 외부 J-Link debug probe를 연결합니다. J-Link host tool을 설치하고 검색 경로에 넣은 뒤 application을 build합니다.

# Zephyr 저장소 루트에서
west build -b twr_kv58f220m samples/hello_world

콘솔

OpenSDA probe를 debug에는 쓸 수 없지만 serial console용 USB-to-serial adapter로 사용합니다. PC의 USB cable을 J22에 연결합니다. Terminal은 115200 baud, data 8 bits, parity None, stop bit 1로 설정합니다.

플래시

# Zephyr 저장소 루트에서
west build -b twr_kv58f220m samples/hello_world
west flash

Serial terminal을 열고 SW1 button을 눌러 reset하면 다음 메시지가 표시됩니다.

***** Booting Zephyr OS v1.14.0-xxx-gxxxxxxxxxxxx *****
Hello World! twr_kv58f220m

디버깅

# Zephyr 저장소 루트에서
west build -b twr_kv58f220m samples/hello_world
west debug

Debugger에서 application을 단계 실행하면 terminal에 다음 메시지가 표시됩니다.

***** Booting Zephyr OS v1.14.0-xxx-gxxxxxxxxxxxx *****
Hello World! twr_kv58f220m

참고 자료

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.