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.

RM48L952: SafeTI & TRM: ECC DIAGMODE = 7

Part Number: RM48L952

Hi,

TRM gives steps in chapter 5.2.5.6 for the test:
1. Make sure the true DMA module is off

What is this "true DMA module" does this mean "the one and only DMA module"  mentioned in TRM chapter 16? If yes, why SafeTI does not check that in entry condition checks? If yes, then any of these tests using this mode cannot be run in case DMA is running (in case you use DMA for receiving something there is practically no change to stop it...)?

Same chapter 5.2.5.6 describes rest of the procedure steps, in step 4 (before that FPAR_OVR register is set in steps2-3) DIAGCTRL register is written and in step 5 the fault is injected (DIAGCTRL "DIAG_TRIG" is not mentioned anywhere).

How ever chapter 5.6.2 has completely opposite instruction, it says that first write certain values to DIAGCTRL and then rest of the registers and finally set DIAG_TRIG (which is one shot)

For all modes it is best to follow this sequence.
1. Write 0101 to the DIAG_EN_KEY register and set the desired DIAG_MODE. This will block many UERR sources.
2. Set any data registers needed for this mode.
3. Writea one the DIAG_TRIG to initiate the action and allow UERRs to happen for one cycle.
4. Write 1010 to DIAG_EN_KEY to exit the diagnostic modes

This instruction is completely opposite than instructions in 5.6.2.5 which instructs to first set other registers than DIAGCTRL .

Also 5.6.2 requires that DIAG_TRIG is set in order to anything to happen (FLASH_ADDRESS_PARITY_SELF_TEST does not set DIAG_TRIG and something still happens)

"Only DIAG_EN_KEY=0101 will enable any diagnostic mode and all diagnostic modes use the DIAG_TRIG to initiate the action"

5.6.5.6 does not mention anything about ADD_INV_PAR par. That is reference in only FPAR_OVR register content description table and this is used by the FLASH_ADDRESS_PARITY_SELF_TEST. Selftest also does not set DAT_INV_PAR so it is 0 (checked that) based on syndrome is should result to "good".


There is something what I can't understand or TRM text contains errors, also tried to test FLASH_ADDRESS_PARITY_SELF_TEST or its fault inject counter part by setting DIAG_TRIG (and removing barrier access) like it is in other flash tests in SafeTI but cannot see any differences :
        //_SL_Barrier_Data_Access();
        sl_flashWREG->FDIAGCTRL |= F021F_FDIAGCTRL_DIAG_TRIG;
        flashread = *(volatile uint32 *)flashBadECC1;

The reason for digging this in this level was originally unexpected data_abort in FLASH_ADDRESS_PARITY_SELF_TEST (which occurs also in SafeTI demo application which indicates that it is not me who makes that data_abort despite of is the DMA running or not).
https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/602737


There looks to be also a documentation bug in TRM:

2. Put 0101b into PAR_OVR_KEY and 101b into DAT_INV_PAR fields (00005Axxh) of the FPAR_OVR register (0x7C).

