I'm currently dealing with a rather perplexing problem with my AVRISP-MKII clone programmer, specifically to do with the whole EEPROM space erase command handler. While all the other functions of my programmer work as they are intended, the Erase EEPROM command doesn't work, and I can't figure out why.
According to the datasheet, I need to load in the EEPROM ERASE command (0x30) into the NVM controller's command register, then execute the erase by setting the CMDEX bit. I won't bore everyone with the ins-and-outs of making a PDI programmer, but suffice to say that essentially the programmer gets complete access to the internal registers of the AVR just like the AVR does, and so my programmer has to follow the same sequence with the target as the target does with itself during self programming.
I know that my algorithm is correct, as the CHIP ERASE (0x40) command has the same procedure and works perfectly. This is why I'm confused; I've verified my algorithm via the similar command, yet the ERASE EEPROM command succeeds but does nothing.
Using my AVR ONE! I can see that it is possible for the command to work, as the AVR ONE! can erase the EEPROM memory space without any issues - so it's my code or their documentation that is wrong.
Has anyone experimented with the XMEGA's ERASE EEPROM command, and who can tell me for certain if it works as the datasheet indicates it does?
- Dean :twisted: