how to add interrupt routine in codewarrior

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how to add interrupt routine in codewarrior

ソリューションへジャンプ
3,948件の閲覧回数
Blackrose
Contributor I

Dear all:

       I use codewarrior create a bareboard project.Now, i couldn't konw how to add a ISR function in codewarrior.My version of codewarrior is 10.1. Could you show me some advice for this.(I doesn't found more doucments)Thanks

 

Kevin

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,825件の閲覧回数
CrasyCat
Specialist III

Hello

First question is which MCU are you targeting (HCS08, Coldfire, Kinetis, ....)?

Then you may want to create a project and activate ProcessorExpert. Then you add a Bean for lets say a Timer and let Processor Expert generate code for you.

You can then look how the interrupt has been configured and implemented.

This can give you an idea on how to implement your interrupt.  You can even let Processor Expert handle the whole code generation for peripheral configuration and management.

CrasyCat

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,826件の閲覧回数
CrasyCat
Specialist III

Hello

First question is which MCU are you targeting (HCS08, Coldfire, Kinetis, ....)?

Then you may want to create a project and activate ProcessorExpert. Then you add a Bean for lets say a Timer and let Processor Expert generate code for you.

You can then look how the interrupt has been configured and implemented.

This can give you an idea on how to implement your interrupt.  You can even let Processor Expert handle the whole code generation for peripheral configuration and management.

CrasyCat

0 件の賞賛
返信
1,825件の閲覧回数
Blackrose
Contributor I

Thanks for your quickly response.

I used chip name is coldfire 52259.

I got a file that note some steps for add ISR into a project.It doesn't say about ProcessExpert.

Here are steps:

1.write a ISR function

__declspec(interrupt)

void my_isr(void)

{

//doing somethins

}

2.modifiy exceptions.c and add custom name of ISR

extern __declspec(interrupt) void my_isr(void);

....

my_isr ,/* 82(0x148)  */

I follow these steps doing somethings.Though my_isr() doesn't run.I didn't know this method is right.I can try your method.

Thanks

Kevin Chen

0 件の賞賛
返信
1,825件の閲覧回数
Monica
Senior Contributor III

Hello Kevin... has the method worked out?

Please let us know! :smileywink:

Regards!

0 件の賞賛
返信