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.

TMS570LC4357: Safety Libary 2.4.0 Demo Projekt, SL_SelfTest_PBIST

Part Number: TMS570LC4357
Other Parts Discussed in Thread: TEST2

Hi,

I think the demo project with the safety library 2.4.0 is not working correct.

In code Line 1936 "for(i = 0;i < (sizeof(all2portmemories));i++)" the size is not calculated correctly because "all2portmemories" is defined as 64bit. I think it should be

for(i = 0;i < (sizeof(all2portmemories) / sizeof(uint64);i++)

Than it is working.

Best regards

Lars

  • Sorry,
    Code line 1936 in file "app_main_NoOS.c".
  • Hello Lars,

    From what I can see, I agree with you on this. This might also be masked in the demo application because retval is overwritten on the execution of each diagnostic test. i.e., If test1 is executed and fails but then test2 executes and passes the value seen in retval would be pass and the status of test1 would be lost. Although this code is only intended as a set of examples of how to make the function calls for many of the diagnostics and has not gone through the same level of testing as the diagnostic library functions, I believe that the code can be improved to offer a bettwe depiction of how to run the diagnostics and capture the results and that the issue at line 1936 with the sizeof unary operator can be improved.

    I will enter a ticket on these two points so they can be addressed in the next release of the safeTI diag Lib and provide a better example of how to use the SafeTI Diag Lib.
  • Hello Brandon,

    On a more detailed review, I see that the errors are being logged after each diagnostic call so this is not an issue that needs to be addressed. I have, however, created a SW ticket on the sizeof(array) issue.