Self Programming Avr
Posted : adminOn 6/3/2018I wrote a code (asm) which writes data to flash (self-programming). Understanding How Components Fail Wulpi Pdf Converter. Buku Yasin Dan Tahlil Pdf here. It runs on real ATTiny2313 and simulates on ATTiny2313 and ATMega162 without a problem.
But it does not want to run on real ATMega162, and even JTAG ICE mk1 debugging session does not bring me any closer to the solution. It seems like my ATMega162 ignores SPM. My settings for ATMega162: - lock bit byte=0xFF (no restrictions on anything) - enabled OCDEN, JTAGEN, EESAVE, BOR and RC The code below is an example - it does not want to clear allocated data. ATmega162 data sheet wrote: The SPM instruction that writes into the Application Flash memory section must reside in the Boot Program section.Your ATtiny has no Boot Program section (it is all just Program FLASH), so the SPM instruction can be located anywhere in FLASH.