Hot!Interrupt / trap vector table

Author
P Lameijn
Super Member
  • Total Posts : 1948
  • Reward points : 0
  • Joined: 2004/01/22 18:30:23
  • Location: The Netherlands
  • Status: offline
2018/09/21 05:51:08 (permalink)
0

Interrupt / trap vector table

Default the interrupt / trap vector table holds all 0x0000.
Does this mean a call to that vector is routed to address 0x0000 (reset vector)?
Or has 0x0000 a special meaning.

Regards,
Peter
#1

5 Replies Related Threads

    jack@kksound
    code tags!
    • Total Posts : 2761
    • Reward points : 0
    • Joined: 2014/05/14 10:03:19
    • Location: 0
    • Status: offline
    Re: Interrupt / trap vector table 2018/09/21 11:08:00 (permalink)
    0
    P Lameijn
    Default the interrupt / trap vector table holds all 0x0000.
    Does this mean a call to that vector is routed to address 0x0000 (reset vector)?
    Or has 0x0000 a special meaning.


    Which pic? Which compiler/assembler?
    With XC16 and the pic24FJ256DA206 the IVT is filled with 0x000330 - address of the default ISR which is simply a BREAK followed by a RESET. BTW the IVT entries on a 24F are 24 bits long (0x000000), not 16 (0x0000).
    An erased pic will have all 1s in FLASH so the IVT will have 0xFFFFFF in all locations.
    #2
    P Lameijn
    Super Member
    • Total Posts : 1948
    • Reward points : 0
    • Joined: 2004/01/22 18:30:23
    • Location: The Netherlands
    • Status: offline
    Re: Interrupt / trap vector table 2018/09/21 12:10:56 (permalink)
    0
    Compiler MikroE / PIC24FJ256GA108.
    Table default is filled with '0'

    Regards,
    Peter
    #3
    NKurzman
    A Guy on the Net
    • Total Posts : 16438
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: Interrupt / trap vector table 2018/09/21 15:19:14 (permalink)
    0
    I am not Positive but think 0x0000 is address 0x0000 (reset vector)?
    I recall this behavior.
    #4
    Aussie Susan
    Super Member
    • Total Posts : 3331
    • Reward points : 0
    • Joined: 2008/08/18 22:20:40
    • Location: Melbourne, Australia
    • Status: offline
    Re: Interrupt / trap vector table 2018/09/23 19:37:22 (permalink)
    0
    Look at the 'Memory Organisation' section of the data sheet and there is normally a diagram that shows the memory layout. 
    Location 0 typically contains a hard coded "GOTO" statement and location 2 holds the reset address. Therefore setting the PC to 0 will make the MCU execute the GOTO and go to the start of the code.
    Susan
    #5
    JPortici
    Super Member
    • Total Posts : 385
    • Reward points : 0
    • Joined: 2012/11/17 06:27:45
    • Location: Grappaland
    • Status: offline
    Re: Interrupt / trap vector table 2018/09/23 23:26:24 (permalink)
    0
    jack@kksound
    With XC16 and the pic24FJ256DA206 the IVT is filled with 0x000330 - address of the default ISR which is simply a BREAK followed by a RESET.



    well actually it will be all the same address which hold the default ISR which could or could not be located at 0x330 depending on whatever area the linker found to be available :) but yeah, all at the same address
     
    Since the compiler is mikroe it could be possible that they are actually redirecting all unused interrupt to the reset vector, instead of a default interrupt you can rewrite and alter to your needs
    #6
    Jump to:
    © 2018 APG vNext Commercial Version 4.5