QE128 vs Interrupt Vector Redirection

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

QE128 vs Interrupt Vector Redirection

1,513 Views
pbouf
Contributor I

The HCS08 Reference Manual specifies (HCS08RMV1.pdf section 4.5.5) that the interrupt vector table is relocated to a lower memory location (just below the protected FLASH area) when a region of FLASH is protected.

 

I know this applies to the QE8 but does it also apply to the QE64 and QE128 ? The MC9S08QE128RM.pdf document does not mention the relocation of the interrupt vector table.

 

Pierre

Labels (1)
0 Kudos
Reply
3 Replies

567 Views
tonyp
Senior Contributor II

No, QE64, QE96, and QE128 (that is, all the MMU versions) do not have vector redirection.

0 Kudos
Reply

567 Views
pbouf
Contributor I

Does anyone have a suggestion on how I can managed to use interrupts in my I2C bootloader and also in the application code ?

 

 

0 Kudos
Reply

567 Views
tonyp
Senior Contributor II

Just because there is no automatic vector redirection doesn't mean you can't emulate it yourself.

 

For each vector you'll have to add code like the example below:

 

;in your application

 

RedirectedVswi  dw SwiHandler

 

;in your bootloader code

ToSWI brset  BOOTMODE.,Flags,LocalSWI

      lda    RedirectedVswi+1

      psha

      lda    RedirectedVswi

      psha

      rts

 

LocalSWI

               ...

               rti

 

; in actual vector area (in bootloader)

Vswi dw ToSWI

 

P.S. Just edited to show how to work with two ISRs depending on which code is running.  BOOTMODE. flag should be set in bootmode and cleared in application.  Flags should be shared by both codes.

 

0 Kudos
Reply