主题中讨论的其他器件:SysConfig
工具与软件:
尊敬的专家:
当我测试代码 执行时间时使用两种方法:
1:用 CCS 编程后,不要关闭电源,现在 测试代码执行时间,时间是10us ;
2.关闭电源再打开电源,不要拔下仿真器、测试代码执行时间,时间为50us ;
为什么再次上电后代码执行时间会增加?μ s
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.
工具与软件:
尊敬的专家:
当我测试代码 执行时间时使用两种方法:
1:用 CCS 编程后,不要关闭电源,现在 测试代码执行时间,时间是10us ;
2.关闭电源再打开电源,不要拔下仿真器、测试代码执行时间,时间为50us ;
为什么再次上电后代码执行时间会增加?μ s
尊敬的 Youjun:
请确保您的代码调用 Flash_initModule()以正确地初始化闪存。 如果使用 SysConfig、请注意这一点。 初始化代码应如下所示:
#ifdef _FLASH
#ifndef CMDTOOL
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
#endif
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif
此致、
Ibukun