i.MXRT1064 bringing up

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MXRT1064 bringing up

1,584 Views
billchadwick
Contributor III

We have our own newly manufactured board with an iMXRT1064 device. UART1 is connected via a  FTDI USB UART chip, to my PC (as COM28). I am trying to get started loading code to Flash for running out of RAM after a reboot.

After a boot, from the PC com PORT I can get

sdphost -p COM28 -- error-status
Status (HAB mode) = 1450735702 (0x56787856) HAB disabled.
Reponse Status = 858993459 (0x33333333) HAB failure.

With JTAG, I can build and run (in RAM) the SDK Flashloader and then work with blhost e.g. like this

C:\Flashloader_RT1064_1.0_GA\Tools\blhost\win>blhost -p COM28 -- fill-memory 0x2000 4 0xc0000007
Ping responded in 1 attempt(s)
Inject command 'fill-memory'
Successful generic response to command 'fill-memory'
Response status = 0 (0x0) Success.

C:\Flashloader_RT1064_1.0_GA\Tools\blhost\win>blhost -p COM28 -- configure-memory 0x9 0x2000
Ping responded in 1 attempt(s)
Inject command 'configure-memory'
Successful generic response to command 'configure-memory'
Response status = 0 (0x0) Success.

C:\Flashloader_RT1064_1.0_GA\Tools\blhost\win>blhost -p COM28 -- list-memory
Ping responded in 1 attempt(s)
Inject command 'list-memory'
Internal Flash:
No Internal Flash available
Internal RAM:
Region 0: 0x00000000 - 0x0001ffff; Total size: 128 KB
Region 1: 0x20000000 - 0x2001ffff; Total size: 128 KB
Region 2: 0x20200000 - 0x202bffff; Total size: 768 KB
SEMC NOR:
kStatusMemoryNotConfigured
FlexSPI NOR:
Start Address = 0x70000000 Total Size = 4 MB Page Size = 256 bytes Sector Size = 4 KB Block Size = 64 KBSEMC NAND:
kStatusMemoryNotConfigured
SPI NAND:
kStatusMemoryNotConfigured
SPI NOR/EEPROM:
kStatusMemoryNotConfigured
SD/SDHC:
kStatusMemoryNotConfigured
MMC/eMMC:
kStatusMemoryNotConfigured

Which is all looking positive.

I am now trying to get my head around all the Boot documentation and am struggling a bit.

I can't seem to make use of mfgtool2.exe over a PC com port - there does not seem to be anywhere to enter a COM port #. If that can't be used over UART, then perhaps the docs should say so.

I want to build some iMXRT code to control the peripherals on our board with a command line interface over UART1. I want to flash (internal QSPI) an image of that code and have the iMXRT boot into it. This is very early development code so we don't need any signing or encryption.

I thought I might try this boot RAM image from Flash scheme out using the Flashloader. 

I have build (MCU Xpresso, from SDK example sources) evkmimxrt1064_flashloader.bin (which is linked to run in RAM address space).

Now I need IMXRT1064 internal QSPI flash specific, instructions on how  to make a bootable image (with elftoSB I assume) and load it to internal QSPAI flash. I have been looking in i.MX RT1064 Manufacturing User's Guide.pdf but that really is a bit more of an encyclopedia than a getting started guide. The confusing bit to me is getting the right .bd file - I assume that I want a non XIP (execute in place) version. There are twenty two to chose from in Flashloader_RT1064_1.0_GA\Tools\bd_file\imx10xx !

So far my attempts have produced files that I can write to flash with blhost or sdphost, but after a power cycle, the Flashloader is not running.

Any help and tips would be gratefully received.

Thanks

 

 

 

0 Kudos
8 Replies

1,576 Views
billchadwick
Contributor III

In the i.MXRT1064 Ref Manual 9.6.1.2 FlexSPI Serial NOR Flash Boot Operation  I read 

