Post Go back to editing

Loading LDR from flash via adi_rom_Boot()

Hello,

I am trying to load LDR file containing code for SHARC by calling adi_rom_Boot from U-Boot with following parameters:

adi_rom_Boot(0x60000000 + offset, 0x40000000 | 0x20000000, 0, NULL, 0x207); // NORESET | RETURN, SPI2

It is working as expected for SPI offset less than 16 MiB (0x1000000), but when I try to load same LDR file located on higher offset, the processor goes to fault state most of the time (some addresses > 0x1000000 works, but mostly not).

Is adi_rom_Boot somehow limited to addresses < 16 MiB? We are using custom board with 64 MiB micron n25q512ax3 flash and ADSP-SC572. U-Boot nor Linux does not have problem with reading/writing at any offset on this flash...

Parents
  • Hello,

    to answer my own question - AFAIK it is not possible. I connected logic analyzer on SPI and it looks like the ROM API uses only 3B address mode. So it can access only lower 16 MiB of memory. When you call rom api to boot from 0x1080000, it will boot from 0x0080000 instead (the upper address byte is ignored).

    Also ROM API every time reads one byte from address 0 (for unknown reason to me).

  • Hi,

    Apologies for delayed response.

    Should be able to workaround this by using the hook routines and then modifying the SPI controller memory mapped settings to handle transmission of 4 address bytes instead of three. The read from address 0 could be avoided by disabling the auto detection feature.

    Attached is an example code that implements this workaround. This code can be directly run on ADSP-21569 Ezkit. Please use this code as a reference and modify for ADSP-SC572 accordingly.

    ADSP_21569_RomBoot_Workaround.zip

    Regards,
    Anand Selvaraj.

Reply
  • Hi,

    Apologies for delayed response.

    Should be able to workaround this by using the hook routines and then modifying the SPI controller memory mapped settings to handle transmission of 4 address bytes instead of three. The read from address 0 could be avoided by disabling the auto detection feature.

    Attached is an example code that implements this workaround. This code can be directly run on ADSP-21569 Ezkit. Please use this code as a reference and modify for ADSP-SC572 accordingly.

    ADSP_21569_RomBoot_Workaround.zip

    Regards,
    Anand Selvaraj.

Children
No Data