1.. zephyr:board:: mimxrt1064_evk 2 3Overview 4******** 5 6The i.MX RT1064 adds to the industry's first crossover 7processor series and expands the i.MX RT series to three scalable families. 8The i.MX RT1064 doubles the On-Chip SRAM to 1MB while keeping pin-to-pin 9compatibility with i.MX RT1050. This series introduces additional features 10ideal for real-time applications such as High-Speed GPIO, CAN FD, and 11synchronous parallel NAND/NOR/PSRAM controller. The i.MX RT1064 runs on the 12Arm® Cortex-M7® core up to 600 MHz. 13 14Hardware 15******** 16 17- MIMXRT1064DVL6A MCU (600 MHz, 1024 KB on-chip memory, 4096KB on-chip QSPI 18 flash) 19 20- Memory 21 22 - 256 Mbit SDRAM 23 - 64 Mbit QSPI Flash 24 - 512 Mbit Hyper Flash 25 - TF socket for SD card 26 27- Display 28 29 - LCD connector 30 31- Ethernet 32 33 - 10/100 Mbit/s Ethernet PHY 34 35- USB 36 37 - USB 2.0 OTG connector 38 - USB 2.0 host connector 39 40- Audio 41 42 - 3.5 mm audio stereo headphone jack 43 - Board-mounted microphone 44 - Left and right speaker out connectors 45 46- Power 47 48 - 5 V DC jack 49 50- Debug 51 52 - JTAG 20-pin connector 53 - OpenSDA with DAPLink 54 55- Sensor 56 57 - FXOS8700CQ 6-axis e-compass 58 - CMOS camera sensor interface 59 60- Expansion port 61 62 - Arduino interface 63 64- CAN bus connector 65 66For more information about the MIMXRT1064 SoC and MIMXRT1064-EVK board, see 67these references: 68 69- `i.MX RT1064 Website`_ 70- `i.MX RT1064 Datasheet`_ 71- `i.MX RT1064 Reference Manual`_ 72- `MIMXRT1064-EVK Website`_ 73- `MIMXRT1064-EVK Quick Reference Guide`_ 74- `MIMXRT1064-EVK User Guide`_ 75- `MIMXRT1064-EVK Schematics`_ 76- `MIMXRT1064-EVK Debug Firmware`_ 77 78External Memory 79=============== 80 81This platform has the following external memories: 82 83+--------------------+------------+-------------------------------------+ 84| Device | Controller | Status | 85+====================+============+=====================================+ 86| MT48LC16M16A2 | SEMC | Enabled via device configuration | 87| | | data block, which sets up SEMC at | 88| | | boot time | 89+--------------------+------------+-------------------------------------+ 90 91Supported Features 92================== 93 94NXP considers the MIMXRT1064-EVK as the superset board for the i.MX RT10xx 95family of MCUs. This board is a focus for NXP's Full Platform Support for 96Zephyr, to better enable the entire RT10xx family. NXP prioritizes enabling 97this board with new support for Zephyr features. The mimxrt1064_evk board 98configuration supports the following hardware features: 99 100+-----------+------------+-------------------------------------+ 101| Interface | Controller | Driver/Component | 102+===========+============+=====================================+ 103| NVIC | on-chip | nested vector interrupt controller | 104+-----------+------------+-------------------------------------+ 105| SYSTICK | on-chip | systick | 106+-----------+------------+-------------------------------------+ 107| DISPLAY | on-chip | eLCDIF. Tested with | 108| | | :ref:`rk043fn02h_ct`, and | 109| | | :ref:`rk043fn66hs_ctg` shields | 110+-----------+------------+-------------------------------------+ 111| VIDEO | on-chip | video, using CSI | 112+-----------+------------+-------------------------------------+ 113| FLASH | on-chip | QSPI flash | 114+-----------+------------+-------------------------------------+ 115| GPIO | on-chip | gpio | 116+-----------+------------+-------------------------------------+ 117| I2C | on-chip | i2c | 118+-----------+------------+-------------------------------------+ 119| WATCHDOG | on-chip | watchdog | 120+-----------+------------+-------------------------------------+ 121| PWM | on-chip | pwm | 122+-----------+------------+-------------------------------------+ 123| SDHC | on-chip | disk access | 124+-----------+------------+-------------------------------------+ 125| UART | on-chip | serial port-polling; | 126| | | serial port-interrupt | 127+-----------+------------+-------------------------------------+ 128| ADC | on-chip | adc | 129+-----------+------------+-------------------------------------+ 130| ENET | on-chip | ethernet | 131+-----------+------------+-------------------------------------+ 132| USB | on-chip | USB device | 133+-----------+------------+-------------------------------------+ 134| CAN | on-chip | can | 135+-----------+------------+-------------------------------------+ 136| SPI | on-chip | spi | 137+-----------+------------+-------------------------------------+ 138| GPT | on-chip | gpt | 139+-----------+------------+-------------------------------------+ 140| DMA | on-chip | dma | 141+-----------+------------+-------------------------------------+ 142| HWINFO | on-chip | Unique device serial number | 143+-----------+------------+-------------------------------------+ 144| TRNG | on-chip | entropy | 145+-----------+------------+-------------------------------------+ 146| FLEXSPI | on-chip | flash programming | 147+-----------+------------+-------------------------------------+ 148 149The default configuration can be found in 150:zephyr_file:`boards/nxp/mimxrt1064_evk/mimxrt1064_evk_defconfig` 151 152Other hardware features are not currently supported by the port. 153 154Connections and I/Os 155==================== 156 157The MIMXRT1064 SoC has four pairs of pinmux/gpio controllers. 158 159+---------------+-----------------+---------------------------+ 160| Name | Function | Usage | 161+===============+=================+===========================+ 162| GPIO_AD_B0_00 | LPSPI1_SCK | SPI | 163+---------------+-----------------+---------------------------+ 164| GPIO_AD_B0_01 | LPSPI1_SDO | SPI | 165+---------------+-----------------+---------------------------+ 166| GPIO_AD_B0_02 | LPSPI3_SDI/LCD_RST| SPI/LCD Display | 167+---------------+-----------------+---------------------------+ 168| GPIO_AD_B0_03 | LPSPI3_PCS0 | SPI | 169+---------------+-----------------+---------------------------+ 170| GPIO_AD_B0_05 | GPIO | SD Card | 171+---------------+-----------------+---------------------------+ 172| GPIO_AD_B0_09 | GPIO/ENET_RST | LED/Ethernet | 173+---------------+-----------------+---------------------------+ 174| GPIO_AD_B0_10 | GPIO/ENET_INT | GPIO/Ethernet | 175+---------------+-----------------+---------------------------+ 176| GPIO_AD_B0_11 | GPIO | Touch Interrupt | 177+---------------+-----------------+---------------------------+ 178| GPIO_AD_B0_12 | LPUART1_TX | UART Console | 179+---------------+-----------------+---------------------------+ 180| GPIO_AD_B0_13 | LPUART1_RX | UART Console | 181+---------------+-----------------+---------------------------+ 182| GPIO_AD_B1_06 | LPUART3_TX | UART Arduino | 183+---------------+-----------------+---------------------------+ 184| GPIO_AD_B1_07 | LPUART3_RX | UART Arduino | 185+---------------+-----------------+---------------------------+ 186| WAKEUP | GPIO | SW0 | 187+---------------+-----------------+---------------------------+ 188| GPIO_B0_00 | LCD_CLK | LCD Display | 189+---------------+-----------------+---------------------------+ 190| GPIO_B0_01 | LCD_ENABLE | LCD Display | 191+---------------+-----------------+---------------------------+ 192| GPIO_B0_02 | LCD_HSYNC | LCD Display | 193+---------------+-----------------+---------------------------+ 194| GPIO_B0_03 | LCD_VSYNC | LCD Display | 195+---------------+-----------------+---------------------------+ 196| GPIO_B0_04 | LCD_DATA00 | LCD Display | 197+---------------+-----------------+---------------------------+ 198| GPIO_B0_05 | LCD_DATA01 | LCD Display | 199+---------------+-----------------+---------------------------+ 200| GPIO_B0_06 | LCD_DATA02 | LCD Display | 201+---------------+-----------------+---------------------------+ 202| GPIO_B0_07 | LCD_DATA03 | LCD Display | 203+---------------+-----------------+---------------------------+ 204| GPIO_B0_08 | LCD_DATA04 | LCD Display | 205+---------------+-----------------+---------------------------+ 206| GPIO_B0_09 | LCD_DATA05 | LCD Display | 207+---------------+-----------------+---------------------------+ 208| GPIO_B0_10 | LCD_DATA06 | LCD Display | 209+---------------+-----------------+---------------------------+ 210| GPIO_B0_11 | LCD_DATA07 | LCD Display | 211+---------------+-----------------+---------------------------+ 212| GPIO_B0_12 | LCD_DATA08 | LCD Display | 213+---------------+-----------------+---------------------------+ 214| GPIO_B0_13 | LCD_DATA09 | LCD Display | 215+---------------+-----------------+---------------------------+ 216| GPIO_B0_14 | LCD_DATA10 | LCD Display | 217+---------------+-----------------+---------------------------+ 218| GPIO_B0_15 | LCD_DATA11 | LCD Display | 219+---------------+-----------------+---------------------------+ 220| GPIO_B1_00 | LCD_DATA12 | LCD Display | 221+---------------+-----------------+---------------------------+ 222| GPIO_B1_01 | LCD_DATA13 | LCD Display | 223+---------------+-----------------+---------------------------+ 224| GPIO_B1_02 | LCD_DATA14 | LCD Display | 225+---------------+-----------------+---------------------------+ 226| GPIO_B1_03 | LCD_DATA15 | LCD Display | 227+---------------+-----------------+---------------------------+ 228| GPIO_B1_04 | ENET_RX_DATA00 | Ethernet | 229+---------------+-----------------+---------------------------+ 230| GPIO_B1_05 | ENET_RX_DATA01 | Ethernet | 231+---------------+-----------------+---------------------------+ 232| GPIO_B1_06 | ENET_RX_EN | Ethernet | 233+---------------+-----------------+---------------------------+ 234| GPIO_B1_07 | ENET_TX_DATA00 | Ethernet | 235+---------------+-----------------+---------------------------+ 236| GPIO_B1_08 | ENET_TX_DATA01 | Ethernet | 237+---------------+-----------------+---------------------------+ 238| GPIO_B1_09 | ENET_TX_EN | Ethernet | 239+---------------+-----------------+---------------------------+ 240| GPIO_B1_10 | ENET_REF_CLK | Ethernet | 241+---------------+-----------------+---------------------------+ 242| GPIO_B1_11 | ENET_RX_ER | Ethernet | 243+---------------+-----------------+---------------------------+ 244| GPIO_B1_12 | GPIO | SD Card | 245+---------------+-----------------+---------------------------+ 246| GPIO_B1_14 | USDHC1_VSELECT | SD Card | 247+---------------+-----------------+---------------------------+ 248| GPIO_B1_15 | BACKLIGHT_CTL | LCD Display | 249+---------------+-----------------+---------------------------+ 250| GPIO_EMC_40 | ENET_MDC | Ethernet | 251+---------------+-----------------+---------------------------+ 252| GPIO_EMC_41 | ENET_MDIO | Ethernet | 253+---------------+-----------------+---------------------------+ 254| GPIO_AD_B0_09 | ENET_RST | Ethernet | 255+---------------+-----------------+---------------------------+ 256| GPIO_AD_B0_10 | ENET_INT | Ethernet | 257+---------------+-----------------+---------------------------+ 258| GPIO_SD_B0_00 | USDHC1_CMD/LPSPI1_SCK | SD Card/SPI | 259+---------------+-----------------+---------------------------+ 260| GPIO_SD_B0_01 | USDHC1_CLK/LPSPI1_PCS0 | SD Card/SPI | 261+---------------+-----------------+---------------------------+ 262| GPIO_SD_B0_02 | USDHC1_DATA0/LPSPI1_SDO | SD Card/SPI | 263+---------------+-----------------+---------------------------+ 264| GPIO_SD_B0_03 | USDHC1_DATA1/LPSPI1_SDI | SD Card/SPI | 265+---------------+-----------------+---------------------------+ 266| GPIO_SD_B0_04 | USDHC1_DATA2 | SD Card | 267+---------------+-----------------+---------------------------+ 268| GPIO_SD_B0_05 | USDHC1_DATA3 | SD Card | 269+---------------+-----------------+---------------------------+ 270| GPIO_SD_B1_05 | FLEXSPIA_DQS | QSPI Flash | 271+---------------+-----------------+---------------------------+ 272| GPIO_SD_B1_06 | FLEXSPIA_SS0_B | QSPI Flash | 273+---------------+-----------------+---------------------------+ 274| GPIO_SD_B1_07 | FLEXSPIA_SCLK | QSPI Flash | 275+---------------+-----------------+---------------------------+ 276| GPIO_SD_B1_08 | FLEXSPIA_DATA00 | QSPI Flash | 277+---------------+-----------------+---------------------------+ 278| GPIO_SD_B1_09 | FLEXSPIA_DATA01 | QSPI Flash | 279+---------------+-----------------+---------------------------+ 280| GPIO_SD_B1_10 | FLEXSPIA_DATA02 | QSPI Flash | 281+---------------+-----------------+---------------------------+ 282| GPIO_SD_B1_11 | FLEXSPIA_DATA03 | QSPI Flash | 283+---------------+-----------------+---------------------------+ 284| GPIO_AD_B1_11 | ADC | ADC1 Channel 0 | 285+---------------+-----------------+---------------------------+ 286| GPIO_AD_B1_10 | ADC | ADC1 Channel 1 | 287+---------------+-----------------+---------------------------+ 288 289.. note:: 290 In order to use the SPI peripheral on this board, resistors R278, R279, 291 R280 and R281 must be populated with zero ohm resistors 292 293System Clock 294============ 295 296The MIMXRT1064 SoC is configured to use SysTick as the system clock source, 297running at 600MHz. 298 299When power management is enabled, the 32 KHz low frequency 300oscillator on the board will be used as a source for the GPT timer to 301generate a system clock. This clock enables lower power states, at the 302cost of reduced resolution 303 304Serial Port 305=========== 306 307The MIMXRT1064 SoC has eight UARTs. ``LPUART1`` is configured for the console 308and the remaining are not used. 309 310Programming and Debugging 311************************* 312 313This board supports 3 debug host tools. Please install your preferred host 314tool, then follow the instructions in `Configuring a Debug Probe`_ to 315configure the board appropriately. 316 317* :ref:`jlink-debug-host-tools` (Default, Supported by NXP) 318* :ref:`linkserver-debug-host-tools` (Supported by NXP) 319* :ref:`pyocd-debug-host-tools` (Not supported by NXP) 320 321Once the host tool and board are configured, build and flash applications 322as usual (see :ref:`build_an_application` and :ref:`application_run` for more 323details). 324 325Configuring a Debug Probe 326========================= 327 328.. note:: 329 When the device transitions into low power states, the debugger may be 330 unable to access the chip. Use caution when enabling ``CONFIG_PM``, and 331 if the debugger cannot flash the part, see :ref:`Troubleshooting RT1064` 332 333For the RT1064, J47/J48 are the SWD isolation jumpers, J42 is the DFU 334mode jumper, and J21 is the 20 pin JTAG/SWD header. 335 336.. include:: ../../common/rt1xxx-lpclink2-debug.rst 337 :start-after: rt1xxx-lpclink2-probes 338 339See `Using J-Link with MIMXRT1060-EVK or MIMXRT1064-EVK`_ for more 340details. 341 342Configuring a Console 343===================== 344 345Regardless of your choice in debug probe, we will use the OpenSDA 346microcontroller as a usb-to-serial adapter for the serial console. Check that 347jumpers J45 and J46 are **on** (they are on by default when boards ship from 348the factory) to connect UART signals to the OpenSDA microcontroller. 349 350Connect a USB cable from your PC to J41. 351 352Use the following settings with your serial terminal of choice (minicom, putty, 353etc.): 354 355- Speed: 115200 356- Data: 8 bits 357- Parity: None 358- Stop bits: 1 359 360Using SWO 361--------- 362SWO can be used as a logging backend, by setting ``CONFIG_LOG_BACKEND_SWO=y``. 363Your SWO viewer should be configured with a CPU frequency of 132MHz, and 364SWO frequency of 7500KHz. 365 366Flashing 367======== 368 369Here is an example for the :zephyr:code-sample:`hello_world` application. 370 371.. zephyr-app-commands:: 372 :zephyr-app: samples/hello_world 373 :board: mimxrt1064_evk 374 :goals: flash 375 376Open a serial terminal, reset the board (press the SW9 button), and you should 377see the following message in the terminal: 378 379.. code-block:: console 380 381 ***** Booting Zephyr OS v1.14.0-rc1 ***** 382 Hello World! mimxrt1064_evk 383 384Debugging 385========= 386 387Here is an example for the :zephyr:code-sample:`hello_world` application. 388 389.. zephyr-app-commands:: 390 :zephyr-app: samples/hello_world 391 :board: mimxrt1064_evk 392 :goals: debug 393 394Open a serial terminal, step through the application in your debugger, and you 395should see the following message in the terminal: 396 397.. code-block:: console 398 399 ***** Booting Zephyr OS v1.14.0-rc1 ***** 400 Hello World! mimxrt1064_evk 401 402 403.. _Troubleshooting RT1064: 404 405Troubleshooting 406=============== 407 408If the debug probe fails to connect with the following error, it's possible 409that the boot header in QSPI flash is invalid or corrupted. The boot header is 410configured by :kconfig:option:`CONFIG_NXP_IMXRT_BOOT_HEADER`. 411 412.. code-block:: console 413 414 Remote debugging using :2331 415 Remote communication error. Target disconnected.: Connection reset by peer. 416 "monitor" command not supported by this target. 417 "monitor" command not supported by this target. 418 You can't do that when your target is `exec' 419 (gdb) Could not connect to target. 420 Please check power, connection and settings. 421 422You can fix it by erasing and reprogramming the QSPI flash with the following 423steps: 424 425#. Set the SW7 DIP switches to ON-OFF-ON-OFF to prevent booting from QSPI flash. 426 427#. Reset by pressing SW9 428 429#. Run ``west debug`` or ``west flash`` again with a known working Zephyr 430 application. 431 432#. Set the SW7 DIP switches to OFF-OFF-ON-OFF to boot from QSPI flash. 433 434#. Reset by pressing SW9 435 436If the west flash or debug commands fail, and the command hangs while executing 437runners.jlink, confirm the J-Link debug probe is configured, powered, and 438connected to the EVK properly. 439 440.. _MIMXRT1064-EVK Website: 441 https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/mimxrt1064-evk-i.mx-rt1064-evaluation-kit:MIMXRT1064-EVK 442 443.. _MIMXRT1064-EVK Quick Reference Guide: 444 https://www.nxp.com/webapp/Download?colCode=IMXRT1064QSG 445 446.. _MIMXRT1064-EVK User Guide: 447 https://www.nxp.com/docs/en/data-sheet/MIMXRT10601064EKBHUG.pdf 448 449.. _MIMXRT1064-EVK Debug Firmware: 450 https://www.nxp.com/docs/en/application-note/AN13206.pdf 451 452.. _MIMXRT1064-EVK Schematics: 453 https://www.nxp.com/webapp/Download?colCode=i.MXRT160EVKDS&Parent_nodeId=1537930933174731284155&Parent_pageType=product 454 455.. _i.MX RT1064 Website: 456 https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/i.mx-applications-processors/i.mx-rt-series/i.mx-rt1064-crossover-processor-with-arm-cortex-m7-core:i.MX-RT1064 457 458.. _i.MX RT1064 Datasheet: 459 https://www.nxp.com/docs/en/data-sheet/IMXRT1064CEC.pdf 460 461.. _i.MX RT1064 Reference Manual: 462 https://www.nxp.com/webapp/Download?colCode=IMXRT1064RM 463 464.. _Using J-Link with MIMXRT1060-EVK or MIMXRT1064-EVK: 465 https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Using-J-Link-with-MIMXRT1060-EVK-or-MIMXRT1064-EVK/ta-p/1281149 466