How to write interrupt function in codewarrior10.7

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

How to write interrupt function in codewarrior10.7

777 Views
weilong
Contributor I

Such as title

Tags (1)
0 Kudos
3 Replies

553 Views
weilong
Contributor I

9s12zvca192

IMG_20171123_142758.jpg

???? What's wrong with that?

IMG_20171123_142652.jpg

0 Kudos

553 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

There is not only one way to implement interrupt.

the most commonly used way is : interrupt <vector_number> <function_name>

Vector number can be found in datasheet vector locations table.

I would suggest you refer tn101.pdf for how to implement interrupt. It also works for S12Z.

Count from bottom of the table for the “vector number”. the power on reset vector is vector number 0 (located at address 0), vector number 1 is located just after the vector 0 (at address 0x2) and so on.

ie Reset = 0 (address is $FFFE),Low Voltage Reset = 1,  External pin RESET = 2 , ......

Using the keyword ‘interrupt’:


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

553 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

What chip do you work with?

0 Kudos