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.

AM6442: Creating a Hardware / Software Interrupt Handler as breakpoint

Part Number: AM6442

Hi,

My aim here put a breakpoint on another core from 1 core. For eg R5F will trigger a software breakpoint on another core based on some event( using IPC Notify
 I can't use __asm("BKPT") instruction as I don't want to use debugger to resume the CPU. So I'm trying to use  __asm("SWI 0") instruction. 
If I use this anywhere in my code it jumps to void __attribute__((interrupt("SWI"), section(".text.hwi"))) HwiP_svc_handler(void)

 

But instead of this while loop if I want to have other statements here, shall I edit this handler itself or shall I make a new handler.
If I edit this handler itself, will it create issues with debugging from debugger or some other software/hardware interrupt ?
If I have to make a new handler to handle the instruction, how should I do that with minimum latency ? and How do I make sure my assembly instruction is jumping to that new handler ?




  • Hello Ojasvi,

    Thanks for reaching out to Texas Instruments E2E support forum.

    I have taken your inputs and working on it. Please allow some time to revert back.

    Regards,

    Tushar

  • Hello Ojasvi,

    Thanks for your patience.

    I don't think using an interrupt handler as a breakpoint is good way to debug the code.

    When the code is inside an interrupt handler most of the functionality(e.g. printing) might not work as expected. While an interrupt occurs CPU goes to an unknown state. The while(1) loop in interrupt handler is to keep the cpu in a known state when a interrupt happens.

    Instead of using interrupt handler as a breakpoint for debugging, use the Debug Server Script. 

    Please refer Debug Server Script for more details.

    Regards,

    Tushar