Reset Vector address

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

Reset Vector address

826 Views
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

Labels (1)
Tags (3)
0 Kudos
3 Replies

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

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

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