LPCScrypt fails on LPC43S57

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

LPCScrypt fails on LPC43S57

691 Views
thomas_kuelz
Contributor I

Hello,

I want to program my LPC43S57 Processor with LPCScrypt.

When I want to erase the internal Memory the program confirm the erase but the blank check send me a not Blank message.

To flash a firmware was also canceld with a verify error.

C:\NXP\LPCScrypt_2.0.0_831\bin>lpcscrypt.exe queryPart
partID = 0xa001c860 0
decode = LPC43S57: BankA 512KB, BankB 512KB
Core Clock = 180000000

C:\NXP\LPCScrypt_2.0.0_831\bin>lpcscrypt.exe queryFlash
Number of Flash Devices = 3
Name = BankA
Base = 0x1a000000
Size = 0x80000
Page = 0x1000
Sector = 8-64KB
Blank = 0xff
Buffer = 0x8000
Name = BankB
Base = 0x1b000000
Size = 0x80000
Page = 0x1000
Sector = 8-64KB
Blank = 0xff
Buffer = 0x8000
Name = EEPROM
Base = 0x20040000
Size = 0x3f80
Page = 0x80
Sector = NA
Blank = 0x0
Buffer = 0x8000

C:\NXP\LPCScrypt_2.0.0_831\bin>lpcscrypt.exe erase all
Erasing BankA ... completed in 0.210s
Erasing BankB ... completed in 0.110s
Erasing EEPROM ... completed in 0.260s

C:\NXP\LPCScrypt_2.0.0_831\bin>lpcscrypt.exe blankCheck BankA
Not blank at 0x1a000000

C:\NXP\LPCScrypt_2.0.0_831\bin>lpcscrypt.exe erase BankA
Erasing BankA ... completed in 0.210s

C:\NXP\LPCScrypt_2.0.0_831\bin>lpcscrypt.exe blankCheck BankA
Not blank at 0x1a000000

C:\NXP\LPCScrypt_2.0.0_831\bin>lpcscrypt.exe program BootloaderA9Start.bin BankA

LPC_Error Verify Error 0xb 0x1a000040
Error: <Command line>:1: Verify Error 0xb 0x1a000040
   Script cmd:      program BootloaderA9Start.bin BankA
   Last target cmd: =programPage 1a000000 2
Terminated with errors

When I use a LPC4357 (without S) Processor the erase and flash process work well.

It is possible to flash LPC devices with secure element on LPCScrypt?

 

Best regards,

Thomas

0 Kudos
3 Replies

553 Views
bernhardfink
NXP Employee
NXP Employee

The LPC43S57 is exactly the same silicon as the LPC4357, only with security enabled.

I can't imagine that the problem can be solved by performing the procedure on slower speed.

Did you do already a test with it?

In my opinion it must have something to do with the fact, that the boot ROM in the S version behaves differently.

Which board(s) do you use for the test?

Regards,

Bernhard.

0 Kudos

553 Views
thomas_kuelz
Contributor I

Thank you for this helpful response.


It is possible to flash the firmware in the LPC S-Version when I change the clock speed to slow.
But it´s work not well every time.

When I send the "clockslow" command, the program LPCScrypt stop with working.
I have to start two or three times the LPC with LPCScrypt, before he accept the "clockslow" command.

After that it is possible to flash the firmware complitly in to the LPC-processor.

Regards,

Thomas

0 Kudos

553 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Hi Thomas,

It seems pretty clear from your report that the erase operation is failing. It would be interesting to take a look at the memory values and see if there is a consistent fail location.

You can examine memory within LPCScrypt using:

LPCScrypt memdisplay banka
0x1a000000 ffffffff ffffffff ffffffff ffffffff
0x1a000010 ffffffff ffffffff ffffffff ffffffff
0x1a000020 ffffffff ffffffff ffffffff ffffffff
0x1a000030 ffffffff ffffffff ffffffff ffffffff
0x1a000040 ffffffff ffffffff ffffffff ffffffff
0x1a000050 ffffffff ffffffff ffffffff ffffffff
0x1a000060 ffffffff ffffffff ffffffff ffffffff
0x1a000070 ffffffff ffffffff ffffffff ffffffff
0x1a000080 ffffffff ffffffff ffffffff ffffffff
0x1a000090 ffffffff ffffffff ffffffff ffffffff
0x1a0000a0 ffffffff ffffffff ffffffff ffffffff
0x1a0000b0 ffffffff ffffffff ffffffff ffffffff
0x1a0000c0 ffffffff ffffffff ffffffff ffffffff
0x1a0000d0 ffffffff ffffffff ffffffff ffffffff
0x1a0000e0 ffffffff ffffffff ffffffff ffffffff
0x1a0000f0 ffffffff ffffffff ffffffff ffffffff
Successful

You can add an options length parameter to explore further into the flash e.g. memdisplay banka +0x400.

One thing you could try is programming (erasing) flash at a slower clock speed. LPCScrypt has a command to reduce the default clock as below:


LPCScrypt clockslow
Successful

This slows the clock to 120MHz

LPCScrypt querypart
partID = 0xa001ca60 0
decode = LPC43S37: BankA 512KB, BankB 512KB
Core Clock = 120000000
Successful

At this lower speed, repeat the program operation (and/or erase) and see if this works correctly.

Another thought would be to examine the power to the board. If you are using a USB hub consider connecting directly to the host or powering the hub separately.


Please can you report your results to this thread.

LPCScrypt supports a number of operations, the full list can be seen via the option.

LPCScrypt helpadvanced

Some of the low level operations may assist here.

Finally, if all of the above fails to solve this issue, you could make use of MCUXPresso IDE to perform a mass erase of this part. While intrinsically this will be the same operation using internal ROM API calls, they are performed at an even slower clock speed on this part so may deliver better results.

I hope this helps,

Yours,

MCUXpresso IDE Support

0 Kudos