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

Zephyr 3.7.0 · Boards · NXP · i.MX RT1040

NXP MIMXRT1040-EVK

600 MHz Cortex-M7, SDRAM·QSPI, display·Ethernet·CAN·audio와 M.2 Bluetooth를 갖춘 확장 온도 i.MX RT 평가 보드입니다.

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

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

Part 1

요약·해설

SEMC와 XIP-only FLEXSPI, display·M.2 BT HCI, binary blob, probe 설정과 LED·boot header·wireless module 충돌 복구를 설명합니다.

CPU

Cortex-M7 · 600 MHz · 512 KB TCM

Memory

256 Mbit SDRAM · 64 Mbit QSPI

Troubleshooting

J80 · QSPI header · M.2 rework

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 112E344E3C13716650788D9A8393B1A06DF6B34E7E3554E07FC6450B66CBE6C7
.. _mimxrt1040_evk:

NXP MIMXRT1040-EVK
##################

Overview
********

i.MX RT1040 crossover MCUs add additional flexibility with new packages and an
extended temperature range up to 125° C. The i.MX RT1040 MCU has a compact
9x9 mm package, as well as the 11x11 mm package that supports implementing a
2-layer PCB design. The i.MX RT1040 MCUs run on the Arm® Cortex®-M7 core at
600 MHz.

.. image:: ../../../../../../../boards/nxp/mimxrt1040_evk/doc/mimxrt1040_evk.jpg
   :align: center
   :alt: MIMXRT1040-EVK

Hardware
********

- MIMXRT1042XJM5B MCU (600 MHz, 512 KB TCM)

- Memory

  - 256 MBit SDRAM (Winbond W9825G6KH)
  - 64 Mbit QSPI Flash (Winbond W25Q64JVSSIQ)

- Display

  - LCD connector
  - Touch connector

- Ethernet

  - 10/100 Mbit/s Ethernet PHY

- USB

  - USB 2.0 OTG connector

- Audio

  - 3.5 mm audio stereo headphone jack
  - Board-mounted microphone

- Power

  - 5 V DC jack

- Debug

  - JTAG 20-pin connector
  - OpenSDA with DAPLink

- Expansion port

  - Arduino interface

- CAN bus connector

For more information about the MIMXRT1040 SoC and MIMXRT1040-EVK board, see
these references:

- `i.MX RT1040 Website`_
- `i.MX RT1040 Datasheet`_
- `i.MX RT1040 Reference Manual`_
- `MIMXRT1040-EVK Website`_
- `MIMXRT1040-EVK User Guide`_
- `MIMXRT1040-EVK Design Files`_

External Memory
===============

This platform has the following external memories:

+----------------+------------+-------------------------------------+
| Device         | Controller | Status                              |
+================+============+=====================================+
| W9825G6KH      | SEMC       | Enabled via device configuration    |
|                |            | data block, which sets up SEMC at   |
|                |            | boot time                           |
+----------------+------------+-------------------------------------+
| W25Q64JVSSIQ   | FLEXSPI    | Enabled via flash configurationn    |
|                |            | block, which sets up FLEXSPI at     |
|                |            | boot time. Supported for XIP only.  |
+----------------+------------+-------------------------------------+

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

The mimxrt1040_evk board configuration supports the hardware features listed
below.  For additional features not yet supported, please also refer to the
:ref:`mimxrt1064_evk` , which is the superset board in NXP's i.MX RT10xx family.
NXP prioritizes enabling the superset board with NXP's Full Platform Support for
Zephyr.  Therefore, the mimxrt1064_evk board may have additional features
already supported, which can also be re-used on this mimxrt1040_evk board:

+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component                    |
+===========+============+=====================================+
| NVIC      | on-chip    | nested vector interrupt controller  |
+-----------+------------+-------------------------------------+
| SYSTICK   | on-chip    | systick                             |
+-----------+------------+-------------------------------------+
| GPIO      | on-chip    | gpio                                |
+-----------+------------+-------------------------------------+
| UART      | on-chip    | serial port-polling;                |
|           |            | serial port-interrupt               |
+-----------+------------+-------------------------------------+
| PWM       | on-chip    | pwm                                 |
+-----------+------------+-------------------------------------+
| ADC       | on-chip    | adc                                 |
+-----------+------------+-------------------------------------+
| SPI       | on-chip    | spi                                 |
+-----------+------------+-------------------------------------+
| DMA       | on-chip    | dma                                 |
+-----------+------------+-------------------------------------+
| I2C       | on-chip    | i2c                                 |
+-----------+------------+-------------------------------------+
| DISPLAY   | on-chip    | eLCDIF. Tested with                 |
|           |            | :ref:`rk043fn02h_ct`, and           |
|           |            | :ref:`rk043fn66hs_ctg` shields      |
+-----------+------------+-------------------------------------+
| UART      | NXP NW61x  | M.2 WIFI/BT module                  |
+-----------+------------+-------------------------------------+

