Funny interrupt behavior after starting firmware via bootloader - MC9S12XDP512

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Funny interrupt behavior after starting firmware via bootloader - MC9S12XDP512

1,939 次查看
K_p
Contributor I

Hi

I have been coding a CAN-bootloader for MC9S12XDP512, it seems that the firmware is downloaded as it should be at Flash, and pseudo vector table is relocated at below 0xeffe.

The launching of firmware is executed as:
      asm JMP    [0xFFFE-BootBlkSize,pcr]/* Run user Program */

The program starts fine, but if it gets a timerinterrup (for canopen heartbeat) it doesn't make that CAN-message. But it also don't crash, because I'm able to read other CAN objects, includin it's different fw versionnumber. And if I stop executing from debugger it starts automticaly again and makes that message.

If i upload a different kind of firmware such as a babbling idiot, which only generates CAN-traffic without any timers, it works 100% right.

Any idea what could be problem here, I'm thinkin somethin is wrong with new pseudo-table.

Juha-Matti

 

 

Added p/n to subject.



Message Edited by NLFSJ on 2008-03-13 04:40 PM
标签 (1)
0 项奖励
回复
1 回复

871 次查看
dwhite
Contributor I
This sounds like it could be a register bit that can only be written to once. Even if you can't find a suspect, I would always suggest a full reset after a bootload. If you don't have an external watchdog, or I/O pin to your RST* line, you can use the COP. These will use the original vector table and clear any one-time only registers and restart your timers, clear flags, etc. so the behavior is more predictable.
0 项奖励
回复