This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM46L852: Interupt vector values

Part Number: RM46L852
Other Parts Discussed in Thread: HALCOGEN

I am looking at the sys_intvecs.asm that comes with the sample can bootloader and see lines that look similar to what halcogen generates, but they are commented out and replaced with that I have included below.

I am wondering that the value of #0x1FFF8 does. it looks like 8 bytes before the application start address. what does that accomplish?

resetEntry
        b   _c_int00                   ;0x00
        b   #0x1FFF8               ;0x04
        b   #0x1FFF8               ;0x08, Software interrupt
        b   #0x1FFF8               ;0x0C, Abort (prefetch)
        b   #0x1FFF8               ;0x10, Abort (data)

; interrupt vectors

;resetEntry
;        b   _c_int00
;undefEntry
;        b   undefEntry
;svcEntry
;        b   svcEntry
;prefetchEntry
;        b   prefetchEntry
;data_abort
;        b   data_abort
reservedEntry
        b   reservedEntry
        ldr pc,[pc,#-0x1b0]
        ldr pc,[pc,#-0x1b0]

  • Hello Casey,

    For ARM Cortex-R4/5 microcontroller, the Program Counter (PC) always pointers two instructions beyond the current executed instruction.

    For example , after the software (SVC) interrupt is received by the CPU, the CPU branches to 0x08 (SVC or software interrupt):.

    b #1FFF8

    The branch offset must take account of the prefetch operation, which causes the PC to be 2 words (8 bytes) ahead of the current instruction.

    The destination is PC + offset = 0x08 + 0x08 + 0x1FFF8 = 0x2008  --> which is the address of Software instruction in Application's Int Vector table.