Interrupt vector number and vector address

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

Interrupt vector number and vector address

Jump to solution
2,602 Views
WendongWang
Contributor II

Hello,

I would like to clarify the relationship between the vector number and the vector address. In the help document, I found the relevant explanation, shown below, but I would like to know if I move the interrupt vector table (configured IVBR), will the interrupt vector number also move(except  vector number 0), or will the interrupt vector number always point to the default vector address,for example, vector number 2 always points to the vector address 0xFFFC,0xFFFD, even though I moved the vector table.

WangWendong_0-1630667097506.png

 

Best regards,

Wendong.

0 Kudos
1 Solution
2,576 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

After setting IVBR( upward shift 512B) , VECTOR 12 TIM0CH0ISR points to 0x00FFFDCC. That's to say, VECTOR 12 is still Timer 0 channel 0 interrupt.

View solution in original post

0 Kudos
4 Replies
2,590 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI

You didn't say your PN. I guess you use some HCS12x device like HCS12XS? 

If so, to do vector redirection, you need define IVBR, and also redirect vector table to the right address.

The vector number doesn't change.

 

Have a nice day,

Jun Zhang

0 Kudos
2,584 Views
WendongWang
Contributor II

Hello, Jun Zhang

From your ID, I guess you may be Chinese or speak Chinese, so I will repeat my question in Chinese, because my English is not good enough to accurately express my question.

我用的MCU是MC9s12ZVML128, 它默认的中断向量表在PFLASH的最后一个512B存储空间,这时的向量号12 是指向定时器0通道0的中断,如果我在PRM文件这样写:VECTOR 12 TIM0CH0ISR ,那么就是将TIM0CH0ISR函数的地址 写入向量表 0x00FFFFCC 的位置;如果我现在重定向了向量表,也就是设置了IVBR寄存器,将向量表向上偏移512B,这时,我再在PRM文件中这样写:VECTOR 12 TIM0CH0ISR,那么是将 TIM0CH0ISR 函数的地址写到0x00FFFFCC的位置,还是将 TIM0CH0ISR 函数的地址写到偏移后的地址 0xFFFDCC.

0 Kudos
2,577 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

After setting IVBR( upward shift 512B) , VECTOR 12 TIM0CH0ISR points to 0x00FFFDCC. That's to say, VECTOR 12 is still Timer 0 channel 0 interrupt.

0 Kudos
2,571 Views
WendongWang
Contributor II

Thank you for your careful answer, wish you happy every day!

0 Kudos