1.. _mimxrt1160_evk: 2 3NXP MIMXRT1160-EVK 4################## 5 6Overview 7******** 8 9The dual core i.MX RT1160 runs on the Cortex-M7 core at 600 MHz and on the 10Cortex-M4 at 240 MHz. The i.MX RT1160 MCU offers support over a wide 11temperature range and is qualified for consumer, industrial and automotive 12markets. 13 14.. image:: mimxrt1160_evk.jpg 15 :align: center 16 :alt: MIMXRT1160-EVK 17 18Hardware 19******** 20 21- MIMXRT1166DVM6A MCU 22 23 - 600MHz Cortex-M7 & 240Mhz Cortex-M4 24 - 2MB SRAM with 512KB of TCM for Cortex-M7 and 256KB of TCM for Cortex-M4 25 26- Memory 27 28 - 512 Mbit SDRAM 29 - 128 Mbit QSPI Flash 30 - 512 Mbit Octal Flash 31 - TF socket for SD card 32 33- Display 34 35 - MIPI LCD connector 36 37- Ethernet 38 39 - 10/100 Mbit/s Ethernet PHY 40 - 10/100/1000 Mbit/s Ethernet PHY 41 42- USB 43 44 - USB 2.0 OTG connector 45 - USB 2.0 host connector 46 47- Audio 48 49 - 3.5 mm audio stereo headphone jack 50 - Board-mounted microphone 51 - Left and right speaker out connectors 52 53- Power 54 55 - 5 V DC jack 56 57- Debug 58 59 - JTAG 20-pin connector 60 - OpenSDA with DAPLink 61 62- Sensor 63 64 - MIPI camera sensor connector 65 66- Expansion port 67 68 - Arduino interface 69 70- CAN bus connector 71 72For more information about the MIMXRT1160 SoC and MIMXRT1160-EVK board, see 73these references: 74 75- `i.MX RT1160 Website`_ 76- `i.MX RT1160 Datasheet`_ 77- `i.MX RT1160 Reference Manual`_ 78- `MIMXRT1160-EVK Website`_ 79- `MIMXRT1160-EVK Board Hardware User's Guide`_ 80 81External Memory 82=============== 83 84This platform has the following external memories: 85 86+--------------------+------------+-------------------------------------+ 87| Device | Controller | Status | 88+====================+============+=====================================+ 89| W9825G6KH | SEMC | Enabled via device configuration | 90| | | data block, which sets up SEMC at | 91| | | boot time | 92+--------------------+------------+-------------------------------------+ 93| IS25WP128 | FLEXSPI | Enabled via flash configurationn | 94| | | block, which sets up FLEXSPI at | 95| | | boot time. | 96+--------------------+------------+-------------------------------------+ 97 98Supported Features 99================== 100 101The mimxrt1160_evk board configuration supports the hardware features listed 102below. For additional features not yet supported, please also refer to the 103:ref:`mimxrt1170_evk` , which is the superset board in NXP's i.MX RT11xx family. 104NXP prioritizes enabling the superset board with NXP's Full Platform Support for 105Zephyr. Therefore, the mimxrt1170_evk board may have additional features 106already supported, which can also be re-used on this mimxrt1160_evk board: 107 108+-----------+------------+-------------------------------------+ 109| Interface | Controller | Driver/Component | 110+===========+============+=====================================+ 111| NVIC | on-chip | nested vector interrupt controller | 112+-----------+------------+-------------------------------------+ 113| SYSTICK | on-chip | systick | 114+-----------+------------+-------------------------------------+ 115| GPIO | on-chip | gpio | 116+-----------+------------+-------------------------------------+ 117| COUNTER | on-chip | counter | 118+-----------+------------+-------------------------------------+ 119| UART | on-chip | serial port-polling; | 120| | | serial port-interrupt | 121+-----------+------------+-------------------------------------+ 122| SPI | on-chip | spi | 123+-----------+------------+-------------------------------------+ 124| I2C | on-chip | i2c | 125+-----------+------------+-------------------------------------+ 126| ADC | on-chip | adc | 127+-----------+------------+-------------------------------------+ 128| CAN | on-chip | flexcan | 129+-----------+------------+-------------------------------------+ 130| WATCHDOG | on-chip | watchdog | 131+-----------+------------+-------------------------------------+ 132| PWM | on-chip | pwm | 133+-----------+------------+-------------------------------------+ 134| DMA | on-chip | dma | 135+-----------+------------+-------------------------------------+ 136| GPT | on-chip | gpt | 137+-----------+------------+-------------------------------------+ 138| USB | on-chip | USB Device | 139+-----------+------------+-------------------------------------+ 140| HWINFO | on-chip | Unique device serial number | 141+-----------+------------+-------------------------------------+ 142| CAAM RNG | on-chip | entropy | 143+-----------+------------+-------------------------------------+ 144| FLEXSPI | on-chip | flash programming | 145+-----------+------------+-------------------------------------+ 146| PIT | on-chip | pit | 147+-----------+------------+-------------------------------------+ 148| DISPLAY | on-chip | eLCDIF; MIPI-DSI. Tested with | 149| | | :ref:`rk055hdmipi4m`, | 150| | | :ref:`rk055hdmipi4ma0`, | 151| | | and :ref:`g1120b0mipi` shields | 152+-----------+------------+-------------------------------------+ 153 154The default configuration can be found in the defconfig file: 155:zephyr_file:`boards/nxp/mimxrt1160_evk/mimxrt1160_evk_mimxrt1166_cm7_defconfig` 156 157Other hardware features are not currently supported by the port. 158 159 160Connections and I/Os 161==================== 162 163The MIMXRT1160 SoC has six pairs of pinmux/gpio controllers. 164 165+---------------+-----------------+---------------------------+ 166| Name | Function | Usage | 167+===============+=================+===========================+ 168| WAKEUP | GPIO | SW7 | 169+---------------+-----------------+---------------------------+ 170| GPIO_AD_04 | GPIO | LED | 171+---------------+-----------------+---------------------------+ 172| GPIO_AD_24 | LPUART1_TX | UART Console | 173+---------------+-----------------+---------------------------+ 174| GPIO_AD_25 | LPUART1_RX | UART Console | 175+---------------+-----------------+---------------------------+ 176| GPIO_LPSR_00 | CAN3_TX | flexcan | 177+---------------+-----------------+---------------------------+ 178| GPIO_LPSR_01 | CAN3_RX | flexcan | 179+---------------+-----------------+---------------------------+ 180| GPIO_AD_29 | SPI1_CS0 | spi | 181+---------------+-----------------+---------------------------+ 182| GPIO_AD_28 | SPI1_CLK | spi | 183+---------------+-----------------+---------------------------+ 184| GPIO_AD_30 | SPI1_SDO | spi | 185+---------------+-----------------+---------------------------+ 186| GPIO_AD_31 | SPI1_SDI | spi | 187+---------------+-----------------+---------------------------+ 188| GPIO_AD_08 | LPI2C1_SCL | i2c | 189+---------------+-----------------+---------------------------+ 190| GPIO_AD_09 | LPI2C1_SDA | i2c | 191+---------------+-----------------+---------------------------+ 192| GPIO_LPSR_05 | LPI2C5_SCL | i2c | 193+---------------+-----------------+---------------------------+ 194| GPIO_LPSR_04 | LPI2C5_SDA | i2c | 195+---------------+-----------------+---------------------------+ 196| GPIO_AD_04 | FLEXPWM1_PWM2 | pwm | 197+---------------+-----------------+---------------------------+ 198 199 200Dual Core samples 201***************** 202 203+-----------+------------------+----------------------------+ 204| Core | Boot Address | Comment | 205+===========+==================+============================+ 206| Cortex M7 | 0x30000000[630K] | primary core | 207+-----------+------------------+----------------------------+ 208| Cortex M4 | 0x20020000[96k] | boots from OCRAM | 209+-----------+------------------+----------------------------+ 210 211+----------+------------------+-----------------------+ 212| Memory | Address[Size] | Comment | 213+==========+==================+=======================+ 214| flexspi1 | 0x30000000[16M] | Cortex M7 flash | 215+----------+------------------+-----------------------+ 216| sdram0 | 0x80030000[64M] | Cortex M7 ram | 217+----------+------------------+-----------------------+ 218| ocram | 0x20020000[512K] | Cortex M4 "flash" | 219+----------+------------------+-----------------------+ 220| sram1 | 0x20000000[128K] | Cortex M4 ram | 221+----------+------------------+-----------------------+ 222| ocram2 | 0x200C0000[512K] | Mailbox/shared memory | 223+----------+------------------+-----------------------+ 224 225Only the first 16K of ocram2 has the correct MPU region attributes set to be 226used as shared memory 227 228System Clock 229============ 230 231The MIMXRT1160 SoC is configured to use SysTick as the system clock source, 232running at 600MHz. When targeting the M4 core, SysTick will also be used, 233running at 240MHz 234 235When power management is enabled, the 32 KHz low frequency 236oscillator on the board will be used as a source for the GPT timer to 237generate a system clock. This clock enables lower power states, at the 238cost of reduced resolution 239 240Serial Port 241=========== 242 243The MIMXRT1160 SoC has 12 UARTs. One is configured for the console and the 244remaining are not used. 245 246Programming and Debugging 247************************* 248 249Build and flash applications as usual (see :ref:`build_an_application` and 250:ref:`application_run` for more details). 251 252Building a Dual-Core Image 253========================== 254Dual core samples load the M4 core image from flash into the shared ``ocram`` 255region. The M7 core then sets the M4 boot address to this region. The only 256sample currently enabled for dual core builds is the ``openamp`` sample. 257To flash a dual core sample, the M4 image must be flashed first, so that it is 258written to flash. Then, the M7 image must be flashed. The openamp sysbuild 259sample will do this automatically by setting the image order. 260 261The secondary core can be debugged normally in single core builds 262(where the target is ``mimxrt1160_evk/mimxrt1166/cm4``). For dual core builds, the 263secondary core should be placed into a loop, then a debugger can be attached 264(see `AN13264`_, section 4.2.3 for more information) 265 266Configuring a Debug Probe 267========================= 268 269A debug probe is used for both flashing and debugging the board. This board is 270configured by default to use the :ref:`opensda-daplink-onboard-debug-probe`, 271however the :ref:`pyocd-debug-host-tools` do not yet support programming the 272external flashes on this board so you must reconfigure the board for one of the 273following debug probes instead. 274 275Using J-Link 276------------ 277 278Install the :ref:`jlink-debug-host-tools` and make sure they are in your search 279path. 280 281There are two options: the onboard debug circuit can be updated with Segger 282J-Link firmware, or :ref:`jlink-external-debug-probe` can be attached to the 283EVK. See `Using J-Link with MIMXRT1160-EVK or MIMXRT1170-EVK`_ for more details. 284 285Using LinkServer 286---------------- 287 288Install the :ref:`linkserver-debug-host-tools` and make sure they are in your 289search path. LinkServer works with the CMSIS-DAP firmware include in LinkServer 290install. Please follow the ``LPCScrypt\docs\Debug_Probe_Firmware_Programming.pdf`` 291for more details. 292 293Linkserver is the default runner. You may also se the ``-r linkserver`` option 294with West to use the LinkServer runner. 295 296Configuring a Console 297===================== 298 299Regardless of your choice in debug probe, we will use the OpenSDA 300microcontroller as a usb-to-serial adapter for the serial console. Check that 301jumpers J5 and J8 are **on** (they are on by default when boards ship from 302the factory) to connect UART signals to the OpenSDA microcontroller. 303 304Connect a USB cable from your PC to J11. 305 306Use the following settings with your serial terminal of choice (minicom, putty, 307etc.): 308 309- Speed: 115200 310- Data: 8 bits 311- Parity: None 312- Stop bits: 1 313 314Flashing 315======== 316 317Here is an example for the :ref:`hello_world` application. 318 319Before power on the board, make sure SW1 is set to 0001b 320 321.. zephyr-app-commands:: 322 :zephyr-app: samples/hello_world 323 :board: mimxrt1160_evk/mimxrt1166/cm7 324 :goals: flash 325 326Power off the board, and change SW1 to 0010b. Then power on the board and 327open a serial terminal, reset the board (press the SW4 button), and you should 328see the following message in the terminal: 329 330.. code-block:: console 331 332 ***** Booting Zephyr OS v2.6.0-xxxx-xxxxxxxxxxxxx ***** 333 Hello World! mimxrt1160_evk 334 335Debugging 336========= 337 338Here is an example for the :ref:`hello_world` application. 339 340.. zephyr-app-commands:: 341 :zephyr-app: samples/hello_world 342 :board: mimxrt1160_evk/mimxrt1166/cm7 343 :goals: debug 344 345Open a serial terminal, step through the application in your debugger, and you 346should see the following message in the terminal: 347 348.. code-block:: console 349 350 ***** Booting Zephyr OS v2.4.0-xxxx-xxxxxxxxxxxxx ***** 351 Hello World! mimxrt1160_evk 352 353.. _MIMXRT1160-EVK Website: 354 https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-rt1160-evaluation-kit:MIMXRT1160-EVK 355 356.. _MIMXRT1160-EVK Board Hardware User's Guide: 357 https://www.nxp.com/webapp/Download?colCode=UM11617 358 359.. _i.MX RT1160 Website: 360 https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus/i-mx-rt1160-crossover-mcu-family-high-performance-mcu-with-arm-cortex-m7-and-cortex-m4-cores:i.MX-RT1160 361 362.. _i.MX RT1160 Datasheet: 363 https://www.nxp.com/docs/en/data-sheet/IMXRT1160CEC.pdf 364 365.. _i.MX RT1160 Reference Manual: 366 https://www.nxp.com/webapp/Download?colCode=IMXRT1160RM 367 368.. _Using J-Link with MIMXRT1160-EVK or MIMXRT1170-EVK: 369 https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Using-J-Link-with-MIMXRT1160-EVK-or-MIMXRT1170-EVK/ta-p/1529760 370 371.. _AN13264: 372 https://www.nxp.com/docs/en/application-note/AN13264.pdf 373