This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6548: How to display the data read from the OSPI Flash on U-Boot console

Part Number: AM6548

Our customer is using the Processor SDK Linux 07.03.00.07 and is trying to display the data read from the OSPI Flash in the memory mapped direct mode on the U-Boot console with the md (memory display) command. They cannot read the external memory space on the FSS memory regions. Reading from Region 0 (MCU_FSS0_DAT_REG0) fails, and all values read from Region 3 (MCU_FSS0_DAT_REG3) are zero.

Region 0 (MCU_FSS0_DAT_REG0):

=> md 0x0400000000
400000000:"Synchronous Abort" handler, esr 0x96000005
elr: 000000008088c9b0 lr : 000000008088c914 (reloc)
elr: 00000000fffa19b0 lr : 00000000fffa1914
x0 : 000000000000000a x1 : 0000000000000000
x2 : 000000000000003a x3 : 0000000000000000
x4 : 0000000400000000 x5 : 00000000fdee7e88
x6 : 00000000fffbd18e x7 : 0000000000000004
x8 : 00000000fdee84f8 x9 : 0000000000000008
x10: 00000000ffffffd0 x11: 0000000000000010
x12: 0000000000009044 x13: 00000000fdee87b8
x14: 00000000fdee88c0 x15: 0000000000000021
x16: 00000000fff1f138 x17: 0000000000000000
x18: 00000000fdef4de0 x19: 0000000000000040
x20: 0000000400000000 x21: 0000000400000000
x22: 00000000fffbc6de x23: 0000000000000008
x24: 0000000000000009 x25: 0000000000000004
x26: 0000000000000004 x27: 00000000fdee85b8
x28: 0000000000000004 x29: 00000000fdee8530

Code: 12800000 17ffffcf 7100135f 54000201 (b9400085)
Resetting CPU ...

resetting ...

Region 3 (MCU_FSS0_DAT_REG3):

=> md 0500000000
500000000: 00000000 00000000 00000000 00000000 ................
500000010: 00000000 00000000 00000000 00000000 ................
500000020: 00000000 00000000 00000000 00000000 ................
500000030: 00000000 00000000 00000000 00000000 ................
500000040: 00000000 00000000 00000000 00000000 ................
500000050: 00000000 00000000 00000000 00000000 ................
500000060: 00000000 00000000 00000000 00000000 ................
500000070: 00000000 00000000 00000000 00000000 ................
500000080: 00000000 00000000 00000000 00000000 ................
500000090: 00000000 00000000 00000000 00000000 ................
5000000a0: 00000000 00000000 00000000 00000000 ................
5000000b0: 00000000 00000000 00000000 00000000 ................
5000000c0: 00000000 00000000 00000000 00000000 ................
5000000d0: 00000000 00000000 00000000 00000000 ................
5000000e0: 00000000 00000000 00000000 00000000 ................
5000000f0: 00000000 00000000 00000000 00000000 ................

It can be displayed on the Linux console with the dd command.

root@am6548idk:~# dd if=/dev/mtdblock0 of=mtdblock0.dat
1024+0 records in
1024+0 records out
524288 bytes (524 kB, 512 KiB) copied, 0.057064 s, 9.2 MB/s
root@am6548idk:~# hexdump mtdblock0.dat
0000000 8230 a803 8230 1103 03a0 0102 0202 0214
0000010 2573 0d88 780c a3eb bfda aa30 612b 748b
0000020 5a93 305f 060d 2a09 4886 f786 010d 0d01
0000030 0005 8130 319d 300b 0609 5503 0604 0213
0000040 5355 0b31 0930 0306 0455 0c08 5402 3158
0000050 300f 060d 5503 0704 060c 6144 6c6c 7361
0000060 2731 2530 0306 0455 0c0a 541e 7865 7361
0000070 4920 736e 7274 6d75 6e65 7374 4920 636e
0000080 726f 6f70 6172 6574 3164 3013 0611 5503

How to display the data read from the OSPI Flash on the U-Boot console with the md (memory display) command?

How to set OSPI in the memory mapped direct mode in U-Boot?

Best regards,

Daisuke

  • Dear TI support team,

    How to display the data read directly from the OSPI Flash in the memory mapped direct mode on the U-Boot console with the md (memory display) command?

    How to set OSPI in the memory mapped direct mode in U-Boot?

    Please give me an answer as soon as possible. Your prompt reply would be appreciated.

    Best regards,

    Daisuke

  • Hello Daisuke-san,

    md is NOT the right command to read from OSPI flash memory.

    It will be a 2 step process:

    1) Copy from flash to RAM: 

    Fullscreen
    1
    2
    sf probe 0;
    sf read 0x80000000 0x0 0x30000
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    The above reads 0x30000 bytes from beginning of OSPI to RAM Address 0x80000000 

    2) Read from RAM using md:

    Fullscreen
    1
    md 0x80000000
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    If no other questions please click on verify answer.

    - Keerthy

     

  • Hi Keerthy-san,

    Thank you for your reply.

    I understand that U-Boot does not support OSPI in the memory mapped direct mode.

    Best regards,

    Daisuke