David LECOMTE

Redirection Vector - MC9S08QE8

Discussion created by David LECOMTE on Dec 1, 2008
Latest reply on Dec 1, 2008 by David LECOMTE
I had a redirection vector like following code:
 
#ifndef UNASSIGNED_ISR
  #define UNASSIGNED_ISR 0xFFFF       
#endif
 
#define USER_VECTORTABLE_LOCATION  (0xF9CE)
void interrupt isr_rx(void);
void (* near const _vect[])() @USER_VECTORTABLE_LOCATION = {
   UNASSIGNED_ISR,               // 24. Vrtc (0xF9CE)
   UNASSIGNED_ISR,               // 23. VReserved23 (0xF9D0)
   UNASSIGNED_ISR,               // 22. VReserved22 (0xF9D2)
   UNASSIGNED_ISR,               // 21. VReserved21 (0xF9D4)
   UNASSIGNED_ISR,               // 20. Vacmpx (0xF9D6)
   UNASSIGNED_ISR,               // 19. Vadc (0xF9D8)
   UNASSIGNED_ISR,               // 18. Vkeyboard (0xF9DA)
   UNASSIGNED_ISR,               // 17. Viic (0xF9DC)
   UNASSIGNED_ISR,               // 16. Vscitx (0xF9DE)
   isr_rx,                       // 15. Vscirx (0xF9E0)
   UNASSIGNED_ISR,               // 14. Vscierr (0xF9E2)
   UNASSIGNED_ISR,               // 13. Vspi (0xF9E4)
   UNASSIGNED_ISR,               // 12. VReserved12 (0xF9E6)
   UNASSIGNED_ISR,               // 11. Vtpm2ovf (0xF9E8)
   UNASSIGNED_ISR,               // 10. Vtpm2ch2 (0xF9EA)
   UNASSIGNED_ISR,               //  9. Vtpm2ch1 (0xF9EC)
   UNASSIGNED_ISR,               //  8. Vtpm2ch0 (0xF9EE)
   UNASSIGNED_ISR,               //  7. Vtpm1ovf (0xF9F0)
   UNASSIGNED_ISR,               //  6. Vtpm1ch2 (0xF9F2)
   UNASSIGNED_ISR,               //  5. Vtpm1ch1 (0xF9F4)
   UNASSIGNED_ISR,               //  4. Vtpm1ch0 (0xF9F6)
   UNASSIGNED_ISR,               //  3. Vlvd (0xF9F8)
   UNASSIGNED_ISR,               //  2. Virq (0xF9FA)
   UNASSIGNED_ISR               //  1. Vswi (0xF9FC)
   //_Startup,               //  0. pseudo-Reset - Real reset vector is not relocated.
};
 
I declared an interrupt function in c code
void interrupt isr_rx(void)
{.......}
 
When i use True time Simulator and i send an RX car via SCI interrupt and an error message appears and say me :
Error: At location FFE0 -
Error: Attempt to use invalid or uninitialized memory
Error: Interrupt processing failed.
 
Normal i think, because at this adress (0xFFE0) i have 0xFF due to redirection vector. Why the interrupt try to call adress of oxffe0 and not 0xFAE0? At 0xFAE0, there is good contains not 0xFF.
 
I hope to be clear. Thanks for you help.
 
David


Message Edited by NLFSJ on 2008-12-01 11:13 AM

Outcomes