When using Flowcode AVR to program your AVR device you may get a warning after programming stating "verification error" and "content mismatch".
This problem can be solved by checking a number of different causes.
a) If you have a large array of 256 bytes or larger that is initialised to 0, 255 or completely uninitialised then this may cause programming problems. A simple work around is to initialise to a different value or change the size of the array
b) If you are using custom hardware or a 20MHz device then you may be programming the device too slowly via the programming tool. To change the programming rate goto your "Flowcode AVR V4\Tools\MX_bats" folder, right click the avrc.bat file and select edit. Change the lines that start "@SET AVRDUDEcmd" so that there is a "-B 6" before the -c. The 6 is the delay in us between programming bytes. The default setting is defined by your programming tool but is normally around 8us.
You should end up with something like this.
@SET AVRDUDEcmd="%~dp0..\AVRDUDEusb\avrdude.exe" -p %2 -P %DUDEPort% -B 6 -c %Programmer% -U flash:w:%5
@SET AVRDUDEcmd="%~dp0..\AVRDUDEusb\avrdude.exe" -p %2 -P %DUDEPort% -B 6 -c %Programmer% -u
This problem can be solved by checking a number of different causes.
a) If you have a large array of 256 bytes or larger that is initialised to 0, 255 or completely uninitialised then this may cause programming problems. A simple work around is to initialise to a different value or change the size of the array
b) If you are using custom hardware or a 20MHz device then you may be programming the device too slowly via the programming tool. To change the programming rate goto your "Flowcode AVR V4\Tools\MX_bats" folder, right click the avrc.bat file and select edit. Change the lines that start "@SET AVRDUDEcmd" so that there is a "-B 6" before the -c. The 6 is the delay in us between programming bytes. The default setting is defined by your programming tool but is normally around 8us.
You should end up with something like this.
@SET AVRDUDEcmd="%~dp0..\AVRDUDEusb\avrdude.exe" -p %2 -P %DUDEPort% -B 6 -c %Programmer% -U flash:w:%5
@SET AVRDUDEcmd="%~dp0..\AVRDUDEusb\avrdude.exe" -p %2 -P %DUDEPort% -B 6 -c %Programmer% -u