Reading and writing to QSPI flash from linux space in LS1046ARDB Kit

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading and writing to QSPI flash from linux space in LS1046ARDB Kit

694 Views
IB2020
Contributor II

I was trying to read and write to QSPI  Flash from linux user space using mtd commands. It was giving error  mtd_debug utility not found. Kindly help

0 Kudos
1 Reply

687 Views
yipingwang
NXP TechSupport
NXP TechSupport

Do you use LSDK 2004?

Please use Ubuntu main rootfs filesystem.

~# mtd_debug erase /dev/mtd1 0x1000000 0x100000
Erased 1048576 bytes from address 0x01000000 in flash
Write the QSPI flash
~# dd if=/dev/urandom of=data.hex count=1 bs=1M
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0132132 s, 79.4 MB/s
~# mtd_debug write /dev/mtd1 0x1000000 0x100000 data.hex
Copied 1048576 bytes from data.hex to address 0x01000000 in flash
Read the QSPI flash
~# mtd_debug read /dev/mtd1 0x1000000 0x100000 dump
Copied 1048576 bytes from address 0x01000000 in flash to dump
Check Read and Write
Use compare tools
~ # diff data.hex dump
~ #

0 Kudos