101b must mean "into BUS_PAR_DIS" since otherwise that 00005Axxh pattern does not match?

  • Hello,

    “True DMA module” means the DMA module on the device. Before call the function for ECC data correction diagnostic mode 7, the DMA has to be turned off.

    There are bugs in the sequence for diagnostic mode 7:

    It should set the DIAG_MODE and the DIAG_EN_KEY first before setting up the other registers to block the other registers from causing a false error. The sequence (in 5.6.2) is correct. 

     The #2 in mode 7 sequence should be:

    2.  Put 0101b into BUS_PAR_DIS and 101b into PAR_OVR_KEY fields (00005Axxh) of the FPAR_OVR register (0x7C).

    The DIAG_TRIG is needed (diag_trig=1) after all registers are loaded with intended values. The DIAG_TRIG serves to validate the diagnostic result. Only when DIAG_TRIG is set to  and a failing result in the diagnostic logic will update the corresponding status flag and the position register.

    Regards,

    QJ

  • Hello,

    Does the DMA module needs to be turned off in case it does not read anything from the flash (ours is moving data only from peripherals to CPU RAM or vice versa so no flash access)? If yes, then this critical check is missing from entry conditions from flash & fee tests in SafeTI. If no, then SafeTI user manual misses that quite critical detail from notes and DMA shall not operate flash...

    In case the DMA needs to be turned off without exceptions (which is most likely either impossible or at least really complex task to suspend application receiving/sending the data from/to outside world) do you need to run the FLASH (or FEE) test during runtime? For STC (and PBIST) is said in multiple locations in 'public e2e' that usually there is no need to perform them ever periodically and for these tests there is also unique identifier with A/B selections), is this somehow application depended or something? Based on quick evaluation in FMEDA excel only FLA5B & FLA7 has impact to FIT, all other FLA tests can be 0 and FIT (&other diagnostics values) stays in same value some basically any of the flash-related SafeTI tests does not have any effect to FIT. Is this "do you need to run test X" or "FIT" discussion going to 'private e2e scope'?

    What is the safety related point of running these tests (at all, not even in boot) in case those has not any impact to FIT?

    I run those tests also once in "recommended" CPU start-up phase number 30 concerning flash tests (http://www.ti.com/lit/an/spna106d/spna106d.pdf but with FIQ or IRQ disabled it is not same, since then you cannot be sure that FIQ or IRQ is signaled correctly in real situation, FIQ concers only 1 test in FLASH and IRQ another one, others generates data_abort which goes through also in start phase. I also think that fault injection tests should be run at least once with FIQ&IRQ enabled in order to be sure that real faults are really catched in application level also.

    Currently I have all FEE & FLASH tests running periodically (and DMA run's also continuously but does not operate flash, it just moves data from ram to ram in forever continuous loop) without any known side effect/issues to our application after some modification of SafeTI code (https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/602739. Now based on this discussion I am starting to having feeling that the work what I have been doing with these particular tests (flash&fee) may be at least partly if not completely useless since there is no actual effect to FIT, DMA should be turned off (which I doubt that we could do in runtime which that tests should be dropped from excel). Of course moving these test to be performed once before DMA is started but after FIQ/IRQ enabled is doable quite easily in case there is a need to run them at least once with FIQ&IRQ enabled but is there any need even for that since no change in FIT?


    Based on your comments there are then something wrong in the FLASH_ADDRESS_PARITY_SELF_TEST or somewhere else (my understanding perhaps?) since it does not set that DIAG_TRIG bit at all. I also understood from TRM that DIAG TRIG (or whole flash diagnostics concept) is one shot but this FLASH_ADDRESS_PARITY_SELF_TEST (and it's fault injection version) keeps generating group2 ESM error unless FPAR_OVR register is not disabled in sl_esm.c FIQ handler and there is 0x5400 write for that 'normal' test (in case tests fault inject version calls user esm_callback before 0x5400 is written then SR[1] has again bit up and in that case new FIQ request is set so the code ends up in FIQ-loop. Of course FIQ loop could be also avoided by writing that same 0x5400 and acking the re-risen SR[1] in application callback but since this is one shot diagnostics test I think that application level shouldn't need to do that it should be enough to check that SSR2 has bit up (for normal test SafeTI does not check that SSR2 acticity, it only checks that ADD_PAR_ERR is active, other tests checks also SSR2 register content)), that should not happen in case this diagnostics it is "one shot" or I just miss/haven't noticed some small but really important detail from somewhere.

    Maybe some of this discussion should be under those 2 threads so feel free answer into other threads in case you feel that answers is better there...

  • Just noticed that this DMA concerns only diag mode 7, not other diag modes, so FEE is out of scope and FLASH_ECC_ADDR_TAG_REG_MODE flash tests what comes to DMA requirement. So it is at least ok to run FEE  and that 1 flash tests periodically from DMA point of view.