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.

AM335x EtherCAT Slave Controller Process data corruption with Industrial SDK 01.01.00.08

Our customer has the problem that process data are not updated frequently. The problem occurs with 01.01.00.08 and does not occur with 01.01.00.06. They have found difference between 01.01.00.08 and 01.01.00.06 in those source codes.
In 01.01.00.08:
====================================================================================================
__inline Uint16 bsp_get_process_data_address(Uint16 address, Uint16 len, Int16* p_sm_index)
{
    Uint16 addr = 0;
    Int16 sm_index = bsp_get_sm_index(address, len);
    //Find corresponding SYNC manager and store index in sm_index
    if (sm_index == -1) {
        return 0;
    }  
    if (p_sm_index)
    {
         *p_sm_index = sm_index;
    }
    /* called while SM is disabled ?! should never happen; just in case... */
    if (sm_properties[sm_index].physical_start_addr == 0)
    {
        return 0;
    }
    /* are we already accessing this sm ?! in this case "lock_state" will be
     * "LOCK_PD_BUF_HOST_ACCESS_START" and we do not need the "while()"-loop... */
    if (pHost2PruIntfc->sm_processdata[sm_index - 2].lock_state != LOCK_PD_BUF_HOST_ACCESS_START)
    {
        do {
            /* May we access the buffer (LOCK_PD_BUF_AVAILABLE_FOR_HOST)? */
            if (pHost2PruIntfc->sm_processdata[sm_index-2].lock_state == LOCK_PD_BUF_AVAILABLE_FOR_HOST)
            {
                    pHost2PruIntfc->sm_processdata[sm_index-2].lock_state = LOCK_PD_BUF_HOST_ACCESS_START;
                    ASSERT_DMB();
                    break;
            } else {
                Task_yield();
            }
        }while(1);
    }
 
    if (pHost2PruIntfc->sm_processdata[sm_index-2].lock_state == LOCK_PD_BUF_HOST_ACCESS_START)
    {
       addr = pHost2PruIntfc->sm_processdata[sm_index-2].addr;
       addr = addr + (address - sm_properties[sm_index].physical_start_addr);
    }
    return addr;
}
====================================================================================================
In 01.01.00.06:
====================================================================================================
__inline Uint16 bsp_get_process_data_address(Uint16 address, Uint16 len, Int16* p_sm_index)
{
    Uint16 addr = 0;
    Int16 sm_index = bsp_get_sm_index(address, len);
    //Find corresponding SYNC manager and store index in sm_index
    if (sm_index == -1) {
        return 0;
    }  
    if (p_sm_index)
    {
         *p_sm_index = sm_index;
    }
    /* called while SM is disabled ?! should never happen; just in case... */
    if (sm_properties[sm_index].physical_start_addr == 0)
    {
        return 0;
    }
    /* are we already accessing this sm ?! in this case "lock_state" will be
     * "LOCK_PD_BUF_HOST_ACCESS_START" and we do not need the "while()"-loop... */
    if (pHost2PruIntfc->sm_processdata[sm_index - 2].lock_state != LOCK_PD_BUF_HOST_ACCESS_START)
    {
        do {
            /* May we access the buffer (LOCK_PD_BUF_AVAILABLE_FOR_HOST)? */
            if (pHost2PruIntfc->sm_processdata[sm_index-2].lock_state == LOCK_PD_BUF_AVAILABLE_FOR_HOST)
            {
                Int32 timeout = 10000;
                while (bsp_hwspinlock_lock(sm_index)&& (timeout > 0))
                {
                    timeout--;
                }
                if (timeout > 0)
                {
                    pHost2PruIntfc->sm_processdata[sm_index-2].lock_state = LOCK_PD_BUF_HOST_ACCESS_START;
                    ASSERT_DMB();
                    bsp_hwspinlock_unlock(sm_index);
                    break;
                } else {
                    bsp_hwspinlock_unlock(sm_index);
                    return 0;    
                } 
            } else {
                Task_yield();
            }
        }while(1);
    }
 
    if (pHost2PruIntfc->sm_processdata[sm_index-2].lock_state == LOCK_PD_BUF_HOST_ACCESS_START)
    {
       addr = pHost2PruIntfc->sm_processdata[sm_index-2].addr;
       addr = addr + (address - sm_properties[sm_index].physical_start_addr);
    }
    return addr;
}
====================================================================================================
Why are bsp_hwspinlock_lock() and bsp_hwspinlock_unlock() removed in 01.01.00.08?
I know that usage of bsp_hwspinlock_lock() is different between 01.01.00.08 and 01.01.00.06 but do not understand the difference because I do not understand the usage.
Best regards,
Daisuke