The default configuration can be found in
:zephyr_file:`boards/nxp/mimxrt1040_evk/mimxrt1040_evk_defconfig`

Other hardware features are not currently supported by the port.

Connections and IOs
===================

The MIMXRT1040 SoC has five pairs of pinmux/gpio controllers.

+---------------+-----------------+---------------------------+
| Name          | Function        | Usage                     |
+===============+=================+===========================+
| GPIO_AD_B0_12 | LPUART1_TX      | UART Console              |
+---------------+-----------------+---------------------------+
| GPIO_AD_B0_13 | LPUART1_RX      | UART Console              |
+---------------+-----------------+---------------------------+
| WAKEUP        | GPIO            | SW0                       |
+---------------+-----------------+---------------------------+
| GPIO_AD_B0_08 | GPIO            | User LD1                  |
+---------------+-----------------+---------------------------+
| GPIO_AD_B0_10 | FLEXPWM1 PWM3A  | PWM Output                |
+---------------+-----------------+---------------------------+
| GPIO_AD_B0_14 | ADC0 IN3        | ADC0 Input                |
+---------------+-----------------+---------------------------+
| GPIO_AD_B0_15 | ADC0 IN4        | ADC0 Input                |
+---------------+-----------------+---------------------------+
| GPIO_SD_B0_02 | LPSPI1_SDO      | SPI Output                |
+---------------+-----------------+---------------------------+
| GPIO_SD_B0_03 | LPSPI1_SDI      | SPI Input                 |
+---------------+-----------------+---------------------------+
| GPIO_SD_B0_00 | LPSPI1_SCK      | SPI Clock                 |
+---------------+-----------------+---------------------------+
| GPIO_SD_B0_00 | LPSPI1_SCK      | SPI Clock                 |
+---------------+-----------------+---------------------------+
| GPIO_AD_B1_00 | LPI2C1_SCL      | I2C Clock                 |
+---------------+-----------------+---------------------------+
| GPIO_AD_B1_01 | LPI2C1_SDA      | I2C Data                  |
+---------------+-----------------+---------------------------+
| GPIO_AD_B1_06 | LPUART3_TX      | M.2 BT HCI                |
+---------------+-----------------+---------------------------+
| GPIO_AD_B1_07 | LPUART3_RX      | M.2 BT HCI                |
+---------------+-----------------+---------------------------+
| GPIO_AD_B1_04 | LPUART3_CTS_b   | M.2 BT HCI                |
+---------------+-----------------+---------------------------+
| GPIO_AD_B1_05 | LPUART3_RTS_b   | M.2 BT HCI                |
+---------------+-----------------+---------------------------+

.. note::
        In order to use the SPI peripheral on this board, resistors R350, R346,
        and R360 must be populated with zero ohm resistors.

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

The MIMXRT1040 SoC is configured to use SysTick as the system clock source,
running at 600MHz.

When power management is enabled, the 32 KHz low frequency
oscillator on the board will be used as a source for the GPT timer to
generate a system clock. This clock enables lower power states, at the
cost of reduced resolution

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

The MIMXRT1040 SoC has eight UARTs. ``LPUART1`` is configured for the console,
``LPUART3`` for the Bluetooth Host Controller Interface (BT HCI),
and the remaining UARTs are not used.

Fetch Binary Blobs
==================

The board Bluetooth/WiFi module requires fetching some binary blob files, to do
that run the command:

.. code-block:: console

   west blobs fetch hal_nxp

.. note:: Only Bluetooth functionality is currently supported.

Programming and Debugging
*************************

This board supports 3 debug host tools. Please install your preferred host
tool, then follow the instructions in `Configuring a Debug Probe`_ to
configure the board appropriately.

