MCUXpresso IDE V10.1.0 with i.MX RT1052 Crossover Processor

In “Eclipse MCUXpresso IDE 10.1 with integrated MCUXpresso Configuration Tools” I mentioned that I wanted to try the i.MX RT1050 processor. Well, finally my ordered board from Mouser arrived, right on time for the week-end, so I had a chance to use that ARM Cortex-M7 running at 600 MHz :-).

i.MX RT1050 EVK

i.MX RT1050 EVK

Outline

The i.MX RT1050 is indeed an interesting device. It is an ARM Cortex-M7 running up to 600 MHz with up to 512 KByte of SRAM, but with no internal FLASH memory (‘flash-less’):

i.MX RT1050 Block Diagram

i.MX RT1050 Block Diagram (Source: NXP web site)

That device is interesting for me: image processing and number crunching demand more and more processing power and memory, and the Cortex-M4 I’m using mostly are hitting a 300 MHz ‘wall’, and the first M7 (see “First steps: ARM Cortex-M7 and FreeRTOS on NXP TWR-KV58F220M“) did not really bring the performance I hoped for. The solution I have explored so far was a combination of an Cortex-A core with a Cortex-M core (see “Tutorial: First Steps with NXP i.MX7 and Toradex Colibri Board“). But this usually requires an Embedded Linux running on the Cortex-A core: something I consider as an overkill or even a risk for running a realtime application. So that i.MX RT1050 really would close that gap and allow me continue to use the established Eclipse and JTAG debugging tools. NXP calls this device ‘crossover’ as it is bridging the gap between microcontroller and microprocessors.

What might be confusing is the ‘i.MX’ in that device name: it is not one of the traditional i.MX devices using an ARM Cortex-A: it has a single Cortex-M7 core, so it is much more a ‘normal’ Cortex-M like the ‘Kinetis’ or ‘LPC’ family from NXP, except that it seems to have inherited some of the complexity of the ‘real’ i.MX family? Anyway, as long I can use it with JTAG/SWD tools and get it run FreeRTOS, that should be fine :-).

Unboxing

I ordered my board from Mouser and it arrived after a week. The board costs around $80. It comes in a card box and with a micro USB cable which is used for power and debug.

i.MX RT1050 EVK

i.MX RT1050 EVK

My board is a SCH-29538 REV A3/700-29538 REV A one. On the left above the micro-SD card socket there are headers for an Arduino shield. The device offers two micro-USB, one Ethernet port. Below a picture with the default jumper settings (click to enlarge):

MIMXRT1050-EVK

MIMXRT1050-EVK

On the backside there are connectors for a display (left connector) and a touch interface (right connector). I guess I will try to order the matching display from Mouser too.

i.MX RT Board Bottom Side

i.MX RT Board Bottom Side

The device of interest on the board is the MIMXRT1052:

i.MX RT1052 Device

i.MX RT1052 Device

Power

The board can be powered through the Debug (DAPLink/OpenSDA) USB port:

Power with DAPLink Port

Power with DAPLink Port

In that case, jumper J1 near the power LED should set to the *middle* position:

DAPLink Power Option

DAPLink Power Option

I prefer to use an external power supply, as I have faced issues with other boards if they draw too much power (and some forum posts indicate some potential USB power supply issues too). Using an external power supply I can use the ON/OFF switch near the barrel connector. The board needs a 5V DC Power supply (Center +5V, outside GND). If using an external power source, the Jumper on J1 has to be set to the *top* position:

External Power Connector

External Power Connector

