大家好:
如题,在bootloader程序跳转前,调用了标准固件库函数 IntMasterDisable() 禁止了中断。
芯片手册上也说复位中断是不会受影响的。
按照我的理解,程序指针应该会跳转到复位中断服务程序的入口地址执行,但实际仿真时会进入硬件故障中断服务程序。
我想知道为什么…
阿里嘎多米娜桑!
ps:不禁止中断是能够正常跳转的
Seven Han:
您用的具体是哪款芯片,您可以参考下手册:www.ti.com/…/spmu301d.pdf
jingqiu zhang:
回复 Seven Han:
您好:
官方bootloader的说明文档看过,但是印象中没有说中断使能的问题…
xyz549040622:
看数据手册的说明, IntMasterDisable() 禁止的是信号中断,复位中断是否也是信号中断的,操作的是CPUcpsid(),暂时没找到这个函数的原型操作的是哪个寄存器。
xyz549040622:
函数原型是这个
#if defined(ccs) uint32_t CPUcpsid(void) {//// Read PRIMASK and disable interrupts.//__asm("mrsr0, PRIMASK\n""cpsidi\n""bxlr\n");//// The following keeps the compiler happy, because it wants to see a// return value from this function.It will generate code to return// a zero.However, the real return is the "bx lr" above, so the// return(0) is never executed and the function returns with the value// you expect in R0.//return(0); }你实际测试下,不要仿真,看看实际芯片运行也会进故障中断吗?
xyz549040622:
回复 jingqiu zhang:
是的,这样分析才是符合逻辑的。
TI中文支持网
