您好、TI!
我们的 MSP432E401Y 应用具有零延迟中断、消耗约50%的处理能力。
当关闭闪存预取功能时、这会增加到超过100%的处理器时间、从而使 RTOS 无法完全启动、因此无法重新开启闪存预取功能。
SYSCFG 会自动生成 ti_ndk_config.c、后者会在失败时尝试重新启动网络栈:
/* Boot the system using this configuration
*
* Loop until the function returns 0. This facilitates a reboot command.
*/
do
{
rc = NC_NetStart(hCfg, NULL, NULL, netIPAddrHook);
/* user reboot hook == null */
} while (rc > 0);
这最终会调用 EMACMSP432E.c:
static int EMACMSP432E4_emacStart(struct NETIF_DEVICE* ptr_net_device)
{
...
key = HwiP_disable();
/*
* This is a work-around for the EMAC initialization issue found
* on the TM4C129 devices. This can be found in the silicon errata
* documentation spmz850g.pdf as ETH#02.
*
* The following disables the flash pre-fetch (if it is not already
* disabled).
*/
ui32FlashConf = FLASH_CTRL->CONF;
if ((ui32FlashConf & (FLASH_CONF_FPFOFF)) == false) {
enablePrefetch = true;
ui32FlashConf &= ~(FLASH_CONF_FPFON);
ui32FlashConf |= FLASH_CONF_FPFOFF;
FLASH_CTRL->CONF = ui32FlashConf;
}
EMACPHYConfigSet(EMAC0_BASE, EMAC_PHY_CONFIG);
...
}
我看不到使用当前 NDK 和 SYSCFG 关闭闪存预取的方法。
据我所料、我唯一变通办法的机会是从 RAM 运行零延迟中断。 从 RAM 执行的速度是否与预取的闪存一样快?
在这里、您能否提供一个不触发闪存预取禁用的解决方案?
谢谢。