各位:
在程序中,需要重启程序,于是直接跳转到0x33FFF6处重新运行程序时(软复位?),当程序没有中断服务时,这么操作似乎没有问题,程序可以正常运行。但是当使能中断后(一个timer0计数中断),一执行跳转,就跑到interrupt void ILLEGAL_ISR(void)中了。
跳转代码
JumpAddress = *(uint32_t*) (0x33FFF6);
Jump_To_Application = (pFunction) JumpAddress;
Jump_To_Application();
部分CMD
FLASHB : origin = 0x330000, length = 0x008000 /* on-chip FLASH */
FLASHA : origin = 0x338000, length = 0x007F80 /* on-chip FLASH */
CSM_RSVD : origin = 0x33FF80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
BEGIN : origin = 0x33FFF6, length = 0x000002 /* Part of FLASHA. Used for "boot to Flash" bootloader mode. */
CSM_PWL : origin = 0x33FFF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
Eric Ma:
Kevin
请问一下这颗芯片是F2833X 吗?
我建议可以在要进行软复位前,关掉全局中断。或是使用看门狗来产生复位。
Eric
各位:
在程序中,需要重启程序,于是直接跳转到0x33FFF6处重新运行程序时(软复位?),当程序没有中断服务时,这么操作似乎没有问题,程序可以正常运行。但是当使能中断后(一个timer0计数中断),一执行跳转,就跑到interrupt void ILLEGAL_ISR(void)中了。
跳转代码
JumpAddress = *(uint32_t*) (0x33FFF6);
Jump_To_Application = (pFunction) JumpAddress;
Jump_To_Application();
部分CMD
FLASHB : origin = 0x330000, length = 0x008000 /* on-chip FLASH */
FLASHA : origin = 0x338000, length = 0x007F80 /* on-chip FLASH */
CSM_RSVD : origin = 0x33FF80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
BEGIN : origin = 0x33FFF6, length = 0x000002 /* Part of FLASHA. Used for "boot to Flash" bootloader mode. */
CSM_PWL : origin = 0x33FFF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
Kevin Li1:
回复 Eric Ma:
Eric
是的,是28335,我尝试过关中断,但是还是有问题。
我这里不单需要进行这种方式的软复位,还需要跳转另外一个程序,就是类似bootload的功能,入口地址为0x32FFF6的,这样用看门狗来弄,就有问题了。
各位:
在程序中,需要重启程序,于是直接跳转到0x33FFF6处重新运行程序时(软复位?),当程序没有中断服务时,这么操作似乎没有问题,程序可以正常运行。但是当使能中断后(一个timer0计数中断),一执行跳转,就跑到interrupt void ILLEGAL_ISR(void)中了。
跳转代码
JumpAddress = *(uint32_t*) (0x33FFF6);
Jump_To_Application = (pFunction) JumpAddress;
Jump_To_Application();
部分CMD
FLASHB : origin = 0x330000, length = 0x008000 /* on-chip FLASH */
FLASHA : origin = 0x338000, length = 0x007F80 /* on-chip FLASH */
CSM_RSVD : origin = 0x33FF80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
BEGIN : origin = 0x33FFF6, length = 0x000002 /* Part of FLASHA. Used for "boot to Flash" bootloader mode. */
CSM_PWL : origin = 0x33FFF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
Kevin Li1:
回复 Kevin Li1:
谢谢,Eric,
是我犯了个低级错误,指针赋值错误。