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.

[参考译文] TMS320F28P650DK:对相同结构问题按位写入 CPU1 和 CLA

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1595550/tms320f28p650dk-cpu1-and-cla-bitwise-write-to-same-struct-issue

器件型号: TMS320F28P650DK

尊敬的专家:

如下结构所示、如果 CPU1 和 CLA 同时对此结构执行按位写入操作(例如 CPU1 写入 TEST_1、CLA 写入 TEST_2)。 这将操作 TEST_3 值。 如何避免这种情况? 您能否提供有关如何处理与 CPU1 和 CLA 共享的结构的指导?
typedef 联合体

  uint32_t 标志;
  结构
  {
    uint32_t test_1:1;
    uint32_t test_2:1;
    uint32_t test_3:1;
    uint32_t 保留:30;
  }位;
}TESTFLAGS;

 

此致!

Jacob