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