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.

Can Diagnostic FLA13 be implemented without the Flash Library?

Part Number: TMS570LC4357

Hi experts,

The Safety Manual mentiones Diagnostic FLA13 / Software Test of Flash Sector Protection Logic which requires us to write to protected region of the flash to check that the protection logic prevents the write.

The Problem is, that we do not use the Flash Library. So writing to the Flash does not seem possible to us.
The document you referenced here https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1088699/tms570lc4357-flash-how-to-write-a-few-bytes-to-flash-without-the-flash-library still uses the Library.

(Q1) Is it okay to not do this Test due to us not writing to flash during runtime?

(Q2) If we still have to do this test, how can we execute this without the Library?

Thank you and best regards,
Max Wittekind

  • Hi Max,

    The flash content is protected from modification. There is one register called Flash Bank Protection Register (FBPROT). When bit 0 of FBPROT register is zero, which is default value, the level 1 protection is enabled which means that writing to flash sector enable register is disabled. If the flash sector is enabled, the sector can not be erased and programmed.

    You can check if the FBSE (flash bank sector enable register) is writable if the level 1 protection is enabled or disabled.

  • Hi Max,

    For test purpose, you can write one 64-bit work and its ECC to a flash location for example 0x200000 through flash registers (no APIs are needed).

    Please refer to SPNA148.pdf (Advanced F021 Flash API Erase/Program Usage).

  • Hi QJ,

    Since we do not have any code writing to Flash a Test of the level 1 protection should be enough. If that is working it is not possible to write to any location in flash correct?

    What would be the error response of trying to write FBSE with level 1 protection enabled?
    Is the write simply ignored or does this lead to a data abort?

  • What would be the error response of trying to write FBSE with level 1 protection enabled?
    Is the write simply ignored or does this lead to a data abort?

    If the level 1 protection is enabled, writing to FBSE register will be ignored, there is no error response.