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.
工具与软件:
尊敬的 Champs,
我的客户正在尝试在每个内核上使用2个单独的功能。 例如、函数1将在 R5_0_0上运行、函数2将在 R5_0_1上运行。
当函数1在 R5_0_0上运行时、我的客户未能运行下面中的延迟函数并且发现发生了中止。
空洞 software_delay_ms (unsigned int ms){
volatile unsigned int i、j;
对于(i = 0;i < ms;i++){
对于(j = 0;j < 20000;j++){//
_asm (" NOP");//无操作、
}
}
}
main ()
{
while (1)
{
DebugP_log ("Core 2正在运行...\r\n");
software_delay_ms (1000); => 工作正常
//const TickType_t xDelay = 1000 / portTICK_PERIOD_MS;
//vTaskDelay (xDelay);=> 发生了中止
//sys_msleep (1000);=>发生了中止
// ClockP_usleep (1000*1000);=>发生了中止
}
}
这些延迟函数(如 vTaskDelay ()、sys_msleep ()、ClockP_usleep ())是否使用内部计时器硬件模块来计算时间?这就是它们在 R5_0_1中遇到异常中断的原因?
谢谢、此致、
SI
您好、SL:
很抱歉这么晚才回复。 我在过去三周的商务旅行。
我刚刚在我的 LED 闪烁示例项目中测试了您的延迟函数。 工程被加载到 CPU core2 (R5FSS1-0)中。 它会按预期运行
附件请查找我的 CC 项目: