ISR sample code

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ISR sample code

2,675 Views
Senu
Fresh Out Contributor

can I get interrupt enabled UART sample C code?

Labels (1)
0 Kudos
Reply
4 Replies

2,181 Views
CrasyCat
Specialist III

Hello

 

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

CrasyCat

0 Kudos
Reply

2,181 Views
Senu
Fresh Out Contributor

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 Kudos
Reply

2,181 Views
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 Kudos
Reply

2,181 Views
Senu
Fresh Out Contributor

Hello,

 

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

 

Thanks,

Senu

0 Kudos
Reply