The green LED shown in above image indicates that the board has power. More than once it happened I failed to debug the board because it was not powered :-(.

Boot Options

The board can boot up from different memory using the boot option switch SW7:

SW7 Boot Options

SW7 Boot Options

I’m using the default option to boot from ‘Hyperflash’ with the following settings

SW7: 1-OFF 2-ON 3-ON 4-OFF

Memory

In ‘normal’ microcontroller, there is SRAM and FLASH available out of reset. As this device is ‘flash-less’ at boot time, the memory management and configuration is a bit more challenging.

The RT1052 has 512KB RAM on-chip, available at boot time. It is splitted up into SRAM_OC (On-Chip), SRAM_ITC (Instruction-Tightly-Coupled) and SRAM_DTC (Data-Tightly-Coupled). Below they are shown in the Memory configuration editor inside the MCUXpresso IDE:

RT1052 Memory Map with on-chip RAM

RT1052 Memory Map with on-chip RAM

The 128 KByte ‘ITC’ RAM is optimized for instruction execution, while the 128 KByte ‘DTC’ RAM is optimized for data access.

External to the RT1052 there are 4 extra memory options:

  1. 64 MByte ‘Hyper Flash’
  2. 32 MByte SDRAM
  3. 8 MByte QSPI Flash
  4. micro SD card socket
RT1052 with external Memory Devices

RT1052 with external Memory Devices

Both the external Flash (‘Hyperflash’) and  SDRAM are not available right away at boot time. The bootROM will check the external Flash for a specific header: if this header is found and valid, the Flash can be used and it will use that information to initialize the external SDRAM too. Presence of that header is critical, as it allows executing code from that external FLASH memory, also called XIP (eXecute In Place).

Below the 512MBit/64MByte ‘Hyper Flash’ from Spansion and the 8 MByte QSPI on the right:

Spansion Flash Device plus SPI Flash

Spansion Flash Device plus SPI Flash

The 32 MByte 166 MHz SDRAM device:

SDRAM

SDRAM

The 8 MByte QSPI Flash device:

QSPI 64MBit FLASH

QSPI 64MBit FLASH

It looks like the QSPI Flash is not really usable. From the user manual:

“By default, this QSPI Flash is disabled on the EVK. To enable it, Hyper Flash should be removed when the QSPI Flash is selected as the boot device. And R153, R154, R155, R156, R157, R158 should add 0 Ohm resistors.”

Does this really mean *removing* the Hyper Flash device from the board?

On-Board Debug Interface

The board features includes the DAPLink (or OpenSDA) on-board debug interface as present on many other Freescale/NXP boards.

The programmed DAPLink firmware information is

# DAPLink Firmware - see https://mbed.com/daplink
Unique ID: 0225000041114e4500463009c207001792d1000097969900
HIC ID: 97969900
Auto Reset: 0
Automation allowed: 0
Daplink Mode: Interface
Interface Version: 0241
Bootloader Version: 0242
Git SHA: 34182e2cce4ca99073443ef29fbcfaab9e18caec
Local Mods: 1
USB Interfaces: MSD, CDC, HID
Bootloader CRC: 0x73707d49
Interface CRC: 0x92919274
DAPLink Firmware

DAPLink Firmware

Because that firmware is not the latest one, I downloaded the latest one from http://www.nxp.com/opensda. The same link is available in the MCUXpresso IDE:

OpenSDA Firmware Update Site

OpenSDA Firmware Update Site

There are two different firmware binaries for debugging with CMSIS-DAP: one for SPI-Flash and one for Hyper-Flash.

💡 I have only used the Hyperflash one. I could be that the difference is where the USB MSD flashloader stores the binary. Anyway I’m not using that loader and using the debugger instead.

Because the board is initially configured to use Hyperflash, I have downloaded that firmware (I downloaded both, just in case, but make sure you use the correct one depending on your flash configuration):

Download OpenSDA Binary

Download OpenSDA Binary

This downloads k20dx_mimxrt1050_evk_hyper_if_crc.bin for me.

To program the new CMSIS-DAP firmware:

  1. Power off the board
  2. Make sure Jumper J27 is on 1-2 position:

    Jumper J27 in 1-2 position

    Jumper J27 in 1-2 position

  3. Press and hold SW4 while powering the board, then release SW4
  4. The device should show up as ‘MAINTENANCE

    DAPLink Maintenance Mode

    DAPLink Maintenance Mode

  5. Copy the .bin firmware file downloaded to that drive/device (e.g. drag&drop)

    Downloading DAPLink firmware

    Downloading DAPLink firmware

  6. Power off the board and power it again. Check the Interface Version (this is the new CMSIS-DAP Firmware version):

    Updated CMSIS-DAP Debug Firmware

    Updated CMSIS-DAP Debug Firmware

  7. Power off the board again. Set Jumper J27 to the position 2-3 for OpenSDA Debug
  8. Power on the board again. On Windows, under Devices/Printers it should show now three additional devices:

    DAPLink CMSIS-DAP Devices

    DAPLink CMSIS-DAP Devices

  9. Now we are ready to debug it :-).

