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.

DM37x interrupt handler

I try to test the interrupt handler and wrote the code and only run on the arm core:

_c_int00:
     ldr r0, stack
     mov sp, r0
     mov r0, #512
     add sp, sp, r0
     svc #123

.sect ".intvects"
.retain ".intvects"
Vecs:
; b _c_int00 ; Reset Handler
b Undefined_Handler ; Undefined
b SWI_Handler ; Software Interrupt (SWI)
b Prefetch_Handler ; Prefetch abort
b Abort_Handler ; Data abort
.word 0 ; unsued
b IRQ_Handler ; IRQ
b FIQ_Handler ; FIQ

When the code runs to svc, it should trigger a Software Interrupt and go to SWI_Handler, but the program stopped after svc command and shows the following message, when I press "Assembly Step Over" button, it will jump to the SWI_Handler. What does the message mean? Is it a error message?

My question is, why the program will stop, and can not directly jump to SWI_Handler? Or something wrong with the Interrupt vector table?

In the CMD file, interrupts vector defined as .intvects > 0x4020FFC8 according TRM, which shows: 

" These instructions are executed when an exception occurs, because they are called from ROM exception vectors. By default, all exceptions are redirected to the exception dead loops. Users can redirect an exception to another handler by writing its address to the appropriate position from 0x4020FFE4 to 0x4020FFFC, or by overriding instructions between addresses from 0x4020FFC8 to 0x4020FFE0. "

Best Regards

Zhiwen

  • Hi Zhiwen He,

    I suspect there is some issue with handling the exception caused by "svc #123" instruction. You can find more details about handling processor exceptions at:
    infocenter.arm.com/.../index.jsp
    infocenter.arm.com/.../index.jsp

    BR
    Tsvetolin Shulev
  • Hi Tsvetolin,

    thank for your reply, I will check the documents.

    But I don't think the svc instruction is a problem, it only lead to a software interruput, and transfer a parameter to the exception routine. And other error message like "No source available for "0x1400C"" will also be generated through Prefetch abort interrupt.

    From the TRM, it shows, when interrupt happens, it will call from ROM exception vectors(0x14000h~0x1401Ch), for SWI, we have PC=0x4020FFCC, and I have defined the interrupt handler at this address, my question is why the programm stops here.

    Best Regards
    Zhiwen He