Re: LPC552x: How to write CMPA to disable debug subdomains from application?

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

Re: LPC552x: How to write CMPA to disable debug subdomains from application?

706 Views
andrewfisher
Contributor III

------------------------------------------------------------------------------------------------------------------------

Comment moved on behalf of  @andrewfisher 

This comment was a follow up with questions regarding this post: LPC552x: How to write CMPA to disable debug subdomains from application?  The authors of this post shared the code that they used  to disable debug subdomains. 

---------------------------------------------------------------------------------------------------------------------------

There seems to be something wrong in this example.

The disable protection (full access) code simply writes 0x00000000 into the CMPA DCFG_CC_SOCU_PIN register and DCFG_CC_SOCU_DFLT registers. As far as I can see from the UM11126.pdf (pg 1135) The top 16 bits should always be the inverse of the bottom 16. I guess this may work (as it seems to be the way the chip is shipped) but is not as documented.

The enable protection code places 0xffff0000 into both registers which as far as I can see selects the option to enable debug if authentication has taken place. It is not a full full enabling of protection.

So it looks to me (based on pg1134/5 in the user manual) that these should be the values (though what to do with reserved bits is unclear)

 

 

 

 

// Ful disable (top 16 bits = inverse of bottom 16 bits)
DCFG_CC_SOCU_PIN  = 0xfd0002ff;
DCFG_CC_SOCU_DFLT = 0xfd0002ff;

// Authenticated access only (top 16 bits = inverse of bottom 16 bits)
DCFG_CC_SOCU_PIN  = 0xffff0000;
DCFG_CC_SOCU_DFLT = 0xffff0000;

// Full access (top 16 bits = inverse of bottom 16 bits)
DCFG_CC_SOCU_PIN  = 0xfd0002ff;
DCFG_CC_SOCU_DFLT = 0xffff0000;

 

 

 

 

 

In addition to this I can't find anywhere that actually explains HOW to use the debugger to authenticate when in this mode. Where do the certificates go in the MCUXpresso IDE etc?

 

This is all very worrying when the documentation is not completely clear (there are quite a few fields in the CMPA and CFPA with no documentation I can find) and one wrong step can brick the device.

 

Labels (1)
0 Kudos
Reply
0 Replies