imxrt1050 S71KS512S HyperFlash and HyperRAM uboot access

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

imxrt1050 S71KS512S HyperFlash and HyperRAM uboot access

692 Views
embeddednoob
Contributor II

Hello,

 

I previously posted a question related to using an imxrt1050 with a S71KS512S HyperFlash and HyperRAM and uboot. I was able to use the latest version of u-boot(2024) which includes support for generating the flash boot header and burned the image to the flash at 0x60000000. This worked and I was able to boot to u-boot using the combo chip:

resetting ...
U-Boot SPL 2025.04-rc2-dirty (Mar 25 2025 - 11:55:10 -0400)
FLASH init failed: -19
Trying to boot from NOR

Jumping to U-Boot...
SPL malloc() used 0x2528 bytes (9 KB)
image entry point: 0x202153fd


U-Boot 2025.04-rc2-dirty (Mar 25 2025 - 11:55:10 -0400)

U-Boot code: 20215000 -> 20249A98 BSS: -> 2024F4A0
Model: NXP IMXRT1050-evk board
DRAM: Monitor len: 0003a4a0
Ram size: 00060000
Ram top: 20260000
TLB table from 20250000 to 20254000
Reserving 233k for U-Boot at: 20215000
Reserving 64k for malloc() at: 20204e00
Reserving 60 Bytes for Board Info at: 20204dc0
Reserving 200 Bytes for Global Data at: 20204cf0
Reserving 6944 Bytes for FDT at: 202031d0

RAM Configuration:
Bank #0: 20200000 384 KiB

DRAM: 384 KiB
New Stack Pointer is: 202031b0
Relocation Offset is: 00000000
Relocating to 20215000, new gd at 20204cf0, sp at 202031b0
Pre-reloc malloc() used 0x2498 bytes (9 KB)
Now running in RAM - U-Boot at: 20215000
Core: 77 devices, 15 uclasses, devicetree: separate
Flash: flash detect cfi
not found
## Unknown flash on Bank 1 - Size = 0x00000000 = 0 MB
0 Bytes
MMC:
Loading Environment from nowhere... OK
In: serial@40184000
Out: serial@40184000
Err: serial@40184000
Net: eth0: ethernet@402d8000
u-boot->

 

I can read the flash using md commands:

u-boot-> md 60000000
60000000: 42464346 56010000 00000000 03030303 FCFB...V........
60000010: 00000000 00000000 00000000 00000000 ................
60000020: 00000000 00000000 00000000 00000000 ................
60000030: 00000000 00000000 00000000 00000000 ................
60000040: 00000059 00070803 00000000 00000000 Y...............
60000050: 04000000 00800000 00000000 00000000 ................
60000060: 00000000 00000000 00000000 00000000 ................
60000070: 00000000 00000000 00000000 00000000 ................
60000080: 8b1887a0 b7108f10 0000a704 00000000 ................
60000090: 00000000 00000000 00000000 00000000 ................
600000a0: 00000000 00000000 00000000 00000000 ................
600000b0: 00000000 00000000 00000000 00000000 ................
600000c0: 00000000 00000000 00000000 00000000 ................
600000d0: 00000000 00000000 00000000 00000000 ................
600000e0: 00000000 00000000 00000000 00000000 ................
600000f0: 00000000 00000000 00000000 00000000 ................

 

But cannot write to it using mw commands.

 

When I try to use sf commands to access the flash it fails:

sf probe sometimes works and sometimes fails to read the correct jedec ID.

sf read always fails:

sf read 20200000 0 1

device 0 offset 0x0, size 0x1
WARNING at drivers/spi/nxp_fspi.c:712/nxp_fspi_read_rxfifo()!
WARNING at drivers/spi/nxp_fspi.c:712/nxp_fspi_read_rxfifo()!
WARNING at drivers/spi/nxp_fspi.c:712/nxp_fspi_read_rxfifo()!
WARNING at drivers/spi/nxp_fspi.c:712/nxp_fspi_read_rxfifo()!
WARNING at drivers/spi/nxp_fspi.c:712/nxp_fspi_read_rxfifo()!
WARNING at drivers/spi/nxp_fspi.c:712/nxp_fspi_read_rxfifo()!

.....

.....

 

What settings could I be missing to make the flash read/write work in u-boot?

 

Labels (1)
0 Kudos
Reply
3 Replies

638 Views
embeddednoob
Contributor II

Here is the driver u-boot uses for the flexspi controller on the imx/imxrt

 

https://github.com/u-boot/u-boot/blob/v2025.04-rc5/drivers/spi/nxp_fspi.c

 

read/write accesses are triggered by IP bus. It uses a single LUT register, but I made sure to set up all LUT registers to match the example I found from here:

https://github.com/nxp-mcuxpresso/mcux-sdk-examples/tree/main/evkbimxrt1050/driver_examples/flexspi/...

 

I am still having no luck

0 Kudos
Reply

657 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

It would be helpful try to write the flash using either AHB or IP bus access, Im not familiar with the methods used on u-boot as the implementation is not made by us, therefore, I suggest contact the u-boot development community. I apologize for the inconveniences this may cause you. 

Best regards,
Omar

0 Kudos
Reply

627 Views
embeddednoob
Contributor II
Here is the driver u-boot uses for the flexspi controller on the imx/imxrt



https://github.com/u-boot/u-boot/blob/v2025.04-rc5/drivers/spi/nxp_fspi.c



read/write accesses are triggered by IP bus. It uses a single LUT register, but I made sure to set up all LUT registers to match the example I found from here:

https://github.com/nxp-mcuxpresso/mcux-sdk-examples/tree/main/evkbimxrt1050/driver_examples/flexspi/...



I am still having no luck
0 Kudos
Reply