How to use QSPI for M7 on i.MX 8M Plus EVK

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

How to use QSPI for M7 on i.MX 8M Plus EVK

Jump to solution
213 Views
ericnelsonaz
Contributor III

Hi all,

I'm having trouble getting started using the i.MX 8M Plus EVK with QSPI NOR.

I've found instructions on how to flash the 8M Mini using "uuu -b qspi firmware.bin", but this doesn't appear to work on 

My EVK seems to have come with a boot image loaded into the NOR flash:

 

u-boot=> sf probe 
SF: Detected n25q256ax1 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
u-boot=> sf read $loadaddr 0 0x100
device 0 offset 0x0, size 0x100
SF: 256 bytes @ 0x0 Read: OK
u-boot=> md $loadaddr
40400000: 412000d1 007e1000 0005fc00 00000000  .. A..~.........
40400010: 007e0fe0 007e0fc0 0080b7c0 00000000  ..~...~.........
40400020: 007e0bc0 0002cc00 00000000 00000000  ..~.............
40400030: 00000000 00000000 00000000 00000000  ................
40400040: 1400000a d503201f 40200000 00000000  ..... .... @....

 


Is there an app note regarding how to flash and start the M7 with code in QSPI?

0 Kudos
Reply
1 Solution
202 Views
ericnelsonaz
Contributor III

I programmed the flash with flash_debug/hello_world.bin at offset 0.

u-boot=> load mmc 1 $loadaddr hello_world.bin
18664 bytes read in 4 ms (4.4 MiB/s)
u-boot=> sf probe
SF: Detected n25q256ax1 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
u-boot=> sf erase 0 0x5000
SF: 20480 bytes @ 0x0 Erased: OK
u-boot=> sf write $loadaddr 0 $filesize
device 0 offset 0x0, size 0x48e8
SF: 18664 bytes @ 0x0 Written: OK

 

View solution in original post

0 Kudos
Reply
2 Replies
206 Views
ericnelsonaz
Contributor III

I figured it out...

After programming the .bin file to the flash, issuing these commands in U-Boot allow the M7 hello_world app to run:

u-boot=> sf probe
SF: Detected n25q256ax1 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
u-boot=> bootaux 0x08000000
## No elf image at address 0x08000000
## Starting auxiliary core stack = 0x20020000, pc = 0x0800048D...


And I see "hello world." on UART4 (/dev/ttyUSB3).

0 Kudos
Reply
203 Views
ericnelsonaz
Contributor III

I programmed the flash with flash_debug/hello_world.bin at offset 0.

u-boot=> load mmc 1 $loadaddr hello_world.bin
18664 bytes read in 4 ms (4.4 MiB/s)
u-boot=> sf probe
SF: Detected n25q256ax1 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
u-boot=> sf erase 0 0x5000
SF: 20480 bytes @ 0x0 Erased: OK
u-boot=> sf write $loadaddr 0 $filesize
device 0 offset 0x0, size 0x48e8
SF: 18664 bytes @ 0x0 Written: OK

 

0 Kudos
Reply