Hot!Wrong interrupt vector addresses in bootloader for 18f46k22?

Author
JMoore
Starting Member
  • Total Posts : 44
  • Reward points : 0
  • Joined: 2011/07/16 13:40:30
  • Location: 0
  • Status: offline
2018/01/12 16:53:30 (permalink)
0

Wrong interrupt vector addresses in bootloader for 18f46k22?

I generated a bootloader for my app. It seems to have swapped the addresses for the remapped high/low interrupt vectors.

High should be 508, low should be 518 to match their original locations of 0x08 and 0x18. It tried with and without the prioritized interrupts box checked.

Am I missing something or is this a bug?

Here is what it generated.
#define  NEW_RESET_VECTOR            0x500
#define  NEW_INTERRUPT_VECTOR_HIGH   0x518
#define  NEW_INTERRUPT_VECTOR_LOW    0x508


#1

6 Replies Related Threads

    RISC
    Super Member
    • Total Posts : 5272
    • Reward points : 0
    • Status: offline
    Re: Wrong interrupt vector addresses in bootloader for 18f46k22? 2018/01/12 17:12:59 (permalink)
    0
    Hi,
    Which bootloader do you use ?
    Which version of the bootloader / MCC plugin / MPLAB X / XC8 do you use ?
    regards
    #2
    alecdavis
    Starting Member
    • Total Posts : 18
    • Reward points : 0
    • Joined: 2016/11/03 16:34:31
    • Location: 0
    • Status: offline
    Re: Wrong interrupt vector addresses in bootloader for 18f46k22? 2018/01/12 20:37:26 (permalink)
    0
    I've already reported this back in December 2016  http://www.microchip.com/forums/m962133.aspx
    Then it came up again in November 2017 http://www.microchip.com/forums/m1024746.aspx#1024996 with a response from Danno that they know about it.
     
    Presumably then, it's still wrong.
    #3
    vloki
    Jo, alla!
    • Total Posts : 6758
    • Reward points : 0
    • Joined: 2007/10/15 00:51:49
    • Location: Germany
    • Status: offline
    Re: Wrong interrupt vector addresses in bootloader for 18f46k22? 2018/01/13 04:23:18 (permalink)
    0
    As long as the values in the bootloader code and the application code are the same, this should be no problem.
    May be they are swapped intentionally.
    You do not need to jump twice to reach the high priority interrupt vector code this way because it can be located directly at the remapped vector.

    Uffbasse !
    #4
    JMoore
    Starting Member
    • Total Posts : 44
    • Reward points : 0
    • Joined: 2011/07/16 13:40:30
    • Location: 0
    • Status: offline
    Re: Wrong interrupt vector addresses in bootloader for 18f46k22? 2018/01/19 12:36:46 (permalink)
    0
    For some reason, I didn't get email on the replies, so I'm slow getting back.

    Versions are latest as of this date. MPLAB X 4.05 / Code Configurator (which generates the bootloader) v3.45.1 / XC8 1.45

    I changed the code in the bootloader, and that's solves the problem.

    But, I think it is an error, not intentional on their part. The generated application code has the interrupts at the right addresses (+0x500 of course). The bootloader thinks they are in the wrong place, as far as I can tell.

     I'm not sure what you mean about not having to jump twice.
    #5
    vloki
    Jo, alla!
    • Total Posts : 6758
    • Reward points : 0
    • Joined: 2007/10/15 00:51:49
    • Location: Germany
    • Status: offline
    Re: Wrong interrupt vector addresses in bootloader for 18f46k22? 2018/01/19 12:49:28 (permalink)
    0
    The redirected vectors can be anywhere as long they are specified IDENTICAL in bootloader and application.
     
    If the high IR vector is on a slightly lower address than the low IR vector, then it is not possible to place the code for the high IR at that place because it will not fit and another jump is needed.
    From the original vector to the redirected one and from there to the final location of the IR code.
    This is not ideal for a HIGH PRIORITY vector, that should be executed as FAST as possible.
     
    So I thought that the remapped vectors possibly are switched by intention to have the additional jump in the low priority interrupt processing, which is less important than the high priority IR.

    Uffbasse !
    #6
    Danno
    Super Member
    • Total Posts : 212
    • Reward points : 0
    • Joined: 2005/09/07 10:12:10
    • Status: offline
    Re: Wrong interrupt vector addresses in bootloader for 18f46k22? 2018/01/23 13:59:58 (permalink)
    0
    The swapped addresses have been fixed (and many others as well).  The latest version of the bootloader plug in V2.2.31 is available at www.microchip.com/mcc.
     
    #7
    Jump to:
    © 2018 APG vNext Commercial Version 4.5