AVR: Clear EIND on system start-up
For AVR chips (Atmega2560) Program Counter register larger than 16 bits EIND represents the most significant byte that is used for EICALL and EIJMP instructions. Setting of EIND is normally managed by compiler, but I have seen a situation when for first 64K flash segment compiler didn't set EINT explicitly. Thus setting EIND at system startup makes sure we are safe.
parent
9a4a06bf
Please register or sign in to comment