Reset Vector address

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Reset Vector address

1,835 次查看
vihaanred
Contributor III

Hi,

 

i have the following code for reset vectors and the register ivbr = 0x7F. I am using the banking memory model

typedef void (*near tIsrFunc)(void);

const tIsrFunc ResetVectorTable[] @0x7F10 =

{

SpuriousISR,

.

so on;

};

 

The above code is for moving the vector table to the address 0x7F10. My doubt is since 0x7F10 is same as 0xFE ppage register and 0x7F10 index value.

 

Can i initialize the code as

typedef void (*near tIsrFunc)(void);

const tIsrFunc ResetVectorTable[] @0xFE7F10 =

{

SpuriousISR,

.

.

so on;

};

 

Please request to clarify my doubt.

 

Thanks and regards,

Vihaan

标签 (1)
标记 (3)
0 项奖励
回复
3 回复数

1,578 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

hi vhaan,

I guess you should use 8/16 bit MCU. if yes, we can only set interrupt vector at 16bit address but can't 24bit address. 8/16bit MCU interrupt vector address is 16bit range. this is defined be hardware but not MCU.

is this clarify the issue?


Have a great day,
Zhang Jun

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

0 项奖励
回复

1,578 次查看
vihaanred
Contributor III

Slight confusion. it is s12xeq512 so 16 bit MCU.

i really did not understand the statement.

In some other part of the code i have written like this

const unsigned char (test[3])@0xE18000 ={1,2,3};

to place a fixed value at th address with ppage = 0xE1 and local address = 0x8000;

Can i write the above statement?  Can you please guide me what is the sequence and how to write values at particular memory addresses?

Thanks and regards

Vihaan

0 项奖励
回复

1,578 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

hi Vihaan,

you can define any const variable/array in 24bit paged memory, as you did

const unsigned char (test[3])@0xE18000 ={1,2,3};

this is correct.

BUT, we can't define interrupt vector table at 24bit address. because in 16bit MCU, interrupt vector is 16bit width.

does this clarify the issue?

Have a great day,

Zhang Jun

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

0 项奖励
回复