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.

TMS320F28388D: After doing ESC_resetESC how long to wait before initialize ESC Memory

Part Number: TMS320F28388D


Tool/software:

Hi, 

  We have boot code that sets up the ESC to allow us to use FoE for firmware updates. When the runtime code is launch I ran into an issue where I need to reset the ESC in the runtime code. If I do NOT put a wait after the RESET then we fail the memory setup. See code below: My code I added was the SysCtl_delay of 20000 ns. Is there any documentation on how long to wait after the ESC_resetESC?

    //
    // Reset ESC
    //
    ESC_resetESC();

    // Add a delay to let the ESC settle down especially coming from boot code
    // This small amount allows us to then be able to reconfigure the ESC Memory
    SysCtl_delay(ESC_RESET_DELAY);

    //
    // Initialize ESCSS Memory
    //
    ESCSS_initMemory(ESC_SS_BASE);

    //
    // Wait for ESCSS memory initialization to complete
    //
    if(ESCSS_getMemoryInitDoneStatusBlocking(ESC_SS_BASE, memoryTimeOut) !=
       ESCSS_API_SUCCESS)
    {
    Log(LOG_MOD_ETHERCAT, LOG_ERROR, "%s: unable to initialize ESCSS memory\r\n", __FUNCTION__);
    return(ESC_HW_INIT_FAIL);
    }

Dorion 

  • Hi Dorion,

    When the runtime code is launch I ran into an issue where I need to reset the ESC in the runtime code. If I do NOT put a wait after the RESET then we fail the memory setup.

    This issue of needing the additional delay is only after a FoE firmware update? Not during initial bring-up and before the update, correct? Can you share more details on how you're performing the firmware update / FoE?

    There's no documentation explaining a need for additional delay. Can you try increasing memoryTimeOut value in your code?

    Best,

    Kevin

  • Hi Kevin, 

      What we do is we have boot code that with init, start and run EtherCAT in the bootcode. It is specifically for downloading code using FoE (S-Records). Once we program the runtime code into flash, we jump to it. The runtime code will init, start and run the EtherCAT code. Remember the EtherCAT has already been setup, I want to reset it and set it up again in the runtime code. However during the init phase we get an error waiting on EtherCAT memory (See code snip above). If i wait a short period of time before accessing memory then it works. 

      Adding a longer memory delay is basically doing the same thing. I would assume it would work. 

      Has anyone on the EtherCAT team seen and issue like this. Basically I want to setup the ESC twice, but reset in-between. 

    Dorion