AnsweredAssumed Answered

Problems with jp instruction

Question asked by mayer.markus.002 on Feb 26, 2016
Latest reply on Mar 1, 2016 by oakley.jonathan
We are using assembler code in our C-code. The jp instruction is used to jump into
the booloader. But sporadic the jp instruction is not working. We have also used jpf instruction. Without success. What can be the reason?

if ( RequestJumpToBoot )
    {
        u8 option_byte = 0;
        uart1SendTxData ("-> jump to BOOTLOADER" );
    
        // set option bit for bootload mode
        eepromReadAccess(EEPROM_BOOTLOADER_OPTION,1,&option_byte);
        option_byte |= BOOTLOAD_MODE;
        eepromWriteAccess(EEPROM_BOOTLOADER_OPTION,1,&option_byte);
                
                // disable all timers
                TIM1_DeInit();
                TIM2_DeInit();
                TIM4_DeInit();
    
        _asm("jp 0x8000\n");        // jump to bootloader
  }

Outcomes