我们在C代码中使用汇编代码。 jp指令用于跳转
booloader。但零星的jp指令不起作用。我们还使用了jpf指令。没有成功。可能是什么原因?
if(RequestJumpToBoot)
{
u8 op
tion_byte = 0;
uart1SendTxData('' - >跳转到BOOTLOADER'');
//为引导加载模式设置选项位
eepromReadAccess(EEPROM_BOOTLOADER_OPTION,1,&安培; option_byte);
option_byte | = BOOTLOAD_MODE;
eepromWriteAccess(EEPROM_BOOTLOADER_OPTION,1,&安培; option_byte);
//禁用所有计时器
TIM1_DeInit();
TIM2_DeInit();
TIM4_DeInit();
_asm(''jp 0x8000 n''); //跳转到bootloader
}
以上来自于谷歌翻译
以下为原文
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 0x8000n''); // jump to bootloader
}