LPC51U68 Firmware Update Using SPI

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC51U68 Firmware Update Using SPI

327件の閲覧回数
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 返答(返信)

271件の閲覧回数
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 件の賞賛
返信

246件の閲覧回数
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 件の賞賛
返信

218件の閲覧回数
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 件の賞賛
返信

216件の閲覧回数
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 件の賞賛
返信

134件の閲覧回数
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 件の賞賛
返信