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.
工具/软件:Code Composer Studio
您好!
我打算使用 CLA 读取 ADCRESULT 并进行滤波。 但是、在 CLA 任务1中执行的下面的代码一直在擦除我在 epwm1寄存器中设置的值。 奇怪的是、这是在调试和加载程序后随机发生的、这意味着有时它运行正常、但有时它会擦除 epwm1中的设置并向其写入不需要的值。 您是否知道发生这种情况的原因?
depot.position++;
if (depot.position >= SMA_size)
{
depot.position = 0;
}
depot.VIN[depot.position]= VINDC;
VINDC 是指 ADCRESULT1。 "depot"是 main.c 中声明的结构、位于"Cla1DataRam0"中。 "position"的数据类型为 int16_t、"VIN"是 int16_t 的数组
非常感谢您的帮助。
Amy
Amy、
不清楚 ePWM 寄存器的写入是如何发生的。 如果能够持续复制、则更容易进行调查。
此致
Lori