LPC54605 firmware update by MSC failed

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

LPC54605 firmware update by MSC failed

1,506 Views
37139023
Contributor I

I am working with a LPC54605 which can accept firmware updates using MSC mode. but, when I drag and drop my firmware.bin to LPC54605 u disk,then reset the board,it do not run.

But when I use Jlink to download the fireware,it works. why? Is there anything I didn't do right?

0 Kudos
8 Replies

1,398 Views
fcopetti
Contributor I

Hi Alice,

I'm having the same problem on lpc54616 . using the same binary over SWD and USB MSC leads to different behavior, SWD works while MSC doesn't.

The procedure i'm folling for the update is the following (in linux OS

1) boot the board with ISP pins set for MSC mode

2) mount the uC partition 

3) delete the file "firmware.bin"

4) copy the binary file changing the name to firmware.bin

5) unmount the partition (tried also without unmouinting) 

6) power cycle.

Are these the right steps ?

Thanks and best regards,

Filippo

0 Kudos

1,396 Views
converse
Senior Contributor V
0 Kudos

1,384 Views
fcopetti
Contributor I

Hi @converse,

Indeed, the binary creation and checksum procedure was commented out in the build step. 

I've added it but still no luck, the FW still doesn't work after the update.

Please advice? I'm out of ideas.

Best regards,

Filippo

0 Kudos

1,380 Views
fcopetti
Contributor I

I have an update. I first erased the flash via SWD (also blank checked), then restarted the system in ISP and updated the binary image. I've restarted the system and performed a verify against the same binary and here the output:


Verifying 'E1820_BareMetal_Project.bin' Binary section 0 at 0x00000000 len 0xDD50
Opening flash driver LPC5460x_512K.cfx
Sending VECTRESET to run flash driver
Flash device supported (512KB = 16*32K at 0x0)
( 0) Comparing Flash against file at 0x00000000
Flash file verification failed at (at least) these memory addresses
@00000000 - file 20028000 '... ' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x00000004
@00000004 - file 00000161 'a...' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x00000008
@00000008 - file 000001E9 '....' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x0000000C
@0000000C - file 000001EB '....' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x00000010
@00000010 - file 000001ED '....' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x00000014
@00000014 - file 000001EF '....' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x00000018
@00000018 - file 000001F1 '....' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x0000001C
@0000001C - file DFFD74FE '.t..' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x00000020
@00000020 - file 00000000 '....' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x00000024
@00000024 - file 00000000 '....' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x00000028
@00000028 - file 00000000 '....' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x0000002C
@0000002C - file 000001F3 '....' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x00000030
@00000030 - file 000001F5 '....' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x00000034
@00000034 - file 00000000 '....' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x00000038
@00000038 - file 000001F7 '....' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x0000003C
@0000003C - file 000001F9 '....' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x00000040
@00000040 - file 0000B549 'I...' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x00000044
@00000044 - file 0000B551 'Q...' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x00000048
@00000048 - file 0000B559 'Y...' != flash FFFFFFFF '....'
( 0) Comparing Flash against file at 0x0000004C
@0000004C - file 0000B561 'a...' != flash FFFFFFFF '....'
Closing flash driver LPC5460x_512K.cfx
(100) File matches flash.
Read 0x114748 bytes in 4982ms (about 227kB/s) - verify FAILED
(100) Target Connection Failed
Unable to perform operation!
Command failed with exit code 1

for some reason the flash is still blank! do I miss something in the procedure? 

BR.

0 Kudos

1,365 Views
fcopetti
Contributor I

I found what was wrong.

In the update procedure, since I had no control over the reset pin, i was power cycling the board and this was leading to FW corruption. 

I wired a reset button first and a GPIO later and this solved the issue, just resetting the uC instead of powercycling the system.

Thanks for the help. 

Best regards,

Filippo

0 Kudos

1,456 Views
37139023
Contributor I

HI,Can anyoneelse help me?

0 Kudos

1,499 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

What about your firmware? 

Your project is probably configured semihosting printf : See section 15.4, "What is Semihosting?" (and in particular section 16.4.5 Semihosted printf and Debugging"), of the MCUXpresso IDE User Guide for details. For example printf to console, not UART.

 

Regards,

Alice

0 Kudos

1,484 Views
37139023
Contributor I

Hi,

Thank you for your reply。

Firmware is just a simple flash example. Does firmware need safe mode firmware? How to make it safe mode?

0 Kudos