MCUXpresso SDK

The SDK (software drivers) for the device are availble from http://mcuxpresso.nxp.com/. After selecting the device I can build the SDK:

MCUXpresso SDK Page

MCUXpresso SDK Page

This gives me another page of options for the SDK. Make sure to select the MCUXpresso IDE. With the ‘Add software component’ I can add extra components as FreeRTOS. Then download the SDK.

Configured the SDK

Configured the SDK

MCUXpresso IDE

I’m using the MCUXpresso IDE V10.1.0 (see “Eclipse MCUXpresso IDE 10.1 with integrated MCUXpresso Configuration Tools“). The downloaded SDK from the previous step gets added with drag&drop into the ‘Installed SDK” view:

Installed SDK in MCUXpresso IDE

Installed SDK in MCUXpresso IDE

Create a new project with the shortcut in the Quickstart Panel:

Creating New Project

Creating New Project

Select the board, then press next:

Creating Project for 1050

Creating Project for 1050

In the next page I have selected FreeRTOS (or go with the defaults):

Configure the Project

Configure the Project

Pressing next gives the advanced options which I keep at the defaults:

Installed SDK in MCUXpresso IDE

Installed SDK in MCUXpresso IDE

Advanced Project Options

Advanced Project Options

With ‘Finish’ the project gets created, and I can build it:

Building project

Building project

Debug

💡 My board had problems with debug, because probably the content of the external FLASH block confused the bootROM, so debugging was not possible. Consult the ‘Troubleshooting’ section at the end of this article for erasing the external FLASH first.

To debug the project, use the ‘Debug’ button from the Quickstart Panel:

Debug from the Quickstart Panel

Debug from the Quickstart Panel

The first time, it will trigger a probe discovery, and the DAPLink probe should show up:

Probe Discovered

Probe Discovered

With this can debug that ‘hello world’ project in the MCUXpresso IDE:

Debugging Hello World

Debugging Hello World

Execute in Place (XIP) Header

As seen from the Disassembly view above, the program is executing  in  from the external FLASH at 0x6000’0000 :-). The project has files in the ‘xip’ folder to create and link the needed header at address 0x6000’0000:

XIP File in Project

XIP File in Project

This creates a 8 KByte special header at the beginning of the the FLASH at address 0x6000’0000:

Hyperflash Config Block

Hyperflash Config Block

Most of the SDK examples are running in RAM. To change them to run from the external FLASH, consult the Overview Guide.

Debug Connector J21

If using an external SWD/JTAG debug probe, the board has a connector for the main CPU located on J21. In the picture below I have attached the NXP LPC-Link2 probe with a custom enclosure (see “Custom 3D Printed Enclosure for NXP LPC-Link2 Debug Probes“).

LPC-Link2 External Debug Probe

LPC-Link2 External Debug Probe

Debug connection with the P&E Multilink Universal:

Debugging with P&E Multilink

Debugging with P&E Multilink

Same with the Segger J-Link:

Debugging with J-Link

Debugging with J-Link

The onboard DAPLink debugger is not that fast. What helps for the LinkServer/OpenSDA debug connection is to remove the following (see Overview Guide):

--cachelib libm7_cache.so
removing cachelib libm7_cache.so

removing cachelib libm7_cache.so

That removes the extra cache handling, making debugging about twice as fast. Speed is ok that way, but not at par use an external debug probe. If you are really serious about debugging, get an external debug probe.

For using it with a small 2×5 0.05″ cable, I have to use an adapter board, e.g. the one from Adafruit.

Cortex SWD Adapter

Cortex SWD Adapter

I have been able to use onboard DAPLink, Segger J-Link, P&E Multilink and the NXP LPC-Link2 to debug the board.

Trouble Shooting

I was not able to debug my board, probably because the bootROM was confused by some wrong values in the external Hyperflash at address 0x6000’0000. To solve that problem, erase the FLASH memory. With the MCUXpresso IDE, either the onBoard DAPLink with CMSIS-DAP or the NXP LPC-Link2 Debug probe on connector J21 has to be used (the P&E or Segger probes won’t help here).

