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: Note on running SL_SelfTest_SRAM from safety diagnostic library

Part Number: TMS570LC4357


Tool/software:

HI, I'm trying to use Safety Diagnostic Library with TMS570LC4357.

In SRAM self test function document, there is a note about running it: Note : When performing SRAM_PAR_ADDR_CTRL_SELF_TEST user must ensure to have a special esm_handler routines without any Stack or other RAM access to avoid unexpected error reporting.


There are 2 solutions I can think of: 1. writing an ESM handler as note says and 2. temporarily disabling ESM interrupt when function is running.

I want to ask about each solutions.

1. How would I approach writing special esm handler? I understand it should be in assembly to prevent compiler from SRAM. I might be able to clear ESM flags in assembly but how would I return from the handler? Wouldn't returning need stack access for return address?

Also, is switching esm handler to special routine simply writing value to VIM RAM?

2. Simply temporarily disabling ESM interrupt would be much easier. I'd just clear ESMIECR1, ESMIECR4 and ESMIECR7 before starting self test and restore them after. Is this a valid approach?

Thanks for your help!