Boot LPC54S018 from SPI-MRAM (MR25H40).

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

Boot LPC54S018 from SPI-MRAM (MR25H40).

95 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
1 Reply

61 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