Created Fri, 19 Aug 2011 13:53:00 +0000 by wa1hco
Fri, 19 Aug 2011 13:53:00 +0000
I'm getting the verification error when uploading any program to a my new UNO32. Some posts referred to "known error" but I didn't see a solution. This occurs with mpide 0022-chipkit-linux32-20110619 and also with the latest mpide under Windows. The same mpide uploads correctly to an Arduino Uno. There's got to be a simple fix for this but needs some ideas.
thanks, jeff
Fri, 19 Aug 2011 21:00:30 +0000
This has been reported by a couple of other people. We are investigating the cause of the problem and how to resolve it.
The current best candidate explanation is that it is a timing problem in the boot loader. The NVM library that the bootloader was built with has been superceeded by a newer library with different timing. If this is the cause, it probably means that the pic32 chip on your board is close to the spec'd flash timing limits and the NVM library isn't allowing enough time for an erase/write operation to complete.
We should know in the next day or so.
Gene Apperson Digilent
Sat, 20 Aug 2011 16:02:31 +0000
Jason Kajita at Microchip built a boot loader with the newer version of the NVM, and we tested it on a board that was exhibiting this problem, with the result that the problem went away. We then reloaded the original boot loader on that board, and the problem came back.
We're pretty sure that this will fix the problem. We need to to a bit more testing to make sure that there weren't any regressions before we release it. This new boot loader will be available on the Digilent web site (and of course can be built from the source on github). People who have the ability to update the boot loader in the field will be able to fix the problem themselves. For others, we'll probably have to RMA the boards and replace them.
Gene Apperson Digilent
Mon, 22 Aug 2011 15:02:28 +0000
Nice that was quick. Good work guys.
Tue, 23 Aug 2011 03:48:24 +0000
I'm roadblocked and am having a similar issue:
mpide-0022-chipkit-linux32-20110619
Binary sketch size: 5368 bytes (of a 126976 byte maximum)
avrdude: verification error, first mismatch at byte 0x1000
0x00 != 0xff
avrdude: verification error; content mismatch
Tue, 23 Aug 2011 04:03:56 +0000
Same Issue with mpide-0022-linux32-20110821-test
avrdude: verification error, first mismatch at byte 0x0180
0x00 != 0xff
avrdude: verification error; content mismatch
What does updating the Bootloader look like?
https://github.com/chipKIT32/pic32-Arduino-Bootloader
Tue, 23 Aug 2011 04:10:44 +0000
A couple of questions about this
Does your program work anyway? All of the time I have seen this the program still works even though there is a reported error.
Second question, what version of the bootloader do you have
To find out, open a terminal window at 115200, then hit reset and type "!!!" right away, then type "?", it will give you all of the info about the bootloader
Mark
Tue, 23 Aug 2011 04:29:15 +0000
Does your program work anyway? All of the time I have seen this the program still works even though there is a reported error.
nope it doesn't work. blink, updating the pin.
Second question, what version of the bootloader do you have To find out, open a terminal window at 115200, then hit reset and type "!!!" right away, then type "?", it will give you all of the info about the bootloader
!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!
Explorer stk500V2 by MLS V1.0
Bootloader>? CPU stats
Explorer stk500V2 by MLS V1.0
Compiled on = Apr 24 2011
CPU Type = 32MX320F128H
GCC Version = 3.4.4 Microchip MPLAB C Compiler for PIC32 MCUs v1.11(A)-20100504
DEVID = 5090A053
Bootloader>
Tue, 23 Aug 2011 07:06:51 +0000
There is a known issue with the PIC32MX3XX/4XX series parts that affects the flash programming timing. If your board is affected by this problem, there is (or soon will be) a version of the boot loader available with a newer version of the NVM library that adjusts the timing.
If you are getting this error when you try to program a known working sketch (such as blink), and the sketch fails to load and run properly, you are probably affected by this problem. If it's reporting the mismatch error, but the sketch runs, it's another problem.
Reprogramming the board with the new boot loader requires the use of an external Microchip device programmer, such as the PICkit3. Unless you have some kind of programmer like that (or are interested in buying one) you won't be able to do it yourself.
Gene Apperson Digilent
Sun, 28 Aug 2011 21:56:07 +0000
Hi Gene,
There is a known issue with the PIC32MX3XX/4XX series parts that affects the flash programming timing. If your board is affected by this problem, there is (or soon will be) a version of the boot loader available with a newer version of the NVM library that adjusts the timing.
Can you give me details on the timing issue? Mark has a problem with a board that can't be programmed by the USB Bootloader (which does not use MAL, but raw routines that were based on MAL), and I'm wondering if I have to make the same change there...
Thanks.
-- Rich
Mon, 29 Aug 2011 00:44:00 +0000
Can you give me details on the timing issue? Mark has a problem with a board that can't be programmed by the USB Bootloader (which does not use MAL, but raw routines that were based on MAL), and I'm wondering if I have to make the same change there...
Ah, Mark had the fix already, and we switched to using it and now it's all working! Thanks!
Mon, 29 Aug 2011 07:43:23 +0000
I got it working on 2 out of 4 boards. All of them have a pic32460F512L, all are the same silicon revision number
DEVID = 50978053 Silicon Rev = 05 - B4 Revision CPU signature = 00 97 80 53
The ones with a date code of 1112HCC do NOT work, the other 2 do, as below
32MX460F512L 801/PT 0947SQA works 32MX460F512L 801/PT 0850KU0 works 32MX460F512L 801/PT 1112HCC does NOT work, this is the CPU on the MirkoElektronika PIC32 mikroMedia Board
I have Jasons nvm code, I have doubled he delay, and it did not help.
Very important detail
The ERASE works, the PROGRAM does not
HOWEVER, it WILL work the first time after programming the botloader with MPLAB-X and an ICD-3
Mark
Mon, 29 Aug 2011 12:38:35 +0000
BTW, just for the record, I found this reference to the issue in the Microchip site from February, 2011: [url]http://support2.microchip.com/KBSearch/KB_StdProb.aspx?ID=SQ6UJ9A01008J[/url]
Earlier samples (B4) usually worked without the delay, but later samples (B6) need this delay to work.
Unfortunately, old datasheets (and old libraries) have neither hide nor hair of this reference, so it seems lots of software will stop working when folks move to new parts. :-(
However, if you dig deeper (knowing what you are looking for), you can find a later datasheet that does have it, such as this one updated December, 2010: [url]http://ww1.microchip.com/downloads/en/DeviceDoc/61121E.pdf[/url]
Mon, 29 Aug 2011 16:26:57 +0000
Oh, this might be bad... In the Microchip forums, one guy had to drop his clock rate while programming flash -- the delay alone would not work... See: [url]http://www.microchip.com/forums/m582171.aspx[/url]
I'm having trouble seeing how Microchip can claim this is a "data sheet clarification" when the old datasheet did not require the delay, and the old pic32 peripheral library did not implement it, and nobody's code that relied on either of those has it. :-(
-- Rich
Mon, 29 Aug 2011 23:27:26 +0000
Rich
I have spent 2 days working on this and finally have it solved. My serial bootloader worked and the USB bootloader did not. So I started comparing them. Turns out I had comments from mikroelctronica and extra code to support that particular chip and do word write instead of page write. I copied that code over and presto, it worked. I have the bootloader set up so that it only does the word write for the mikroelctronica boards. I have it narrowed down to date codes as to which ones screw up and which ones dont.
Mark
Tue, 30 Aug 2011 02:47:28 +0000
I have the bootloader set up so that it only does the word write for the mikroelctronica boards.
Would it be safer to always do word writes for all PIC32's? I mean, we're going to see the new 11XX date codes everywhere soon, and they'll all break if the Microchip forum is any kind of indication... :-(
Tue, 30 Aug 2011 14:30:11 +0000
Got my UNO today :) followed instructions ! loaded 'blink' ( seems to be loaded anyway as LD4 flashing seconds ) :cry: however seems i have the same verification error ! with exact same stats report as previous post, ( my last line was bootload Huh? ) so what is the cure pls ? I do not have pickit3 only 2 ( one reason to go with uno )
Tue, 30 Aug 2011 16:40:32 +0000
The product page for the Uno32 on the Digilent web site has the hex file for the new boot loader in the support documents section at the bottom of the page. This boot loader corrects the problem for some (possibly all) affected Uno32 boards.
I believe that you can use a PICkit2 to program PIC32MX3XX series devices. Program this new boot loader image into your board.
Gene Apperson Digilent
Wed, 31 Aug 2011 12:34:19 +0000
The product page for the Uno32 on the Digilent web site has the hex file for the new boot loader in the support documents section at the bottom of the page. This boot loader corrects the problem for some (possibly all) affected Uno32 boards. I believe that you can use a PICkit2 to program PIC32MX3XX series devices. Program this new boot loader image into your board. Gene Apperson Digilent
Can you please publish instructions on how to accomplish this? Also can a PICkit3 be used?
The current MPIDE offers a selection of AVR bootloaders ,but no PIC.
Thanks David Garrison
Wed, 31 Aug 2011 12:48:54 +0000
Gene, Yes the latest boot loader fixed the verification error :) now I just have to learn arduino C :? thanks. (pickit2 has to have latest device files) Les
Wed, 31 Aug 2011 17:11:40 +0000
Can you please publish instructions on how to accomplish this? Also can a PICkit3 be used? The current MPIDE offers a selection of AVR bootloaders ,but no PIC.
David,
Good idea. I'll try to get something written up and posted on the wiki in the next day or so.
The boot loaders are in a separate repository under the chipKIT32 project on github.
Also, the hex files for the boot loaders currently being used in production will be on the Digilent web site in the support documents section of the product pages for the boards. This boot loader won't necessarily match the current ones on github, but they will be the ones currently being loaded on the boards at the factory.
Gene Apperson Digilent
Tue, 20 Sep 2011 17:43:59 +0000
Good idea. I'll try to get something written up and posted on the wiki in the next day or so.
Hi
I tried to find on wiki page for the "new bootloader flashing procedure using a PICkit3", but I did not found it.
Can anyone help me on how to do it? I just bought 21 Uno32 cards to be used in class and 50% of them present the "avrdude: verification error".
Regards,
Thu, 22 Sep 2011 12:06:57 +0000
Assuming you have a pickit3 and the hex file (from the digilent website), you'll want to connect the pickit3 to the Uno32 -- be sure to get pin 1 right (I actually put a header on the underside of the Uno32 to do this -- you can get by without solder if you hold it flexed a bit). Then make sure both the pickit3 and Uno32 have USB connections attached (the Uno32 gets power from its own USB, not from the pickit3). Then run the Pickit3 Programmer application (from the microchip website), select the appropriate device (PIC32MX320F128H), and then click "Auto Import Hex + Write Device". Browse to the hex file and click OK. That should do it for you.
Thu, 22 Sep 2011 16:26:56 +0000
Assuming you have a pickit3 and the hex file (from the digilent website), you'll want to connect the pickit3 to the Uno32 -- be sure to get pin 1 right (I actually put a header on the underside of the Uno32 to do this -- you can get by without solder if you hold it flexed a bit). Then make sure both the pickit3 and Uno32 have USB connections attached (the Uno32 gets power from its own USB, not from the pickit3). Then run the Pickit3 Programmer application (from the microchip website), select the appropriate device (PIC32MX320F128H), and then click "Auto Import Hex + Write Device". Browse to the hex file and click OK. That should do it for you.
Problem solved! Thanks for your help!
Although initially I had a "communications error: could not query ptg mode" using the PICkit3 for the first time (something that I solved by opening MPLAB and updating PICkit3 firmware), I finally was able to put all my cards working properly.
Thanks once again...
Hélio Mendonça