The Boot ROM attempts to boot from Serial NOR flash if the BOOT_CFG1 [7:4] fuses
are programmed to 0b’0000 as shown in the Serial NOR eFUSE Configuration table, then
the ROM will initialize FlexSPI interface. FlexSPI interface initialization is a two-step
process.
1. The ROM expects the 512-byte FlexSPI NOR configuration parameters (as explained
in the next section) to be present at offset 0x400 in Serial NOR flash attached to
FLEXSPI2_A_SS0_B. The ROM can probe the presence of Serial NOR Flash and
generate these configuration parameters accordingly via the combination of Fuses in
the table above, or reads these configuration parameters using the read command
specified by BOOT_CFG2[2:0] with serial clock operating at 30 MHz.
2. ROM configures FlexSPI interface with the parameters provided in configuration
block read from Serial NOR flash and starts the boot procedure. Refer to Table 9-14
for details regarding FlexSPI configuration parameters and to the FlexSPI NOR boot
flow chart for detailed boot flow chart of FlexSPI NOR.

Does that mean I either need to program the config block in the flash or set some fuse bits before boot from flash will work?

 

0 Kudos

1,537 Views
billchadwick
Contributor III

Delving a bit deeper... Most of the SDK demos are set for XIP from flash so after JTagging them in, they run from flash after a reboot. I guess a version of the SDK FlashLoader that had XIP from flash support would be good.

0 Kudos

1,534 Views
nickwallis
Senior Contributor I

Yes. For SDK based projects, is it not "just" a case of making sure you have fsl_flexspi_nor_boot.c and .h added to your project, set XIP_BOOT_HEADER_DCD_ENABLE = 1 and XIP_BOOT_HEADER_ENABLE = 1, recompile and download?

-Nick

0 Kudos

1,565 Views
mjbcswitzerland
Specialist V

Hi Bill

Try loading the following to your board:

https://www.utasker.com/iMX/RT1064.html

Since the 1064 boots from its internal QSPI flash it should be compatible with your board (it has a command line menu on LPUART1).

It supplies all needed for running applications in RAM, secure loading, firmware updates via Ethernet, HSUSB, UART, I2C, Modbus, SD card, memory stick, plus OTA updates too.

It is a professional solution with support intended to solve all typical i.MX RT custom HW complications and general product loading requirements without needing eFUSE programming and so will probably give you an immediate solution and save weeks of general development efforts.

It can be used with any application (eg. SDK based ones) but also supplies the uTasker framework which adds more features and proven industrial protocols and functionality.

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/iMX/RT1064.html

0 Kudos

1,558 Views
billchadwick
Contributor III

Thanks for your prompt reply.

We need to be running FreeRTOS on our board. How does uTasker fit with that?

0 Kudos

1,552 Views
mjbcswitzerland
Specialist V

Hi Bill

The secure loader concept works with any application (and any OS it is using). Applications can run in QSPI flash (XiP), on-the-fly decrypted XiP (without the application needing to do any special setups - see video https://www.youtube.com/watch?v=5iT7KP691ls), SDRAM or internal RAM (in the case of internal and internal ram zero-overhead AES256 encryption is possible). For code less that 512k in size internal RAM is preferred since it can achieve up to 20x the speed of XiP and has much superior deterministic behavior.

The uTasker application framework can use the uTasker OS or FreeRTOS, so FreeRTOS projects can use uTasker HW drivers and protocol stacks.

Regards

Mark

 

0 Kudos

1,546 Views
billchadwick
Contributor III
0 Kudos

1,541 Views
mjbcswitzerland
Specialist V

Hi Bill

I'll check them out the next time I do a doc. update - unfortunately linking to other web sites is not guaranteed - originally links worked but if NXP changes their web site layout it breaks things. For example they used to call their loader KBOOT but then renamed it to something else in the meantime.

Also Freescale was taken over by NXP since the first document version was released, which doesn't make things easier.

Regards

Mark

 

0 Kudos