parameters: (self, instruction)
docstring: Execute an AVR instruction on the core
  
          :param instruction: instruction to execute
          :return:
docstring_summary: Execute an AVR instruction on the core
docstring_tokens: Execute an AVR instruction on the core
function: def execute_instruction(self, instruction):
          """
          Execute an AVR instruction on the core
  
          :param instruction: instruction to execute
          :return:
          """
          value = 0x04
          self.logger.info("Write 0x%02X to CTRLA", value)
          status = self.protocol.memory_write(Avr8Protocol.AVR8_MEMTYPE_OCD, 0x08, value)
          self.logger.info("%s", status)
  
          self.logger.info("Write 0x%04X to ALTINST", instruction)
          status = self.protocol.memory_write(Avr8Protocol.AVR8_MEMTYPE_OCD, 0x10, instruction)
          self.logger.info("%s", status)
  
          # Write CS addr 4 (OCD RESTART)
          self.logger.info("OCD RESTART")
          status = self.protocol.memory_write(Avr8Protocol.AVR8_MEMTYPE_CS, 0x04, (1 << 1))
          self.logger.info("%s", status)
          while True:
              status = self.protocol.memory_read(Avr8Protocol.AVR8_MEMTYPE_CS, 0x05, 0x01)
              self.logger.info("waiting for stopped...(0x%02X)", status)
              if status:
                  break
              time.sleep(0.001)
function_tokens: def execute_instruction ( self , instruction ) : value = 0x04 self . logger . info ( "Write 0x%02X to CTRLA" , value ) status = self . protocol . memory_write ( Avr8Protocol . AVR8_MEMTYPE_OCD , 0x08 , value ) self . logger . info ( "%s" , status ) self . logger . info ( "Write 0x%04X to ALTINST" , instruction ) status = self . protocol . memory_write ( Avr8Protocol . AVR8_MEMTYPE_OCD , 0x10 , instruction ) self . logger . info ( "%s" , status ) # Write CS addr 4 (OCD RESTART) self . logger . info ( "OCD RESTART" ) status = self . protocol . memory_write ( Avr8Protocol . AVR8_MEMTYPE_CS , 0x04 , ( 1 << 1 ) ) self . logger . info ( "%s" , status ) while True : status = self . protocol . memory_read ( Avr8Protocol . AVR8_MEMTYPE_CS , 0x05 , 0x01 ) self . logger . info ( "waiting for stopped...(0x%02X)" , status ) if status : break time . sleep ( 0.001 )