ISR sample code

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

ISR sample code

1,142件の閲覧回数
Senu
Contributor I

can I get interrupt enabled UART sample C code?

ラベル(1)
0 件の賞賛
返信
4 返答(返信)

648件の閲覧回数
CrasyCat
Specialist III

Hello

 

- Which CPU are you targeting (HC08, HC12, Coldfire, ..)
- Which version of CodeWarrior are you using?

CrasyCat

0 件の賞賛
返信

648件の閲覧回数
Senu
Contributor I

Hello,

 

I am using CW7.2, MCF5272., in XP platform.

I could not find the macros for the INTR subroutine ,

Like, _ISR, _INTR et.

0 件の賞賛
返信

648件の閲覧回数
CrasyCat
Specialist III

Hello

 

You can specify a specific function is an interrupt function using following notation:

    __declspec(interrupt) void MyInterrupt(void) {

       /* Add your code here. */

    }

 

See ColdFire_Build_Tools_Reference manual for more details on this notation.

 

Then you need to initialize the appropriate entry in the vector table with the address of this function.

 

If you have created your project using the project wizard the source file exceptions.c contains such a table (it is called _vect).

Just add the name of your interrupt function at the appropriate location.

 

I hope this helps.

 

CrasyCat

0 件の賞賛
返信

648件の閲覧回数
Senu
Contributor I

Hello,

 

I am trying this, hope this can resolve my issue,

 

Thanks,

Senu

0 件の賞賛
返信