LPC51U68 Firmware Update Using SPI

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC51U68 Firmware Update Using SPI

715 次查看
CKONG
Contributor I

I wants to use an onboard MCU to update the firmware of LPC51U68 using SPI interface.

i cannot find any documentation that outline the SPI ISP commands and procedures to do firmware updating.

My understanding is when first enter ISP mode, MCU need to need to send SH_CMD_PROBE to select SPI interface.

Then MCU can start using SH_CMD_WRITE_PAGE to write firmware into flash.

After update completed , MCU can send BOOT command to boot to new firmware.

 

My questions:

 

  1. Is SH_CMD_WRITE_PAGE the correct command to use?
  2. What should the pagenum for the first 256 bytes of the firmware? Page number 512?
  3. Does MCU need to erase the page before writing?
  4. Any steps I missed?
0 项奖励
回复
5 回复数

659 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @CKONG 

Recommend you refer to https://www.nxp.com.cn/docs/en/application-note/AN12378.pdf  

Pay attention, there is LPC4332 on LPC51u68 board.

MCU need to erase the page before writing.

You can contact us if still have question after referring to the above AN.

 

BR

Alice

 

0 项奖励
回复

634 次查看
CKONG
Contributor I
Dear Alice,

The app note you linked is using SBL. We do not have SBL in LPC51U68.
We can only use ISP mode for firmware updating.
Can you point me to the app note that use ISP mode?

Best Regards,
CK
0 项奖励
回复

606 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @CKONG 

Sorry if using ISP-SPI mode updating firmware, there is no host side tool.

You can make by yourself. And how about using ISP-UART mode? If yes, we can use Flash magic tool to update. About detail please refer to https://community.nxp.com/t5/LPC-Microcontrollers-Knowledge/Flash-Magic-Programing-LPC/ta-p/1152763  

 

BR

Alice

0 项奖励
回复

604 次查看
CKONG
Contributor I

Dear Alice,

The LPC is supposed to be updated by another on-board MCU on the field by end user.

We should not expect end user to open up the product and do a MagicTool update.

Since there are so many SPI ISP mode SH_CMD_xxx commands available, can you tell me how to use them to update firmware to LPC?

 

Best Regards,

CK

0 项奖励
回复

522 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @CKONG 

I have checked, sorry there isn't a official application using ISP-SPI.  

Please refer to the SPI mode commands in User Manual.

4.8 I2C/SPI ISP mode commands, data, and responses

 

BR

Alice

0 项奖励
回复