This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

seсurity bit in AT91SAM7S

Hi, i have a question about an access restriction of writing to on-chip flash after setting the security bit. Can i program the flash through an EFC after setting the security bit?

Parents Reply Children
  • if you set the security bit, you can erase the internal flash using JTAG but not read it.

  • This sounds like a good question for the datasheet/user manual to answer.

    Some processors have one security bit for the flash and a second security bit for JTAG.

    But the goal with having a security bit for the flash is to try to stop all external access to the flash contents, to stop a thief from making a copy of the program to make cloned units or from retrieving security keys or similar. It is likely that such a thief has access to a JTAG adapter so a good chip should have support to either lock out all JTAG access, or to at least lock out the JTAG interface from reading the flash. In reality, it isn't even that simple. A JTAG interface that is allowed to download program code to RAM, can download a little application that reads out all flash contents.

    So your datasheet/user manual should tell you if your chip has a (at least thought to be) working security implementation or if it is broken and allows you to circumvent the protection using JTAG.

  • A JTAG interface that is allowed to download program code to RAM, can download a little application that reads out all flash contents.

    In case of the AT91SAM7S, the security bit blocks all external accesses to flash (read + write) except for a full chip erase (which will also reset the security bit after the erase operation finishes).