LPC55 BootLoader Disable / Enable

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

LPC55 BootLoader Disable / Enable

1,594 Views
Attilio
Contributor I

Good morning.

I tried the LPC55 bootloader resident on its flash and everything was ok.

I mean that the FlashMagic tool, it's an easy and quick way to program the micro controller.

However, in these condition, it's possible (very easily) to read its content. Always with FlashMagic tool.

The question is that I'd like to write my personal bootloader but by a simple pin state (ISP pin) it's possible to read all flash memory bytes.

In these condition it's enough to change the external pin to violate the internal code.

Is there any method where it's possible to disable or enable the LPC55 bootloader ? 

 

 

0 Kudos
Reply
6 Replies

1,554 Views
bressan
Contributor III

You have to set some bits in CFPA / CFMA for code read protection. But unfortunately I don't know how to write in this registers.
See UM11126 chapter 7 for more details.

 

0 Kudos
Reply

1,537 Views
Attilio
Contributor I

Hi Bressan thank you for your support.

I'm going to have a look too to the manual.

 

Attilio

0 Kudos
Reply

1,579 Views
jay_heng
NXP Employee
NXP Employee

LPC55 bootROM cannot be bypassed, As ROM needs to do some chip system init job, not only booting app.

0 Kudos
Reply

1,560 Views
Attilio
Contributor I

Hi  Jay Heng

Thank for your answer.I understand what you mean.

But with this condition, can you suggest me how I can prevent the flash reading ?

Because by this tool, seem to be always possible. 

 

Thank you in advance.

Attilio

0 Kudos
Reply

1,548 Views
jay_heng
NXP Employee
NXP Employee

You may need to enable PRINCE encryption here

  1. Generate key code via PUF

blhost.exe -p COMx -- key-provisioning enroll 

blhost.exe -p COMx -- key-provisioning set_user_key 3 <path to the sbkek.bin> // key code for SB. Sbkek.txt is used by elftosb.exe, sbkek.bin is used by PUF and should be inverted order to sbkek.txt 

blhost.exe -p COMx -- key-provisioning set_key 7 16  // prince region0 key code,       <set_key> <type> <size> 

blhost.exe -p COMx -- key-provisioning set_key 8 16  // prince region1 key code, 

blhost.exe -p COMx -- key-provisioning set_key 9 16  // prince region2 key code 

blhost.exe -p COMx -- key-provisioning read_key_store key_store0.bin // read out the all key code 

//power-on reset

  1. Burn key code into FFR

blhost.exe -p COMx -- key-provisioning write_key_store key_store.bin 

blhost.exe -p COMx -- key-provisioning write_key_nonvolatile 0     <write_key_nonvolatile> [memoryID] 

  1. configure prince encryption region: 

blhost.exe -p COMx -- fill-memory 0x20034000 4 0x50000000 

blhost.exe -p COMx -- fill-memory 0x20034004 4 0x0/0x40000/0x80000 // prince region0/1/2 key code 

blhost.exe -p COMx -- fill-memory 0x20034008 4 0x1200 

blhost.exe -p COMx -- configure-memory 0 0x20034000      //(Customer Manufacturing/Factory Configuration Area (CMPA)) 

0 Kudos
Reply

1,538 Views
Attilio
Contributor I

Thanks Jay

I'm going to have a look to your proposal.

 

Attilio

0 Kudos
Reply