How to change interrupt vector?

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

How to change interrupt vector?

跳至解决方案
2,837 次查看
enzino
Contributor II

I Had configured and initialized my K60 microcontroller using Processor Expert.

Now I need to change some elements "manually" in the file "vectors.c", for example to use another function for some interrupt.

How should I do? Obviously I wanna avoid to manually write my functions in vectors.c because at a new Code generation the PE will overwrite my changes.

Thank you

标签 (1)
0 项奖励
回复
1 解答
1,879 次查看
ProcessorExpert
Senior Contributor III

Hello,

in CW V10.3, there will be available InterruptVector component to provide such functionality (including possibility to handling reserved vectors). Unfortunately it is not available in CW V10.2.

As workaround you have to modify the Vectors.c manually. To avoid regeneration of this file, please set it as read-only.

Note:

Making vectors.c read only will cause problems when another component using interrupt will be added and code re-generated. In this case the read-only flag must be removed, Vectors.c regenerated and the manual modification added back.

best regards

Vojtech Filip

Processor Expert Support Team


在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,880 次查看
ProcessorExpert
Senior Contributor III

Hello,

in CW V10.3, there will be available InterruptVector component to provide such functionality (including possibility to handling reserved vectors). Unfortunately it is not available in CW V10.2.

As workaround you have to modify the Vectors.c manually. To avoid regeneration of this file, please set it as read-only.

Note:

Making vectors.c read only will cause problems when another component using interrupt will be added and code re-generated. In this case the read-only flag must be removed, Vectors.c regenerated and the manual modification added back.

best regards

Vojtech Filip

Processor Expert Support Team


0 项奖励
回复
1,879 次查看
enzino
Contributor II

Thank you.

I've just walked on this way...

I saw an option in "Processor expert project options", it is  "Generate ISR", now it's "NO".

What about this option? It is not involved with my question, isn't it?

0 项奖励
回复
1,879 次查看
ProcessorExpert
Senior Contributor III

Hello,

"Generate ISR" feature is intended for Initialization components. In case you select yes and enter a ISR name into some init. component, such ISR will be generated into Events.c otherwise it is users responsibility to create the ISR.

best regards

Vojtech Filip

Processor Expert Support Team