* :ref:`jlink-debug-host-tools` (Default, Supported by NXP)
* :ref:`linkserver-debug-host-tools` (Supported by NXP)
* :ref:`pyocd-debug-host-tools` (Not supported by NXP)

Once the host tool and board are configured, build and flash applications
as usual (see :ref:`build_an_application` and :ref:`application_run` for more
details).

Configuring a Debug Probe
=========================

For the RT1040, J9/J10 are the SWD isolation jumpers, J12 is the DFU
mode jumper, and J2 is the 20 pin JTAG/SWD header.

.. include:: ../../../../../../../boards/nxp/common/rt1xxx-lpclink2-debug.rst
   :start-after: rt1xxx-lpclink2-probes

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

Regardless of your choice in debug probe, we will use the OpenSDA
microcontroller as a usb-to-serial adapter for the serial console. Check that
jumpers J11 and J13 are **on** (they are on by default when boards ship from
the factory) to connect UART signals to the OpenSDA microcontroller.

Connect a USB cable from your PC to J1.

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: mimxrt1040_evk
   :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 Booting Zephyr OS build v3.3.0-rc3-66 *****
   Hello World! mimxrt1040_evk

Debugging
=========

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

.. zephyr-app-commands::
   :zephyr-app: samples/hello_world
   :board: mimxrt1040_evk
   :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 Booting Zephyr OS build v3.3.0-rc3-66 *****
   Hello World! mimxrt1040_evk

Troubleshooting
===============

USER_LED D8
-----------
The MIMXRT1040-EVK board ships with the wireless module in the M.2 connector,
and with jumper J80 shorted.  This causes a conflict with the USER_LED D8,
and the LED will not turn off.  Samples and applications using USER_LED D8,
like blinky, require removal of J80 jumper.

Boot Header
-----------

If the debug probe fails to connect with the following error, it's possible
that the boot header in QSPI is invalid or corrupted. The boot header is
configured by :kconfig:option:`CONFIG_NXP_IMXRT_BOOT_HEADER`.

.. code-block:: console

   Remote debugging using :2331
   Remote communication error.  Target disconnected.: Connection reset by peer.
   "monitor" command not supported by this target.
   "monitor" command not supported by this target.
   You can't do that when your target is `exec'
   (gdb) Could not connect to target.
   Please check power, connection and settings.

You can fix it by erasing and reprogramming the QSPI with the following
steps:

#. Set the SW4 DIP switches to OFF-OFF-OFF-ON to boot into the ROM bootloader.

#. Reset by pressing SW1

#. Run ``west debug`` or ``west flash`` again with a known working Zephyr
   application.

#. Set the SW4 DIP switches to OFF-OFF-ON-OFF to boot from QSPI.

#. Reset by pressing SW1

Bluetooth Module
----------------

For Murate 2EL M.2 Mdoule, the following hardware rework needs to be applied,
Solder 0 ohm resistors for R96, and R93.
Remove resistors from R497, R498, R456 and R457.

And due to pin conflict issue, the PCM interface of Bluetooth module cannot be supported.

For the debugger fails to connect with the following error, please refer to section `WiFi Module`.

WiFi Module
-----------

If the debugger fails to connect with the following error, it's possible
the M.2 WiFi module is interfering with the debug signals

.. code-block:: console

   Remote debugging using :2331
   Remote communication error.  Target disconnected.: Connection reset by peer.
   "monitor" command not supported by this target.
   "monitor" command not supported by this target.
   You can't do that when your target is `exec'
   (gdb) Could not connect to target.
   Please check power, connection and settings.

To resolve this, you may remove the M.2 WiFi module from the board when
flashing or debugging it, or remove jumper J80.


.. _MIMXRT1040-EVK Website:
   https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-rt1040-evaluation-kit:MIMXRT1040-EVK

.. _MIMXRT1040-EVK User Guide:
   https://www.nxp.com/webapp/Download?colCode=MIMXRT1040-EVKUM

.. _MIMXRT1040-EVK Design Files:
   https://www.nxp.com/webapp/Download?colCode=MIMXRT1040-EVK-DESIGNFILES

.. _i.MX RT1040 Website:
   https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus/i-mx-rt1040-crossover-mcu-with-arm-cortex-m7-core:i.MX-RT1040

.. _i.MX RT1040 Datasheet:
   https://www.nxp.com/docs/en/data-sheet/IMXRT1040CEC.pdf

