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/F28M35H52C: how could i set the M3 core ipc interrup function to receive c28 ipc interrupt?

Part Number: F28M35H52C

Tool/software: TI-RTOS

hi dear:

the m3 run ti-rtos  and the c28  run nonsystem.

i have try  to config  a INT_CTOMPIC1  interrup function to  handle the interrupt from C28,  but  when the m3 start up  ,it run  to sys_exit .

 my quetion is  can  i  config  config a interrupt function to handle the interrupt from c28 in rtos ,and how to config it ?

there is some demo like ipc_comm_m3 and ipc_comm_c28  driver  , but i do like that  can't run in rtos .

  • I'm not sure I understand the question--can you give me more details? Which core is running to sys_exit? C28 or M3? Is the exit occuring when the M3 sets the IPC flag that is supposed to trigger the interrupt? Or at some other point?

    Is the RTOS running on the C28? Is it TI-RTOS or some other?

  • thank you for reply, it run rtos in the m3, there is no-system;
    in the m3 the code is
    init_ipc()
    {
    IntEnable(INT_CTOMPIC1);
    // IntRAMRegister(INT_CTOMPIC1,CtoMIPC1IntHandler);
    IntRegister(INT_CTOMPIC1,CtoMIPC1IntHandler);
    }

    void CtoMIPC1IntHandler (void)
    {
    debug = 1;

    // Acknowledge IPC INT1 Flag
    HWREG(MTOCIPC_BASE + IPC_O_CTOMIPCACK) |= IPC_CTOMIPCACK_IPC1;
    }
  • when run the IntEnable(INT_CTOMPIC1); the system have this error
    Can't find a source file at "C:/ti/controlSUITE3.2.5/device_support/f28m36x/v202/MWare/driverlib/interrupt.c"
  • When you're debugging, do you ever see the CtoMIPC1IntHandler() run? How are you triggering the interrupt on the C28?

    That error you're seeing is just CCS saying that it doesn't know how to find and display the interrupt.c file while debugging. It doesn't mean there's anything wrong with your code. There are a few ways you can fix it:

    (1) Is there a locate file button on the screen where the error is displayed that allows you to tell CCS where to find it? That will make it go away.

    (2) You can import the driverlib.lib project into CCS, rebuild it, and then rebuild your application--that will update the paths in the .out, so that CCS will be able to find them locally.

    (3) You can also add the driverlib source files you're using (interrupt.c, etc...) to the project and then exclude them from the build. This will allow CCS to find them but since they're excluded they won't conflict with the .lib.

    Whitney
  • hi there as you say i inclucde the interrupt.c in my project and the function below can run ,but the system have printf info below
    init ()
    {
    IntEnable(INT_CTOMPIC1);
    // IntRAMRegister(INT_CTOMPIC1,CtoMIPC1IntHandler);
    IntRegister(INT_CTOMPIC1,CtoMIPC1IntHandler);
    }




    Core 0: Exception occurred in ThreadType_Main.
    Main name: main(), handle: 0x0.
    Main stack base: 0x20008968.
    Main stack size: 0x800.
    R0 = 0x20007734 R8 = 0x00000000
    R1 = 0x0000000a R9 = 0x00000000
    R2 = 0x20006d44 R10 = 0x00000000
    R3 = 0x00000000 R11 = 0x00000000
    R4 = 0x200076c8 R12 = 0x200084bc
    R5 = 0x20007e24 SP(R13) = 0x20009120
    R6 = 0x00000000 LR(R14) = 0x00203e57
    R7 = 0x00000000 PC(R15) = 0x0020fdc0
    PSR = 0x61000000
    ICSR = 0x00000860
    MMFSR = 0x00
    BFSR = 0x00
    UFSR = 0x0000
    HFSR = 0x00000000
    DFSR = 0x00000001
    MMAR = 0xe000ed34
    BFAR = 0xe000ed38
    AFSR = 0x00000000
    Terminating execution...
  • Does the error message give any more information than that? Any details that say what the cause of the exception is?

    If you single step through the code, on what line does the exception occur?

    Thanks,
    Whitney
  • init_ipc();
    /* SysMin will only prnt to the console when you call flush or exit */

    System_flush();

    at the System_flush  the system will be error;

    and i test to change the order

    System_flush();

    init_ipc();

    the system will error at he BIOS_start()

  • so my question if i want to recvive the ipc interrupt from c28 by use a interrupt function ,can this be done in the rtos ???
    in the c28 i config a timer to invoke a ipc interrupt CtoMIpcRegs.CTOMIPCSET.bit.IPC1 = 1 to signal IPC1 to M3;
    how many ways to check the interrupt when m3 run the rtos ? thank u;
  • Okay, thanks for the additional information. It's definitely possible to get an IPC interrupt from the C28 even if you're using RTOS.

    When setting up interrupts in SYS/BIOS you typically want to use a Hwi and let SYS/BIOS manage the interrupt for you. Have you done that in your cfg file? If so, you probably don't need to call IntEnable() or IntRegister() at all.

    Whitney
  • thank you for reply, i am sure that i can revice the interrupt ,but i want the interrupt form c28 can invoke a callback function to handle the interrut
  • When you set up the Hwi you will be able to specify the callback function that will run when an IPC interrupt occurs on the M3. Have you set up a Hwi?

    What code do you have running on the C28 side to trigger the interrupt? Is that the part that is causing you trouble? The process on the C28 side doesn't change with or without RTOS. You can still do something like call IPCCtoMFlagSet() to trigger it or just set the appropriate bit in CTOMIPCSET if you don't want to use the drivers.

    Whitney

  • Were you able to make any progress?

    Whitney
  • no , i did'nt set up a hwi , is there any document for the hwi?
  • hi Whitney, did not have progress
  • Yes, there are some documents that can help you. In CCS, if you go to Help->Help Contents and look under the SYS/BIOS entry, you should see a Users Guide (which has a Hwi chapter including example code snippets) and an API reference guide.

    Whitney