1.. zephyr:board:: mimxrt685_evk 2 3Overview 4******** 5 6The i.MX RT600 is a crossover MCU family optimized for 32-bit immersive audio 7playback and voice user interface applications combining a high-performance 8Cadence Tensilica HiFi 4 audio DSP core with a next-generation Cortex-M33 9core. The i.MX RT600 family of crossover MCUs is designed to unlock the 10potential of voice-assisted end nodes with a secure, power-optimized embedded 11processor. 12 13The i.MX RT600 family provides up to 4.5MB of on-chip SRAM and several 14high-bandwidth interfaces to access off-chip flash, including an Octal/Quad SPI 15interface with an on-the-fly decryption engine. 16 17Hardware 18******** 19 20- MIMXRT685SFVKB Cortex-M33 (300 MHz, 128 KB TCM) core processor with Cadence Xtensa HiFi4 DSP 21- Onboard, high-speed USB, Link2 debug probe with CMSIS-DAP protocol (supporting Cortex M33 debug only) 22- High speed USB port with micro A/B connector for the host or device functionality 23- UART, I2C and SPI port bridging from i.MX RT685 target to USB via the on-board debug probe 24- 512 MB Macronix Octal SPI Flash operating at 1.8 V 25- 4.5 MB Apmemory PSRAM 26- Full size SD card slot (SDIO) 27- NXP PCA9420UK PMIC 28- User LEDs 29- Reset and User buttons 30- Arduino and PMod/Host expansion connectors 31- NXP FXOS8700CQ accelerometer 32- Stereo audio codec with line in/out and electret microphone 33- Stereo NXP TFA9894 digital amplifiers, with option for external +5V power for higher performance speakers 34- Support for up to eight off-board digital microphones via 12-pin header 35- Two on-board DMICS 36 37For more information about the MIMXRT685 SoC and MIMXRT685-EVK board, see 38these references: 39 40- `i.MX RT685 Website`_ 41- `i.MX RT685 Datasheet`_ 42- `i.MX RT685 Reference Manual`_ 43- `MIMXRT685-EVK Website`_ 44- `MIMXRT685-EVK User Guide`_ 45- `MIMXRT685-EVK Schematics`_ 46 47Supported Features 48================== 49 50NXP considers the MIMXRT685-EVK as a superset board for the i.MX RT6xx 51family of MCUs. This board is a focus for NXP's Full Platform Support for 52Zephyr, to better enable the entire RT6xx family. NXP prioritizes enabling 53this board with new support for Zephyr features. The mimxrt685_evk board 54configuration supports the hardware features below. Another very similar 55board is the :zephyr:board:`mimxrt595_evk`, and that board may have additional features 56already supported, which can also be re-used on this mimxrt685_evk board: 57 58+-----------+------------+-------------------------------------+ 59| Interface | Controller | Driver/Component | 60+===========+============+=====================================+ 61| NVIC | on-chip | nested vector interrupt controller | 62+-----------+------------+-------------------------------------+ 63| SYSTICK | on-chip | systick | 64+-----------+------------+-------------------------------------+ 65| OS_TIMER | on-chip | os timer | 66+-----------+------------+-------------------------------------+ 67| IOCON | on-chip | pinmux | 68+-----------+------------+-------------------------------------+ 69| GPIO | on-chip | gpio | 70+-----------+------------+-------------------------------------+ 71| FLASH | on-chip | OctalSPI Flash | 72+-----------+------------+-------------------------------------+ 73| USART | on-chip | serial port-polling; | 74| | | serial port-interrupt | 75+-----------+------------+-------------------------------------+ 76| I2C | on-chip | i2c | 77+-----------+------------+-------------------------------------+ 78| SPI | on-chip | spi | 79+-----------+------------+-------------------------------------+ 80| I2S | on-chip | i2s | 81+-----------+------------+-------------------------------------+ 82| CLOCK | on-chip | clock_control | 83+-----------+------------+-------------------------------------+ 84| HWINFO | on-chip | Unique device serial number | 85+-----------+------------+-------------------------------------+ 86| RTC | on-chip | counter | 87+-----------+------------+-------------------------------------+ 88| PWM | on-chip | pwm | 89+-----------+------------+-------------------------------------+ 90| WDT | on-chip | watchdog | 91+-----------+------------+-------------------------------------+ 92| SDHC | on-chip | disk access | 93+-----------+------------+-------------------------------------+ 94| USB | on-chip | USB device | 95+-----------+------------+-------------------------------------+ 96| ADC | on-chip | adc | 97+-----------+------------+-------------------------------------+ 98| CTIMER | on-chip | counter | 99+-----------+------------+-------------------------------------+ 100| TRNG | on-chip | entropy | 101+-----------+------------+-------------------------------------+ 102| FLEXSPI | on-chip | flash programming | 103+-----------+------------+-------------------------------------+ 104 105The default configuration can be found in 106:zephyr_file:`boards/nxp/mimxrt685_evk/mimxrt685_evk_mimxrt685s_cm33_defconfig` 107 108Other hardware features are not currently supported by the port. 109 110Connections and IOs 111=================== 112 113The MIMXRT685 SoC has IOCON registers, which can be used to configure the 114functionality of a pin. 115 116+---------+-----------------+----------------------------+ 117| Name | Function | Usage | 118+=========+=================+============================+ 119| PIO0_2 | USART | USART RX | 120+---------+-----------------+----------------------------+ 121| PIO0_1 | USART | USART TX | 122+---------+-----------------+----------------------------+ 123| PIO0_14 | GPIO | GREEN LED | 124+---------+-----------------+----------------------------+ 125| PIO1_1 | GPIO | SW0 | 126+---------+-----------------+----------------------------+ 127| PIO0_17 | I2C | I2C SDA | 128+---------+-----------------+----------------------------+ 129| PIO0_18 | I2C | I2C SCL | 130+---------+-----------------+----------------------------+ 131| PIO1_5 | GPIO | FXOS8700 TRIGGER | 132+---------+-----------------+----------------------------+ 133| PIO1_5 | SPI | SPI MOSI | 134+---------+-----------------+----------------------------+ 135| PIO1_4 | SPI | SPI MISO | 136+---------+-----------------+----------------------------+ 137| PIO1_3 | SPI | SPI SCK | 138+---------+-----------------+----------------------------+ 139| PIO1_6 | SPI | SPI SSEL | 140+---------+-----------------+----------------------------+ 141| PIO0_23 | I2S | I2S DATAOUT | 142+---------+-----------------+----------------------------+ 143| PIO0_22 | I2S | I2S TX WS | 144+---------+-----------------+----------------------------+ 145| PIO0_21 | I2S | I2S TX SCK | 146+---------+-----------------+----------------------------+ 147| PIO0_9 | I2S | I2S DATAIN | 148+---------+-----------------+----------------------------+ 149| PIO0_29 | USART | USART TX | 150+---------+-----------------+----------------------------+ 151| PIO0_30 | USART | USART RX | 152+---------+-----------------+----------------------------+ 153| PIO1_11 | FLEXSPI0B_DATA0 | OctalSPI Flash | 154+---------+-----------------+----------------------------+ 155| PIO1_12 | FLEXSPI0B_DATA1 | OctalSPI Flash | 156+---------+-----------------+----------------------------+ 157| PIO1_13 | FLEXSPI0B_DATA2 | OctalSPI Flash | 158+---------+-----------------+----------------------------+ 159| PIO1_14 | FLEXSPI0B_DATA3 | OctalSPI Flash | 160+---------+-----------------+----------------------------+ 161| PIO1_29 | FLEXSPI0B_SCLK | OctalSPI Flash | 162+---------+-----------------+----------------------------+ 163| PIO2_12 | PIO2_12 | OctalSPI Flash | 164+---------+-----------------+----------------------------+ 165| PIO2_17 | FLEXSPI0B_DATA4 | OctalSPI Flash | 166+---------+-----------------+----------------------------+ 167| PIO2_18 | FLEXSPI0B_DATA5 | OctalSPI Flash | 168+---------+-----------------+----------------------------+ 169| PIO2_19 | FLEXSPI0B_SS0_N | OctalSPI Flash | 170+---------+-----------------+----------------------------+ 171| PIO2_22 | FLEXSPI0B_DATA6 | OctalSPI Flash | 172+---------+-----------------+----------------------------+ 173| PIO2_23 | FLEXSPI0B_DATA7 | OctalSPI Flash | 174+---------+-----------------+----------------------------+ 175| PIO0_27 | SCT0_OUT7 | PWM | 176+---------+-----------------+----------------------------+ 177| PIO1_30 | SD0_CLK | SD card | 178+---------+-----------------+----------------------------+ 179| PIO1_31 | SD0_CMD | SD card | 180+---------+-----------------+----------------------------+ 181| PIO2_0 | SD0_D0 | SD card | 182+---------+-----------------+----------------------------+ 183| PIO2_1 | SD0_D1 | SD card | 184+---------+-----------------+----------------------------+ 185| PIO2_2 | SD0_D2 | SD card | 186+---------+-----------------+----------------------------+ 187| PIO2_3 | SD0_D3 | SD card | 188+---------+-----------------+----------------------------+ 189| PIO2_4 | SD0_WR_PRT | SD card | 190+---------+-----------------+----------------------------+ 191| PIO2_9 | SD0_CD | SD card | 192+---------+-----------------+----------------------------+ 193| PIO2_10 | SD0_RST | SD card | 194+---------+-----------------+----------------------------+ 195 196System Clock 197============ 198 199The MIMXRT685 EVK is configured to use the OS Event timer 200as a source for the system clock. 201 202Serial Port 203=========== 204 205The MIMXRT685 SoC has 8 FLEXCOMM interfaces for serial communication. One is 206configured as USART for the console and the remaining are not used. 207 208Programming and Debugging 209************************* 210 211Build and flash applications as usual (see :ref:`build_an_application` and 212:ref:`application_run` for more details). 213 214Configuring a Debug Probe 215========================= 216 217A debug probe is used for both flashing and debugging the board. This board is 218configured by default to use the LPC-Link2. 219 220.. tabs:: 221 222 .. group-tab:: LinkServer CMSIS-DAP 223 224 1. Install the :ref:`linkserver-debug-host-tools` and make sure they are in your 225 search path. LinkServer works with the default CMSIS-DAP firmware included in 226 the on-board debugger. 227 2. Make sure the jumpers JP17, JP18 and JP19 are installed. 228 229 linkserver is the default runner for this board 230 231 .. code-block:: console 232 233 west flash 234 west debug 235 236 .. group-tab:: LPCLink2 JLink Onboard 237 238 239 1. Install the :ref:`jlink-debug-host-tools` and make sure they are in your search path. 240 2. To connect the SWD signals to onboard debug circuit, install jumpers JP17, JP18 and JP19, 241 if not already done (these jumpers are installed by default). 242 3. Follow the instructions in :ref:`lpclink2-jlink-onboard-debug-probe` to program the 243 J-Link firmware. Please make sure you have the latest firmware for this board. 244 245 .. code-block:: console 246 247 west flash -r jlink 248 west debug -r jlink 249 250 .. group-tab:: JLink External 251 252 253 1. Install the :ref:`jlink-debug-host-tools` and make sure they are in your search path. 254 255 2. To disconnect the SWD signals from onboard debug circuit, **remove** jumpers J17, J18, 256 and J19 (these are installed by default). 257 258 3. Connect the J-Link probe to J2 10-pin header. 259 260 See :ref:`jlink-external-debug-probe` for more information. 261 262 .. code-block:: console 263 264 west flash -r jlink 265 west debug -r jlink 266 267Configuring a Console 268===================== 269 270Connect a USB cable from your PC to J16, and use the serial terminal of your choice 271(minicom, putty, etc.) with the following settings: 272 273- Speed: 115200 274- Data: 8 bits 275- Parity: None 276- Stop bits: 1 277 278Flashing 279======== 280 281Here is an example for the :zephyr:code-sample:`hello_world` application. This example uses the 282:ref:`linkserver-debug-host-tools` as default. 283 284.. zephyr-app-commands:: 285 :zephyr-app: samples/hello_world 286 :board: mimxrt685_evk/mimxrt685s/cm33 287 :goals: flash 288 289Open a serial terminal, reset the board (press the RESET button), and you should 290see the following message in the terminal: 291 292.. code-block:: console 293 294 ***** Booting Zephyr OS v1.14.0 ***** 295 Hello World! mimxrt685_evk 296 297Debugging 298========= 299 300Here is an example for the :zephyr:code-sample:`hello_world` application. This example uses the 301:ref:`linkserver-debug-host-tools` as default. 302 303.. zephyr-app-commands:: 304 :zephyr-app: samples/hello_world 305 :board: mimxrt685_evk/mimxrt685s/cm33 306 :goals: debug 307 308Open a serial terminal, step through the application in your debugger, and you 309should see the following message in the terminal: 310 311.. code-block:: console 312 313 ***** Booting Zephyr OS zephyr-v2.3.0 ***** 314 Hello World! mimxrt685_evk 315 316Troubleshooting 317=============== 318 319If the debug probe fails to connect with the following error, it's possible 320that the image in flash is interfering and causing this issue. 321 322.. code-block:: console 323 324 Remote debugging using :2331 325 Remote communication error. Target disconnected.: Connection reset by peer. 326 "monitor" command not supported by this target. 327 "monitor" command not supported by this target. 328 You can't do that when your target is `exec' 329 (gdb) Could not connect to target. 330 Please check power, connection and settings. 331 332You can fix it by erasing and reprogramming the flash with the following 333steps: 334 335#. Set the SW5 DIP switches to ON-ON-ON to prevent booting from flash. 336 337#. Reset by pressing SW3 338 339#. Run ``west debug`` or ``west flash`` again with a known working Zephyr 340 application (example "Hello World"). 341 342#. Set the SW5 DIP switches to ON-OFF-ON to boot from flash. 343 344#. Reset by pressing SW3 345 346.. _MIMXRT685-EVK Website: 347 https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-rt600-evaluation-kit:MIMXRT685-EVK 348 349.. _MIMXRT685-EVK User Guide: 350 https://www.nxp.com/webapp/Download?colCode=UM11159 351 352.. _MIMXRT685-EVK Schematics: 353 https://www.nxp.com/downloads/en/design-support/RT685-DESIGNFILES.zip 354 355.. _i.MX RT685 Website: 356 https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus/i-mx-rt600-crossover-mcu-with-arm-cortex-m33-and-dsp-cores:i.MX-RT600 357 358.. _i.MX RT685 Datasheet: 359 https://www.nxp.com/docs/en/data-sheet/RT600.pdf 360 361.. _i.MX RT685 Reference Manual: 362 https://www.nxp.com/webapp/Download?colCode=UM11147 363