.. _i.MX RT1040 Reference Manual:
   https://www.nxp.com/webapp/Download?colCode=IMXRT1040RM

.. _NXP AN13206:
   https://www.nxp.com/docs/en/application-note/AN13206.pdf

Part 3

한국어 전문 번역

개요

i.MX RT1040 crossover MCU는 새 package와 최대 125° C의 확장 온도 범위로 설계 유연성을 높입니다. Compact 9×9 mm package와 2-layer PCB 설계를 구현할 수 있는 11×11 mm package를 제공하며 600 MHz Arm Cortex-M7 core에서 동작합니다.

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

하드웨어

  • MIMXRT1042XJM5B MCU: 600 MHz, 512 KB TCM
  • 메모리: 256 Mbit Winbond W9825G6KH SDRAM, 64 Mbit Winbond W25Q64JVSSIQ QSPI Flash
  • Display: LCD connector와 touch connector
  • 10/100 Mbit/s Ethernet PHY, USB 2.0 OTG connector
  • 3.5 mm stereo headphone jack와 board-mounted microphone
  • 5 V DC jack
  • JTAG 20-pin connector와 DAPLink OpenSDA
  • Arduino expansion interface와 CAN bus connector

외부 메모리

장치컨트롤러상태
W9825G6KHSEMC부팅 시 SEMC를 설정하는 device configuration data block으로 활성화
W25Q64JVSSIQFLEXSPI부팅 시 FLEXSPI를 설정하는 flash configuration block으로 활성화; XIP만 지원

지원 기능

mimxrt1040_evk 구성은 다음 기능을 지원합니다. 그 밖의 기능은 i.MX RT10xx 상위 집합 보드 mimxrt1064_evk에서 우선 활성화된 Zephyr Full Platform Support를 참고해 재사용할 수 있습니다.

인터페이스컨트롤러드라이버/컴포넌트
NVICon-chipnested vector interrupt controller
SYSTICKon-chipsystick
GPIOon-chipgpio
UARTon-chipserial port-polling; serial port-interrupt
PWMon-chippwm
ADCon-chipadc
SPIon-chipspi
DMAon-chipdma
I2Con-chipi2c
DISPLAYon-chipeLCDIF; rk043fn02h_ct와 rk043fn66hs_ctg shield에서 시험
UARTNXP NW61xM.2 WIFI/BT module

기본 구성은 boards/nxp/mimxrt1040_evk/mimxrt1040_evk_defconfig에 있으며 표 밖의 기능은 현재 port에서 지원하지 않습니다.

연결과 I/O

SoC에는 pinmux/GPIO controller 쌍이 5개 있습니다. 원문 핀 표에 GPIO_SD_B0_00 / LPSPI1_SCK 행이 두 번 기재되어 있어 여기서도 그대로 보존합니다.

이름기능용도
GPIO_AD_B0_12LPUART1_TXUART Console
GPIO_AD_B0_13LPUART1_RXUART Console
WAKEUPGPIOSW0
GPIO_AD_B0_08GPIOUser LD1
GPIO_AD_B0_10FLEXPWM1 PWM3APWM Output
GPIO_AD_B0_14ADC0 IN3ADC0 Input
GPIO_AD_B0_15ADC0 IN4ADC0 Input
GPIO_SD_B0_02LPSPI1_SDOSPI Output
GPIO_SD_B0_03LPSPI1_SDISPI Input
GPIO_SD_B0_00LPSPI1_SCKSPI Clock
GPIO_SD_B0_00LPSPI1_SCKSPI Clock
GPIO_AD_B1_00LPI2C1_SCLI2C Clock
GPIO_AD_B1_01LPI2C1_SDAI2C Data
GPIO_AD_B1_06LPUART3_TXM.2 BT HCI
GPIO_AD_B1_07LPUART3_RXM.2 BT HCI
GPIO_AD_B1_04LPUART3_CTS_bM.2 BT HCI
GPIO_AD_B1_05LPUART3_RTS_bM.2 BT HCI

SPI 사용 조건: 이 보드에서 SPI peripheral을 사용하려면 R350, R346, R360에 0 Ω resistor를 실장해야 합니다.

시스템 클록과 직렬 포트

