LPC4370 - SPIFI Boot

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

LPC4370 - SPIFI Boot

Jump to solution
863 Views
rulamp
Contributor III

Hello. I am having trouble booting from SPIFI with my LPC4370 Link2 board. I have set jumper JP1 and JP2 is unconnected. I cannot get a TotalPhase Aardvark to program the W25Q80 on board the Link2. Reading seems to work fine, but writing and verify fails.

I have a custom board with a W25Q80 flash and a LPC43S70 which I can program and verify after programming the 43S70 with JTAG and setting the SPIFI pins to the following:

 

Chip_SCU_PinMuxSet(3, 3, (SCU_MODE_FUNC1));
Chip_SCU_PinMuxSet(3, 4, (SCU_MODE_FUNC3));
Chip_SCU_PinMuxSet(3, 5, (SCU_MODE_FUNC3));
Chip_SCU_PinMuxSet(3, 6, (SCU_MODE_FUNC3));
Chip_SCU_PinMuxSet(3, 7, (SCU_MODE_FUNC3));
Chip_SCU_PinMuxSet(3, 8, (SCU_MODE_FUNC3));

 

However, booting does not work. The BOOT pins are set correctly for SPIFI, no CRP has been enabled, and the BOOT_SRC bits have not been set. I do NOT get a 1Hz pulse on P1_1.

I generated the binary file that was loaded on to the flash chip by right clicking the axf file in MCUXpresso v11.2.1 and choosing 'Binary Utilities->Create binary'

The User Guide leads me to believe that no header is required. If one is required, how do I generate it?

What is going wrong here? What should I check next?
Thanks

Labels (1)
0 Kudos
Reply
1 Solution
847 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Regarding the JP2 jumper, on the LPC Link2 board, there are components of JTAG/SWD, if you close JP2, the  components of JTAG/SWD are powered by the on-board regulator. If you open JP2, the components of JTAG/SWD are powered by the the device which is connected to J7 or J8 connector.

Regarding your question that you can download code and debug, but the LED can not toggle in standalone mode after Reset, pls check if you download code to on-chip RAM or external on-board spifi flash? You have to download code to spifi flash in order it can run standalone.

You can download the LPCOpen package from the link:

https://www.nxp.com/design/microcontrollers-developer-resources/lpcopen-libraries-and-examples/lpcop...

 

Hope it can help you

BR

XiangJun Rong

 

View solution in original post

0 Kudos
Reply
4 Replies
857 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

On LPC-Line2 board, Pls try to close JP1 and JP2, then press Reset, and check if the application code can run or not.

BR

XiangJun Rong

0 Kudos
Reply
853 Views
rulamp
Contributor III

That worked! Thanks. Now onto our board. Looking at the link2 schematic, I do not understand why JP2 needed to be set. Shouldn't the W25Q80 be powered without it? Are there any power timing considerations that need to be addressed? For example, does the flash chip need to be powered for a certain time before the LPC43S70 comes out of reset?

I can successfully program and verify the W25Q80 flash chip with an aardvark while holding the LPC43S70 RESET pin low. However, when release the RESET pin and allowing the pullup to pull it high, the program does not execute. There is no 1Hz signal on the BOOT0 pin so there is no indication that boot failed. I have probed each BOOT pin to ensure the proper settings. What else should I check?

Edit to add:
The program works when debugging so I know the code is good. All it is doing is flashing an LED so there are no peripherals getting hung up or anything.

0 Kudos
Reply
848 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Regarding the JP2 jumper, on the LPC Link2 board, there are components of JTAG/SWD, if you close JP2, the  components of JTAG/SWD are powered by the on-board regulator. If you open JP2, the components of JTAG/SWD are powered by the the device which is connected to J7 or J8 connector.

Regarding your question that you can download code and debug, but the LED can not toggle in standalone mode after Reset, pls check if you download code to on-chip RAM or external on-board spifi flash? You have to download code to spifi flash in order it can run standalone.

You can download the LPCOpen package from the link:

https://www.nxp.com/design/microcontrollers-developer-resources/lpcopen-libraries-and-examples/lpcop...

 

Hope it can help you

BR

XiangJun Rong

 

0 Kudos
Reply
824 Views
rulamp
Contributor III

Thank you. I had to keep the RESET pin low while programming the flash chip on my board. Doing that allowed for proper programming of the bin. Once programming was complete and the RESET pin was released, the chip booted form SPIFI.

0 Kudos
Reply