pymcuprog icon indicating copy to clipboard operation
pymcuprog copied to clipboard

Corrupted flash memory writes for Atmega328p with ISP interface

Open araqioui opened this issue 10 months ago • 4 comments

While trying to execute :

pymcuprog write  -f executable.hex --erase --verify -t atmelice -d atmega328p -i isp

The command always fails at flash memory verification step:

Connecting to any atmelice
Connected to Atmel-ICE CMSIS-DAP from ATMEL (serial number J42700040265)
Debugger firmware version 1.45.7
Debugger hardware revision 0
pymcuprog.nvm - WARNING - 
pymcuprog.nvm - WARNING - AVR-ISP/SPI stack is in Alpha state
pymcuprog.nvm - WARNING - Expect some features to be missing
pymcuprog.nvm - WARNING - 
Pinging device...
Ping response: 1E950F
Erasing device before writing from hex file...
Writing from hex file...
Writing flash...
Verifying flash...
pymcuprog.programmer - ERROR - Verify failed for flash memory:
pymcuprog.programmer - ERROR - Verify mismatch starting at location 0x000000: 0x0C vs 0xFF (is the memory section erased?)
Verification failed!

The mismatch location address is not always the same.

On the other hand, while trying to flash using MPLAB IPE with the same HW setup, and the same hex file, it always passes.

araqioui avatar Apr 16 '24 15:04 araqioui