How to write interrupt function in codewarrior10.7

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

How to write interrupt function in codewarrior10.7

1,057件の閲覧回数
weilong
Contributor I

Such as title

タグ(1)
0 件の賞賛
返信
3 返答(返信)

833件の閲覧回数
weilong
Contributor I

9s12zvca192

IMG_20171123_142758.jpg

???? What's wrong with that?

IMG_20171123_142652.jpg

0 件の賞賛
返信

833件の閲覧回数
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 件の賞賛
返信

833件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

What chip do you work with?

0 件の賞賛
返信