cannot unlock AVR128DA32 with pymcuprog

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

I have used pymcuprog to program flash, userrow and eeprom without any problem. Now, I tried to lock the device by writing to the lockbits. This works too, I can't access the cpu anymore as expected.

However, I'm not able to remove the lock anymore. I thought that an erase together with -U should work. I'm getting an error and the device stays locked :-(

 

$ pymcuprog erase  -t uart -u /dev/ttyUPDI -d avr128da32 -U

pymcuprog.serialupdi.link - WARNING - Check failed
pymcuprog.serialupdi.application - ERROR - Timeout waiting for device to unlock
pymcuprog.nvm - ERROR - Device is locked.
Error:
Failed to enter NVM programming mode: device is locked
pymcuprog.serialupdi.application - ERROR - Timeout waiting for device to unlock
pymcuprog.nvm - ERROR - Device is locked.
Error:
Failed to enter NVM programming mode: device is locked
Pinging device...
pymcuprog.pymcuprog_main - ERROR - Error with st_ptr
Done.

 

This topic has a solution.
Last Edited: Wed. Oct 13, 2021 - 09:11 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

sorry to follow my own post, I have just found the solution:

 

$ pymcuprog erase  -t uart -u /dev/ttyUPDI -d avr128da32 --chip-erase-locked-device

 

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


Looks like the course is really paying off for you!

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

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

eauth wrote:
--chip-erase-locked-device

Indeed - a "normal" erase uses the NVM key and then flash erase once in.  When its locked, the chip-erase key is the only way in.