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.

TMS320F28379D: Copy data from cpu1 for cpu2 using DMA and synchronisation problem.

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Dear TI hello,

We have two softwares, one is running at 17Khz (56us) on cpu1 and the second on cpu2 with 1Khz(500us).

We are using DMA to copy data from CPU1 to CPU2 and cpu2 sends this data through the can bus.

CPU2 should respond to CPU1 with the same DMA but using another channel.

The issue is that we trigger the DMA to copy data from cpu1 to cpu2 but we don't wait to see the flag because we want to lose CPU load. 

The problem occurs when the cpu2 tries to send data to cpu1 and since the CPU1 is much faster we don't know if the data is well copied or not. We are using the DMA to not be obliged to wait until the end of the copy.

My question is, does CPU1_DMA could trigger an interrupt for CPU2 when he finished his work and vice versa? Did we have to use the two DMA1 for each CPU1 and DMA2 for CPU2?

The problem is how we could synchronize this copy from one CPU to another even if CPU1 is much faster than CPU2?

how we could use the IPC drivers to make this copy with the minimum CPU intervention?

Thank you in advance 

S.tarik

  • Hi,

    My apologies for the delayed response.

    To achieve what you are expecting, you will need IPC as well as the DMA interrupts. The DMA needs to intemate CPU via an interrupt to say that it has dne the transfer. In the DMA ISR, you could use IPC drivers to sync between CPU1 and CPU2. Same to be implemented at CPU2 end as well.

    As for IPC drivers, there are special sync functions available in C2000Ware along with examples on how to use them. Please refer to the same.

    Hope this information is enough to resolve your queries. Please let me know if otherwise.

    Thanks & Regards
    Pramod