-
|
I have a problem with unlocking AVR32DA28 after I set LOCK.KEY. I set the lock by UPDI in this way: I try to remove the lock by Serial UPDI and the script but it fails: When using pymcuprog installed in a conventional non-portable Python installation, I can remove the lock with the command: From what I read in the PS. prog.py looks very promising to me, it handles all dependecies of pymcuprog without installing it in conventional way. Also is there any method on prog.py to set lock on MCU via Serial UPDI? Here is a output from console after trying to upload new code into a locked MCU: |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
|
We are already aware that prog.py does not support locking or unlocking chips. Please be patient, I work 16 hours a day 7 days a week on either the cores or work for clients and the first person who even mentioned locking and unlocking with prog.py did so like a month ago That's how long I have been aware that we never actually implemented it. Microchip has just released the DDs, and if you haven't noticed, the head of all three of my cores is completely busted and doesn't even compile blink - and I have to fix this schematic and layout for a client which eagle seems to have made absolutely impossible - all my attempts break forward and backward annotation (read "go back to your last backup and try again because you'll never fix it"). I'm on the fifth try right now. How about you try using whatever the hell you locked the chip with to unlock it? You didn't lock it with prog.py, because we don't support locking it either yet, so you must have another UPDI programmer, and it probably knows how to do a CHIPERASE to unlock the chip. Quentin, the coauthor of SerialUPDI - the useful one who actually knows python (Do you think I know python? It's only a slight exaggeration to say that stack overflow should be on the credits list ahead of me - you'll notice I've never once posted any code written for an atmega2560 - that's because my my brain only supports 16 bit address space (avr flash is word addressed) and the 17th bit would overflow the 16bit registers in my brain. I'm supposed to be able to turn two 16 bit mental registers into a 32-bit one so I could program ARM32 and x86 competently, but it doesn't seem to work right, and if you think the AVR DA errata listing is bad, you should check out the one for homo sapiens (it's a bit of a download, though, and my model year was marked NRND so I have little hope for an upgrade there. Anyway, he appears to be a more advanced model and understands python reasonably well, so we're hoping to hammer out a number of issues with serialUPDI during that time including this since we will be able to co-work in person. Now, if it's not fixed by thanksgiving, that's when you start thinking of ways to make him miss his flight home. |
Beta Was this translation helpful? Give feedback.
-
If I could, I would have done it, but of course: it doesn't work. I started an issue in the Temporarily I used portable |
Beta Was this translation helpful? Give feedback.
-
|
Yeah, jtag2updi when I was going through hell working on it because of the undocumented behavior of UPDI on 24-bit addressed devices, (took me two weeks to figure out that a direct write to 0x1000 meant something different before and after writing to a 24 bit address). I was just going mad, it did chip erase by entering nvm prog mode and programming that way (also I was just looking at his current code, and it's very clear that he knows the on-chip debugging key... but it's not in the public repo. It was leaked once in an early datasheet, but I can't find a copy of it and I am very annoyed by that). Who was the person who wanted to make a debugger for these parts though? jtag2updi has all the debug commands in it. would be very useful to whoever was taking on that nightmare of a task, then again his code is so obtuse it might not be so useful after all. And it is not valuable to have at would take seconds to extract the ocd key from soemone using an official microchip tool, that's not the barrier to OCD, the barrier is that you need to interface it with the software on the host. Yeah, I think until we sort out prog,py unlock that's your best bet - though you can probably use the version of python that we bundle. I might have code that isn't yet in head that can unlock, but not sure if it works |
Beta Was this translation helpful? Give feedback.
-
Can you please explain this command |
Beta Was this translation helpful? Give feedback.
If I could, I would have done it, but of course: it doesn't work. I started an issue in the
jtag2updiproject.Temporarily I used portable
WinPythonwithpymcuprogand now I can lock and unlock MCU via Serial UPDI.