ISR Self Identification

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

ISR Self Identification

ソリューションへジャンプ
842件の閲覧回数
manishsangram
Contributor IV

Hello,

 

We are using S12ZVMC128 MCU on our custom board.

 

There are about 25 or so interrupts which we are not handling which means the code is generated in CPU.c by PE. The code is set in PE configuration and is common for all ISR that it generates.

 

There is some common error handling we are doing for all these unhandled interrupts. Now we don't want to over ride and write unique code for each of these ISR.

 

So we want some way that the ISR code (which is same for all ISRs) can determine which interrupt it is servicing without writing a different code for each ISR. Basically we want to identify the interrupt within the ISR.

ラベル(1)
タグ(2)
0 件の賞賛
1 解決策
657件の閲覧回数
RadekS
NXP Employee
NXP Employee

Hi Manish,

Here is example of interrupt catcher for your inspiration:

S12Z Interrupt catcher for unexpected interrupts

All unhandled interrupts are forwarded into one routine, but global variable isrNumber contains vector number.

I hope it help you.

Have a great day,
Radek

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

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
658件の閲覧回数
RadekS
NXP Employee
NXP Employee

Hi Manish,

Here is example of interrupt catcher for your inspiration:

S12Z Interrupt catcher for unexpected interrupts

All unhandled interrupts are forwarded into one routine, but global variable isrNumber contains vector number.

I hope it help you.

Have a great day,
Radek

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

0 件の賞賛
657件の閲覧回数
vfilip
NXP Employee
NXP Employee

Hi,

you should be able to switch ISR code on Build options tab available from CPU component, details below.

pastedImage_0.png

best regards

Vojtech Filip

0 件の賞賛
657件の閲覧回数
manishsangram
Contributor IV

Hi Vojtech,

We are already writing code in the build options tab for the ISR. The question is not that. The question is that since all the ISR have the same code but I want to log the actual interrupt that took place how can we do that ?

0 件の賞賛