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.

TMS570LS1227: FEE synchronous mode doubt

Part Number: TMS570LS1227

Hello TI team,

I have question related  FEE driver .

1)  In FEE driver I've used synchronous mode, after calling TI_Fee_ReadSync() function the return variable is stored in oResult. Then TI_Fee_GetStatus() & TI_Fee_GetJobResult() are called and  the return variable is stored in Status & JOB_result respectively. So to check whether the reading is completed which variable is to be checked.

2) after calling TI_Fee_ReadSync() function the return value is E_NOT_OK, what action need to be taken.

Thank you.

  • Hi Nishant,

    1)  In FEE driver I've used synchronous mode, after calling TI_Fee_ReadSync() function the return variable is stored in oResult. Then TI_Fee_GetStatus() & TI_Fee_GetJobResult() are called and  the return variable is stored in Status & JOB_result respectively. So to check whether the reading is completed which variable is to be checked.

    Ans)

    Follow the operation procedure suggested in the User guide:

    That means you have to call the "TI_Fee_GetStatus" function after the "TI_Fee_ReadSync"  and have to verify whether status is "IDLE" or not, if it is IDLE means the operation was completed. But it doesn't mean the operation result was successful(i.e. getting read data), to verify this we have to call the TI_Fee_GetJobResult function and if this function returns JOB_OK then that means the operation was successful without any errors.

    The above suggested procedure will be applicable for both "TI_Fee_ReadSync" or "TI_Fee_Read"

    But for "TI_Fee_ReadSync" function you can also just use return status of this function directly, because as it is a sync function it will get execute till the operation complete(like polling) and it doesn't require external calls of "FeeManager" functions unlike the "TI_Fee_Read". So that means if return value is E_OK for the "TI_Fee_ReadSync" function then that means the read operation is successfully executed and we got the data but this will not applicable for "TI_Fee_Read", for this function we have to follow the first suggested procedure only.

    2) after calling TI_Fee_ReadSync() function the return value is E_NOT_OK, what action need to be taken.

    Ans)

    If the return status of the TI_Fee_ReadSync function is E_NOT_OK means there are several reasons.

    It could be due to the the module UNINIT state, in this case you have to make sure the application called init function before the read function.

    It could also due to module BUSY and BUSY_INTERNAL internal states, in this case application have to wait and call the function again.

    It could also due to the improper arguments i.e. BlockNumber, BlockOffset and Length values are out of range, in this case the application should make sure to pass proper values.

    --

    Thanks,

    Jagadish.

  • thank you Jagadish 

  • Hello Jagdish,

    If TI_Fee_ReadSync() returns E_OK and TI_Fee_GetJobResult returns BLOCK_INVALID, is this considered an error? How should this situation be handled? Can it be ignored or is some corrective action required?

    Thank you

    Nishant Soni 

  • Hi Nishant,

    Don't ignore it, there is a error.

    If you got the TI_Fee_GetJobResult return value as other than JOB_OK means there is a error in the operation,

    Please consider like  E_OK return value of the TI_Fee_ReadSync() function as Job accepted but if TI_Fee_GetJobResult  status is other than JOB_OK means there must be error.

    Regarding BLOCK_INVALID function i want to ask you two things 

    1. Please make sure to call the TI_Fee_Init() before any other Fee functions.

    2. Are you reading data after writing some data or without writing any data?

    --

    Thanks,

    Jagadish.

  • Hello Jagdish,

    For the questions you asked

    1. Please make sure to call the TI_Fee_Init() before any other Fee functions.

    Ans: No we don't call any function before TI_Fee_Init().

    2. Are you reading data after writing some data or without writing any data?

    Ans:  If the memory is been erased while flashing the code and there is no data in memory this issue occurs, else if data is present in memory reading is  done.

     

    Thank you,

    Nishant Soni

  • Hi Nishant Soni,

    I checked with development team and i got a feedback that

    Should not perform read operation before write operation, if we do that then we will end up with Block Invalid error.

    So please perform write operation before doing read operation.

    --

    Thanks & Regards,

    Jagadish.