Part Number: MSP432E401Y
Hello TI,
Our MSP432E401Y application has a zero latency interrupt that consumes around 50% of the processing capability.
When the flash prefetch is turned off this grows to exceed 100% of processor time which starves the RTOS completely, so it is unable to turn flash prefetch back on.
Syscfg autogenerates ti_ndk_config.c which looks to try to restart the network stack when it fails:
/* 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);
This eventually calls 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);
...
}
I can't see a way out of the flash prefetch being turned off using current NDK and Syscfg.
As far as I can imagine, my only chance of a workaround is run the zero-latency interrupt from RAM. Is execution from RAM as quick as prefetched Flash?
Can you provide a solution here that either does not trigger the flash prefetch being disabled?
Thanks.