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.

[参考译文] TMDSCNCD28388D:CLA 代码不处理指针

Guru**** 2391165 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1131254/tmdscncd28388d-cla-code-not-handling-pointers

器件型号:TMDSCNCD28388D

我的代码表明在编译时条目数未知。

使用指向在运行时分配的结构的指针、无法正确读取 C28x 和 CLA 之间共享的数据

typedef 结构体_tConfig

UINT16 NoOfVal_Type1;
UINT16 NoOfVal_Type2;
UINT16 NoOfVal_Type3;
UINT16 NoOfVal_Type4;

void* FirstEntry;/**<测量数据的起始值、用于获取表的起始地址、因为64位实际上是64位、而不是 Inca 使用的32位*

} tConfig;

uint32 cla_EventList[10]; //其中包含 C28x 填充的事件的要读取的地址列表

uint32 config = CLA_EventList[0];//获取 CLA 中的事件

tConfig* eventConfig =(tConfig*)(config);//为 CLA 中的事件分配结构

uint32 no_of_val 4 = eventConfig->NoOfVal_Type2; //这在 CLA <<<<<<<<<<<<<<<<<<<<<<<<

/*指向要处理的第一个地址的指针*/
void* const* src_addr_ptr =&(eventConfig->FirstEntry);//这在 CLA<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

如果代码是从 C28x 运行的、则代码运行正确。