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.

CCS/TMS320F28379D: Data Exchange between CPU1 and CPU2

Part Number: TMS320F28379D

Tool/software: Code Composer Studio

We realized data exchange between two CPUs using share memory(GS0 and GS1).

CPU1 has the right to W/R GS1 while CPU2 can only Read from GS1(using IPC_FLAG10). 

CPU2 has the right to W/R GS0 while CPU1 can only Read from GS0(using IPC_FLAG17). 

According to the test we've done, CPU1 achieved receiving data from GS0(data produced only by CPU2) without any data lost.

But when CPU1 produced data-A(it would be written to GS1), CPU2 read data from GS1, wrote the same data to GS0, and then CPU1 received data-B from GS0, comparing data-B with data-A, we found some data lost. Among 3 datas, we got 1~2 data lost.

Looking forward to the reply, thanks in advance.

  • Hi Yonglu,

    That should not happen. Are you seeing incorrect data getting written by CPU2 or no data written.  Have you check the memory watch window in CCS as well?  Is there any other master (e.g. DMA) accessing the same GSx RAM ?

    Regards,

    Vivek Singh

  • Hi, Vivek,
    Thanks for your reply.
    "Are you seeing incorrect data getting written by CPU2 or no data written. Have you check the memory watch window in CCS as well?"
    Yes, we found the data has already lost when CPU2 received data from CPU1, but CPU1 wrote no data lost(we checked it by reading data from the memory address wrote by CPU1) .
    "Is there any other master (e.g. DMA) accessing the same GSx RAM?"
    No.
    I forgot to tell one detail that we put each IPC in different timer0_int_isr, CPU1 interrupts every 2ms while CPU2 interrupts every 100us. Is that the reason of data lost?
  • Hi,

    This look like a handshake issue in SW between CPU1 and CPU2. I hope you were able to find the issue and resolve it.

    Regards,

    Vivek Singh

  • Hi, Vivek

    We found the reason. It's the asynchronous communication between Up-level and DSP as we use the PC to send and receive DSP data. The Up-level had a timer itself, so when using timer_isr in DSP to communicate with the Up-level, there would be a asynchronous problem.

    We used the Up-level message-updating-point to act as a software timer of DSP, and finnally resolved it.

    Thank you so much.