Boot LPC54S018 from SPI-MRAM (MR25H40).

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

Boot LPC54S018 from SPI-MRAM (MR25H40).

390 Views
jcxz
Contributor II

I am buy EVB LPC54S018M-EVK with LPC54S018 and connect to it SPI-MRAM chip = MR25H40.

I need to load the firmware into LPC54S018 from SPI-MRAM (MR25H40). I connected the MRAM to FLEXCOMM9. I can read and write of data to this MRAM from my firmware normally - it ok. But I can't boot of MCU from it.
On the oscillogramm, I see that (after RESET) the microcontroller's boot-ROM code begins communicating with the MRAM at the default speed = 12 MHz (boot-ROM sending it a wake-up command (opcode = 0xAB) and then three times sending a "read JEDEC-ID" command (opcode = 0x9F)). After that, no further activity occurs on the SPI. The wake-up command is processed normally by the MRAM, but the "read JEDEC-ID" command is not supported by the memory (according to the datasheet by MRAM). I thought that the boot-ROM code, having not received a response to the "read JEDEC-ID" command, would simply continue booting at the default speed. But for unknown reason, after three attempts to "read JEDEC-ID", the boot process is cancelled.

I tried setting the ISP pins of LPC54S018 to the following states:
1) or ISP0 = high, ISP1 = high, ISP2 = high;
2) or ISP0 = high, ISP1 = low, ISP2 = high.
Nothing changes - the microcontroller won't boot.

Is there any way to continue booting of LPC54S018 from SPI-memory without waiting for a response to the "read JEDEC-ID" command?

PS: I am attaching oscillograms of the loading process.

0 Kudos
Reply
4 Replies

356 Views
jcxz
Contributor II

It appears that booting the LPC540xx from SPI-MRAM (MR20H40/MR25H40) is impossible. Because SPI-MRAM does not support the "read JEDEC-ID" command. 

But SPI-FRAM (unlike SPI-MRAM) supports the "read JEDEC-ID" command. I replaced SPI-MRAM to SPI-FRAM (FM25V05) and booted my LPC54S018 successfully! However, in the FM25V05, the firmware should start from address 0x0001, not from 0x0000. After the "read JEDEC-ID" command, the LPC540xx boot-ROM sends a read command 0x03 to the SPI memory first, with a 24-bit address. If the reading is unsuccessful, it then sends a read command 0x03 with a 32-bit address. The FM25V05 has a 16-bit address. However, if the boot image is shifted to address 0x0001, the LPC540xx boots successfully even from the FM25V05. 24-bit read commands are used by boot-ROM for booting, so the first byte read is skipped.

See attached oscillogram.

 

Later I'll try booting from the CY15B104QN (SPI-FRAM), which has 24-bit addressing.

0 Kudos
Reply

293 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi @jcxz 

It is great to hear that your board has booted successfully.

Do you have any further questions or concerns?

Thank you.

 

BR

Alice

0 Kudos
Reply

279 Views
jcxz
Contributor II

Yes. Next, I tried booting from the CY15B104QN-50SXI SPI-FRAM. Its doesn't work Doesn't boot from the CY15B104QN. Although this chip responds to the "read JEDEC-ID" command. But CY15B104QN outputs a JEDEC-ID in reverse byte order: "00,2C,C2,7F,7F,7F,7F,7F,7F" (hex). That's probably why the boot-ROM LPC54018 refuses to boot from it.
The FM25V05 outputs a JEDEC-ID in the form: "7F,7F,7F,7F,7F,7F,C2,23,00" (hex) - the LPC54018 boot-ROM accepts it and boots. But capacity of FM25V05 is too small for the my project.
Now I'll try booting from the FM25V20A. I hope it will boot from there.

PS: The CY15B104QN belongs to the new generation of SPI-FRAM chips - "EXCELON™" F-RAM" (Infineon). Apparently, the LPC54018 bootloader doesn't support them.

0 Kudos
Reply

255 Views
jcxz
Contributor II

I was able to successfully boot LPC54018 from FM25V20A-G!

Final result of the LPC54018 MRAM/FRAM boot capability check:
1. Booting from SPI-MRAM (MR25H40): FAILED. Possible reason = JEDEC-ID read command not supported.
2. Booting from SPI-FRAM CY15B104QN, JEDEC-ID = "00,2C,C2,7F,7F,7F,7F,7F,7F" (hex): FAILED. Possible reason = boot-ROM does not recognize JEDEC-ID.
3. Booting from SPI-FRAM FM25V20A-G, JEDEC-ID = "7F,7F,7F,7F,7F,7F,C2,25,08" (hex): SUCCESSFUL. Possible reason = boot-ROM recognizes JEDEC-ID.
4. Booting from SPI-FRAM FM25V05, JEDEC-ID = "7F,7F,7F,7F,7F,7F,C2,23,00" (hex): SUCCESSFUL. Possible reason: The boot ROM recognizes the JEDEC-ID. However, the boot image must be located at address 1 (not 0).

But the CY15B104QN memory family is newer. It replaces the outdated FM25Vxx. Therefore, I'd like to use the CY15B104QN. Why booting from CY15B104QN not supported? And will booting from the CY15B104QN (or other chips in this family) be added in future LPC540xx revisions?

0 Kudos
Reply