SAML11 chip erase key (CEKEY) doesn't work

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm testing the transition between different debug access levels (DAL) of SAM L11 Xplained Pro. According to the datasheet, leveling up DAL requires executing the corresponding chip erase command with a specific chip erase key (CEKEY) defined in NVM BOCOR Row.

 

I succeeded in changing from DAL0 to DAL2 with the default CEKEY2 (all 1s) by using the Programming Device in Microchip Studio IDE (as shown in the below graph). In this case, I don't need to provide any CEKEY2 and the IDE will automatically do it.

 

However after I changed CEKEY2, for example, 0x22222222 22222222 22222222 22222222, chip erase failed. I am not very sure how to provide the new CEKEY2, but feel it might be the box right after the erase button. So I tried to provide CEKEY2 here but an error was jumped out saying "key too short". I guess I may provide the key in a wrong way.

(BTW, the DAL can still be recovered to DAL2 by executing CE0->CE1, so I can keep doing this test.)

 

 

Could anyone give me some insights of how to change the DAL with a modified CEKEY? Thanks.

This topic has a solution.
Last Edited: Tue. Feb 23, 2021 - 04:31 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

If you look at the atprogram doc, the key seems to be given in 8 bit sets:

PS C:\Program Files (x86)\Atmel\Studio\7.0\atbackend> .\atprogram help chiperase

...

  atprogram -t edbg -i swd -d atsaml11e16a chiperase -et ce0 -ek 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    Perform a non-secure chiperase on an atsaml11e16a.
    

 

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you so much. 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22 works.