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.

TCI6636K2H: MessageQ_open going into infinite loop during ARM-DSP communication

Part Number: TCI6636K2H
Other Parts Discussed in Thread: SYSBIOS

Bios - bios_6_46_01_38

ipc - ipc_3_44_00_00

pdk - pdk_k2hk_4_0_4

Seems like interrupts are not happening between DSP from ARM. Tried playing with Kick Registers still problem is not resolved. 

On ARM side I am running TI RTOS in AMP mode and DSP is running sysbios.

I am using ex02 as a reference for messageQ.

Please provide some pointer so that i can quickly fix this issue.

  • Hi,

    I've notified the design team. Their feedback will be posted here.

    Best Regards,
    Yordan
  • Hi Ranjit

    We need to do some debug to find out what is the problem.

    The first fact is that messageQ is a layer on top of Notify, so the interrupt actually comes from Notify.

    Try to go backward and start with the DSP and see why it does not get an interrupt when the ARM sends a message.

    To understand the structure of the interrupt, look and read e2e posting https://e2e.ti.com/support/embedded/tirtos/f/355/t/271521  

    It talks about 6678, but the interrupt to the DSP core from K2H is similar.  See if you understand the flow of the events from the IPC register generating an interrupt to the DSP ISR, but go backwards -

    Read the posting from above,  find the IPC Local for the K2H device, follow the core register to see if the interrupt was registered. If yes, the problem is internal to the DSP core. If not, we have to go backward.

    Does it make sense?  Get back to us with your observations

    Ran

  • Thanks Ran,
    It seems I was going in a wrong direction and problem is somewhere else. I made the SharedRegion ownerProcId has 1 in the DSP core0 config and 0 in ARM SMP config . Because of this attach was happening but then getting stuck in messageQ_Open().

    But when i correct this and made DSP core0 as the owner of SharedRegion in both configs then I see attach itself is getting failed.

    ARM core is getting stuck in syncCores.

    DSP is stuck in IPC_procSyncStart().



    When i made ARM as owner of SharedRegion in both config files

    ARM is getting stuck in procSyncFinish(). and DSP goes into some Heap internal error. See below

    "ti.sdo.ipc.heaps.HeapMemMP: line 404: E_internal: An internal error occurred"


    So looks like memory issue(in SharedRegion) rather than interrupt issue. Will debug further and report you.

    Shared Memory config looks like this

    SharedRegion.setEntryMeta(0,
    { base: 0x90000000,
    len: 0x100000,
    ownerProcId: 0,
    isValid: true,
    name: "sharemem",
    });
  • Hi Ran,

    I changed the sharedRegion.translate to false and then it started to work. This is when base:0x90000000 (A address in DDR3A).

    But again attach doesn't happen if i make this MSMC RAM address(ie base:0x0c00 0000). Please tell me what changes i need to make for using

    sharedRegion in the MSMC RAM.

    Regards

    Ranjit 

  • Also currently i Moved to SMP sysbios in ARM side
  • Hi Ranjit
    I apologize for delayed answered. Any progress or you still have a problem?

    Ran
  • Hi Ran,

    Everything is working fine if we use 0x9000 0000 as sharedRegion base and we are going ahead with that.

    Changing the base to 0x0c00 0000 didn't work and ARM was giving exception.

    Exception occurred in ThreadType_Main.
    Main handle: 0x0.
    Main stack base: 0x8004edd0.
    Main stack size: 0x1000.
    R0 = 0x0c000000 R8 = 0x00000004
    R1 = 0x00000000 R9 = 0x00000000
    R2 = 0x00000500 R10 = 0x00000000
    R3 = 0x0c000000 R11 = 0x8004fd3c
    R4 = 0x00000000 R12 = 0x0c000000
    R5 = 0x000004f0 SP(R13) = 0x8002d5cc
    R6 = 0x00000001 LR(R14) = 0x800410ec
    R7 = 0x8003b378 PC(R15) = 0x8002d5cc
    PSR = 0x00000000
    DFSR = 0x00000a06 IFSR = 0x00000000
    DFAR = 0x0c000000 IFAR = 0x00000000
    ti.sysbios.family.arm.exc.Exception: line 205: E_dataAbort: pc = 0x8002d5cc, lr = 0x800410ec.
    xdc.runtime.Error.raise: terminating execution



    Please advice.
    Regards
    Ranjit