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.
您好、专家!
我已经配置了一个由 ADC 中断触发的 CLA 任务。
ADC 中断正常运行、
但是、代码在 CLA 任务的第一行停止、恢复后不执行任务内的代码。
作为参考、我在 CLA 任务内递增 U16变量、但其值始终保持为0。
我的 CLA 配置如下:
CLA 初始化:
void CLA_init() { #ifdef _FLASH #ifndef CMDTOOL // Linker command tool is not used extern uint32_t Cla1ProgRunStart, Cla1ProgLoadStart, Cla1ProgLoadSize; extern uint32_t Cla1ConstRunStart, Cla1ConstLoadStart, Cla1ConstLoadSize; // // Copy the program and constants from FLASH to RAM before configuring // the CLA // memcpy((uint32_t *)&Cla1ProgRunStart, (uint32_t *)&Cla1ProgLoadStart, (uint32_t)&Cla1ProgLoadSize); memcpy((uint32_t *)&Cla1ConstRunStart, (uint32_t *)&Cla1ConstLoadStart, (uint32_t)&Cla1ConstLoadSize ); #endif //CMDTOOL #endif //_FLASH cla1_init(); }
CLA 任务:
volatile uint16_t claTestVar_u16; __attribute__((interrupt)) void Cla1Task1() { claTestVar_u16++; }
claTestVar_U16存储在存储器中的什么位置? 再次检查 CLA 是否能够写入此存储器- CLA 到 CPU 消息 RAM、或者 CLA 已将 LS RAM 所有权授予 CLA。
您好、Lori:
该变量存储在属于 LS01 RAM 的0x8800地址上(在.map 文件中检查)。
我们还在 SysConfig 的 MEMCFG 中选择了用于 CLA 的 LS01。
还在链接器文件中为 CLA RAM 配置了 LS01。
CLA 任务正在执行。 我们可以使用_mdebugstop ()来到达断点,但变量值保持0并且没有改变。
随附了 mapfile、memcfg 配置和链接器脚本的屏幕截图。
因此、CLA 到 CPU 和 CPU 到 CLA RAM 的初始化缺失、在完成这些操作之后、CLA 任务按预期执行。
谢谢