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.

FLASH memory protection on TMS570LS2125

Other Parts Discussed in Thread: TMS570LS2125

Hello,

I am working with a TMS570LS2125 and I want some sectors of flash memory to be protected from erasure and overwrite.


Can you please tell me where I can find the detailed information on how to protect the memory from erasure and overwrite.

  • I will forward your question to the device owner.

    Regards,

    Haixiao

  • sounds your question is answered in the following post:

    Flash security on TMS570LS3

    Regards,

    Haixiao

  • Hello,

    The correct answer depends on what you are trying to do.

    • Are you trying to prevent JTAG access to the flash memory?
    • You can use the JTAG Security Module (AJSM) to lock JTAG access to the part.
    • Are you trying to not erase a particular sector in flash?
    • How do you plan to erase the flash? If you are doing sector-erase, you can choose to not erase any sector you want as the API allows you to erase each sector one by one. If you are doing a complete bank-erase, you can choose to protect selected sectors by disabling them from the flash module configuration registers.
    • Prevent a sector from being over-written
    • You will need to mask out the desired sector from the linker command file such that the linker will not assign any part of the code to reside in this selected sector. Refer to the linker manual for information on defining memory regions and assigning code sections to these regions.
    Regards,
    Sunil
  • Hello Sunil,

    Thanks for your Answer.

    could you please tell me what are the Flash module configuration registers should be used to protect some sectors when erasing a bank in Flash memory.

  • Hello Shilpa,

    Sorry for the long delay.

    There is a register for each flash bank at address 0xFFF872A4. This is called the FSM_SECTOR register. There is one such register for each flash bank. The desired bank is selected using the FMAC (Flash Module Access Control) register.

    The FSM_SECTOR register has bits 15 down to 0 defined as the SECTOR_ERASED field. A bank can support up to 16 sectors, with each bit in this field associated with a sector number. You can write 1s to the sectors that you want to save from the erase before issuing a bank erase command.

    We are updating the TRM to include the description of the FSM_SECTOR register.

    Regards, Sunil