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:由两个 CPU 同时读取/写入 IPC 共享消息 RAM

Guru**** 2611705 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1043616/tms320f28379d-reading-writing-ipc-shared-message-ram-by-both-the-cpu-at-the-same-time

器件型号:TMS320F28379D

我正在阅读"F2837xD_Microcontroller_MDW_2-0.pdf"部分"IPC 数据传输:基本数据传输"。

此处描述:

- CPU1将数据写入 C1toC2消息 RAM 并设置标志

- CPU2将检查是否设置了该标志、如果为 true、则将从  C1toC2消息 RAM 读取数据

我编写了没有 上述标记机制的示例程序、该程序如下所示:

- CPU1继续将一些数据写入  C1toC2消息 RAM (不设置任何标志)

- CPU2继续从  C1toC2消息 RAM 读取数据(不检查任何标志)

想法是让 CPU2 在需要时读取 C1toC2消息 RAM 中的最新数据。 这适用于示例程序。

我的问题是这是否会造成死锁等问题? 因为两个内核不是同步运行。 当 CPU1尝试向共享 RAM 写入数据时、可能会同时尝试从同一共享存储器位置读取数据。