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.

RTOS/TDA3: nmin interrupt handling

Part Number: TDA3
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hello.

I need to save some informtaion to SD card after nmin interrupt happens on specific core (IPU-C0).

I understand how to route the interrupt to the specific core by using CTRL_CORE_NMI_DESTINATION_x.

How can I manage what exactly should be done when core recives the interrupt? Should I configure interrupt controller somehow?

  • Hi,

    You need to register the NMI handler in the IPU core. 

    The NMI goes to IPU_IRQ_2 (refer: Table 13-4. IPU_Cx_INTC Default Interrupt Mapping of the TRM).

    You need to add a handler in the vector table. 

    You can refer to bios_6_46_04_53/docs/cdoc/ti/sysbios/family/arm/m3/Hwi.html and search for NMI.

    Thanks and Regards,

    Piyali

  • Hello. Thanks for answer.

    So, if I understand it right, I should create a Hwi for specific interrupt and edit the CTRL_CORE_NMI_DESTINATION_2 to activate the NMI for IPU_C0.

    Is this enouth to work with NMI handler in the IPU core?

    Where can i found a full list of intNum interrupt numbers for Hwi_create function argument? I use intNum = 2 to access the NMI.

     

  • Hi

    You can just use:
    Hwi.nmiFunc = <Your function handler>

    No need to register the handler with interrupt number.

    Thanks and Regards,
    Piyali
  • Hello. It seems like never statically nor dynamically created functions are working for me. Or they do, but i dont get it. Is there any way to debug the interrupts?

    I have tried this in usecase.c file: 

    Hwi_Params hwiParams;
    Hwi_Handle myHwi;
    Error_Block eb;
    int IntNum = 2; //Hwi.html, NMI vector (interrupt #2)

    Error_init(&eb);
    Hwi_Params_init(&hwiParams);

    hwiParams.arg = 10;
    myHwi = Hwi_create(IntNum, pIsrFunc, &hwiParams, &eb);

    and this in ipu1_0.cfg file:

    var Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi'); // 'ti.sysbios.hal.Hwi' not working
    var hwiParams = new Hwi.Params;
    hwiParams.arg = 10;
    Hwi.nmiFunc = "&pIsrFunc";

    Function mentioned in handler should run once when interrupt occurs, yes? What can possibly be done with this function, are there any restrictions? I have no errors, but pIsrFunc function do nothing. My NMI interrupt is bounded to a button on a board right now.

    Thanks.

  • Hi,

    Can you please make sure you have only the ipu1_0.cfg change. Kindly comment the usecase.c file changes.
    Then when you press the button, can you please use CCS to check if the pIsrFunc is hit or not (breakpoint) or not.

    Thanks and Regards,
    Piyali
  • Hello.
    I have resolved my issue using ipu1_0.cfg and defining nmiFunc with no params. Im not 100% that that was an actual problem, I have also edited alot in usecase.c file today.
    Thanks for help.