Priority of interrupts on MC9S12G192

cancel
Showing results for 
Search instead for 
Did you mean: 

Priority of interrupts on MC9S12G192

Jump to solution
605 Views
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.

Labels (1)
0 Kudos
1 Solution
187 Views
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?

View solution in original post

0 Kudos
4 Replies
188 Views
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 Kudos
187 Views
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 Kudos
187 Views
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.

187 Views
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 Kudos