BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: Eve Screen Designer Code Hangs - additional error handling required  (Read 9114 times)

riforifo

  • Newbie
  • *
  • Posts: 4
    • View Profile

Hello,

Due to EMI issues, sometimes our application hangs at ESD_WaitSwap() function

We traced the problem to below function  EVE_Cmd_waitFlush.
while ((rp = EVE_Cmd_rp(phost)) != (wp = EVE_Cmd_wp(phost)))   needs a break addition.

Our application has a part that produces 320V, 1.2A for a couple of seconds. The coprocessor doesn't give any errors but the code hangs at the above while loop.

We implemented the following case, your comments on to why and how to get rid of / handle this error are welcomed.
Our board is NHD-3.5-320240FT-CSXN-CTP from New Haven (has an FT813 on it)

Code: [Select]
bool EVE_Cmd_waitFlush(EVE_HalContext *phost)
{
uint16_t rp, wp;
uint16_t flushCnt = 0;

eve_assert(!phost->CmdWaiting);
phost->CmdWaiting = true;
while ((rp = EVE_Cmd_rp(phost)) != (wp = EVE_Cmd_wp(phost)))
{
flushCnt++;
if(flushCnt >= 200){
flushCnt = 0;
eve_stop_flag = 1;
eve_printf_debug("[ERR-394]flushCnt >= 200\n");
break;
}

// eve_printf_debug("Waiting for CoCmd FIFO... rp: %i, wp: %i\n", (int)rp, (int)wp);
if (!handleWait(phost, rp))
return false;
}

/* Command buffer empty */
phost->CmdWaiting = false;
return true;
}
Logged