SysTick은 600 MHz 시스템 클록 소스로 동작합니다. 전원 관리 시 32 KHz oscillator를 GPT timer source로 사용해 해상도를 낮추는 대신 저전력 상태를 지원합니다. UART 8개 중 LPUART1은 console, LPUART3은 Bluetooth Host Controller Interface(BT HCI)로 구성하며 나머지는 사용하지 않습니다.

Binary blob 가져오기

Bluetooth/Wi-Fi module에 필요한 binary blob은 다음 명령으로 가져옵니다.

west blobs fetch hal_nxp

현재 지원되는 것은 Bluetooth 기능뿐입니다.

프로그래밍과 디버깅

Debug host tool은 기본·NXP 지원 J-Link, NXP 지원 LinkServer, NXP 미지원 pyOCD의 3종입니다.

디버그 프로브

J9/J10은 SWD isolation jumper, J12는 DFU jumper, J2는 20-pin JTAG/SWD header입니다. LPC-Link2 DAPLink와 CMSIS-DAP/J-Link 공통 절차는 NXP RT1xxx LPC-Link2 Debug Probe 설정에 보존되어 있습니다. 온보드 CMSIS-DAP/J-Link에서는 isolation jumper를 장착하고, 외부 J-Link에서는 제거해 J2에 연결합니다. 온보드 J-Link firmware는 debug USB로 EVK에 전원을 공급하지 않으므로 별도 전원을 사용합니다.

콘솔

OpenSDA를 USB-to-serial adapter로 사용하므로 J11/J13이 장착되어 있는지 확인하고 PC를 J1에 연결합니다. Terminal 설정은 115200 baud, 8 bits, parity None, stop bit 1입니다.

플래시

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

SW1으로 reset하면 다음 원문 예제 출력이 표시됩니다.

***** Booting Zephyr OS Booting Zephyr OS build v3.3.0-rc3-66 *****
Hello World! mimxrt1040_evk

디버깅

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

단계 실행 중 terminal 출력은 다음과 같습니다.

***** Booting Zephyr OS Booting Zephyr OS build v3.3.0-rc3-66 *****
Hello World! mimxrt1040_evk

문제 해결

USER_LED D8

보드는 M.2 wireless module이 장착되고 J80이 short된 상태로 출하됩니다. 이 구성이 USER_LED D8과 충돌해 LED가 꺼지지 않습니다. blinky처럼 D8을 쓰는 sample/application에서는 J80 jumper를 제거하십시오.

Boot Header

QSPI의 boot header가 잘못되거나 손상되고 CONFIG_NXP_IMXRT_BOOT_HEADER 구성이 맞지 않으면 probe 연결 시 다음 오류가 날 수 있습니다.

Remote debugging using :2331
Remote communication error.  Target disconnected.: Connection reset by peer.
"monitor" command not supported by this target.
"monitor" command not supported by this target.
You can't do that when your target is `exec'
(gdb) Could not connect to target.
Please check power, connection and settings.
  1. SW4 DIP switch를 OFF-OFF-OFF-ON으로 설정해 ROM bootloader로 부팅합니다.
  2. SW1을 눌러 reset합니다.
  3. 정상 동작이 확인된 Zephyr application으로 west debug 또는 west flash를 다시 실행해 QSPI를 지우고 program합니다.
  4. SW4를 OFF-OFF-ON-OFF로 설정해 QSPI boot를 선택합니다.
  5. SW1을 눌러 다시 reset합니다.

Bluetooth Module

Murata 2EL M.2 module은 hardware rework가 필요합니다. R96과 R93에 0 Ω resistor를 납땜하고 R497, R498, R456, R457 resistor를 제거합니다. Pin conflict 때문에 Bluetooth module의 PCM interface는 지원할 수 없습니다. Debugger 연결 오류는 아래 Wi-Fi module 항목도 확인하십시오.

Wi-Fi Module

M.2 Wi-Fi module이 debug 신호를 방해하면 다음 오류가 발생할 수 있습니다.

Remote debugging using :2331
Remote communication error.  Target disconnected.: Connection reset by peer.
"monitor" command not supported by this target.
"monitor" command not supported by this target.
You can't do that when your target is `exec'
(gdb) Could not connect to target.
Please check power, connection and settings.

Flash/debug할 때 M.2 Wi-Fi module을 보드에서 제거하거나 J80 jumper를 제거하십시오.

참고 자료

Source

출처

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