Priority of interrupts on MC9S12G192

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

Priority of interrupts on MC9S12G192

ソリューションへジャンプ
998件の閲覧回数
falchun
Contributor I

Hi all,

 

I am working on MC9S12G192 and I would like to change the priority of my interrupts. By reading the datasheet, I saw the priority level of each interrupts is depending on the address of the vectors interrupts. But I am not able to find how to change this address and keep the link with the initial interrupt...

Can you help me please?

Thanks in advance.

ラベル(1)
タグ(3)
0 件の賞賛
1 解決策
580件の閲覧回数
kef2
Senior Contributor IV

You can't. On S12XE you can change priority level of each interrupt. On older S12 you could rise priority of only one interrupt using HPRIO register. On S12G you have no option to change interrupt priority. But do you really need it? HPRIO didn't make a lot of sense, since it applies to quite rare case when two or more interrupts happen at (almost) exactly the same time. What if lower priority interrupt happens just a couple of bus cycles prior to your high priority interrupt? No magic, lower priority interrupt executes first without interruption. So what HPRIO is supposed to solve?

元の投稿で解決策を見る

0 件の賞賛
4 返答(返信)
581件の閲覧回数
kef2
Senior Contributor IV

You can't. On S12XE you can change priority level of each interrupt. On older S12 you could rise priority of only one interrupt using HPRIO register. On S12G you have no option to change interrupt priority. But do you really need it? HPRIO didn't make a lot of sense, since it applies to quite rare case when two or more interrupts happen at (almost) exactly the same time. What if lower priority interrupt happens just a couple of bus cycles prior to your high priority interrupt? No magic, lower priority interrupt executes first without interruption. So what HPRIO is supposed to solve?

0 件の賞賛
580件の閲覧回数
falchun
Contributor I

Ok. Thanks Edward for your answer. I did not find, for my microcontroller, the HPRIO register you were talking about. But it's ok, I will do with it. Thanks again :smileywink:

0 件の賞賛
580件の閲覧回数
kef2
Senior Contributor IV

I meant you can't change priority of any interrupt in S12G. Older classic S12 families like S12A, S12D, S12C had HPRIO register. On S12G and S12P and other modern S12's you don't have even HPRIO.

580件の閲覧回数
RadekS
NXP Employee
NXP Employee

There is one older application note AN2617 A Software Piority Interrupt Scheme on HCS12 Microcontrollers

http://www.freescale.com/files/microcontrollers/doc/app_note/AN2617.pdf

http://www.freescale.com/webapp/sps/download/license.jsp?colCode=AN2617SW

Note: this application note was written for older S12 MCUs. Please take it only as inspiration.

0 件の賞賛