First, power off the board and change the SW7 DIP Switch to

SW7: 1-ON 2-ON 3-ON 4-OFF

to prevent booting from Hyperflash:

Preventing booting from Flash

Preventing booting from Flash

Power the board again. Select a project setup for XIP, and start the GUI Flash Programmer in the MCUXpresso IDE:

GUI Flash Programmer Icon

GUI Flash Programmer Icon

The project must have a DAPLink or LPC-Link2 debug connection:

DAPLink Connection

DAPLink Connection

Next, make sure that the ‘Mass erase’ option is enabled:

Mass Erasing Device

Mass Erasing Device

Press OK:

Mass Erase Progress

Mass Erase Progress

This will trigger the following dialog which can be closed:

Progam Flash

Program Flash

Power off the board, restore the SW7 to the allow boot from Hyperflash again:

Boot from Hyperflash

Boot from Hyperflash

Because the Hyperflash boot block is now erased, the board should be useable again.

Summary

The i.MX RT1052 is indeed an interesting device: lots of performance. According to NXP Factsheet the price should be reasonable too: “10k resale at sub $2.50”. Still there will be costs at least for an external FLASH memory. That BGA package makes it tricky for hobbyist. Usinig the MCUXpresso IDE makes it a very good experience to make the first steps with that board. While the onboard DAPLink is convenient, I recommend using an external debug probe. Finally, maybe board vendors will come up with small and bread board friendly breakout boards for the i.MX RT?. Something like the tinyk22? That would be awesome!

Happy RT’ing 🙂

Links

Advertisements

12 thoughts on “MCUXpresso IDE V10.1.0 with i.MX RT1052 Crossover Processor

  1. It always interesting to see a new line of MCU. In this case the devices have the potential to provide an upgrade path to the devices I have been using with the added bonus of not having to become familiar with yet another IDE and SDK. Having recently looked at options for an upgrade path in the context of new requirements, it has become clear that what would really speed up development of solutions and make these boards competitive with the population of Raspberry PIs out there would be a greater focus on application and operating system level software that is required for many applications such as reliable USB Mass storage file system, FTP, shell script capability and so on whilst still maintaining Micro controller real time capability. The Middle-ware from Arm seems to fill that gap and MDK5 supports this i.MX RT line already.

    Like

    • I think these days it is more about the software and tools than about the hardware itself. Yes, the hardware is needed, but my key decision factor for a design is the availability and quality of the software and tools, and this includes the middleware and drivers. The Raspy is a good example: that hardware is not really great or best in class, but the available tutorials, courses, middleware, etc are.

      Like

      • Hi Erich,

        After re-discovery the debugger probe, it can work .

        Thanks a lot,

        Best Regards,
        Kent

        Like

  2. Hi Erich,
    I’ve one of this 1052 EVK boards and a Jlink probe ..
    Just a small curiosity : why do u need two adapters to connect to the JTAG connector ( J21 ) ?
    I would not be more “straight” to go directly from the 20 pin 0.1 mm connector on the JLink to the 20 pin 0.1 mm on the EVK board ?
    From the EVK schematich and JLink connector footprint seems there should be no problems …

    Like

    • Yes, I can go straight with the ‘big’ cable from the J-Link to the board, that’s correct. I’m usinig the adapter with the small cable for convenience only (easier to move around the probe, as my desk gets messy 😉

      Like

      • Hi Erich,

        I m trying to use Jlink with Mcuxpresso but failed. the error message is “cannot get jtag device”. is there any special configuration settings for Jlink debugger?

        Thanks a lot.

        Best Regards,
        Kent

        Like

      • Hi Kent,
        no, no special setup or settings are needed. Have you created a project with the wizard (File > New) inside MCUXpresso using the SDK project? This should setup your connection when you do a debug the first time.

        Like

  3. Hi! In my view this board have a nice MCU and stuff on it! But it have a really bad layout! It only have arduino headers as “easy” expansion ports the other ones are only fpc conectors! In my opinon it’s better to wait for a board with more pins exposed! For 80$ it’s quite expensive!

    Like

  4. > That BGA package makes it tricky for hobbyist.

    Maybe you already know, but the I.MX RT1020 series are all LQFP packages….but they’re not released yet unfortunately.

    Like

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s