A method of protecting content embedded in a programmable system, the system having at least one Application Specific Integrated Circuit (ASIC) executing an application, and a non-volatile storage element accessed through the ASIC including a protected region and an unprotected region storing content, the ASIC and the NV storage element being encapsulated inside the system, the method comprising the steps of: assigning at least one of a plurality of access modes to at least one access port of the programmable system for receiving access port commands from an external device, the access modes including at least: an unrestricted access mode in which: received access port commands are executed; and a restricted access mode in which: received access port commands are executed if the received access port commands are not associated with reading from or writing to the protected region; and received access port commands are not executed and a dummy response is provided when the received access port commands are associated with reading from or writing to the protected region; receiving one or more access port commands provided by the external device at the access port and executing or not executing each of the one or more access port commands in accordance with the access mode assigned to the access port; and switching the restricted access mode to the unrestricted access mode without exposing the content of the protected region to the external device via the access port by deleting or obfuscating the content of the protected region. assigning at least one of a plurality of access modes to at least one access port of the programmable system for receiving access port commands from an external device, the access modes including at least: an unrestricted access mode in which: received access port commands are executed; and a restricted access mode in which: received access port commands are executed if the received access port commands are not associated with reading from or writing to the protected region; and received access port commands are not executed and a dummy response is provided when the received access port commands are associated with reading from or writing to the protected region; an unrestricted access mode in which: received access port commands are executed; and a restricted access mode in which: received access port commands are executed if the received access port commands are not associated with reading from or writing to the protected region; and received access port commands are not executed and a dummy response is provided when the received access port commands are associated with reading from or writing to the protected region; received access port commands are executed if the received access port commands are not associated with reading from or writing to the protected region; and received access port commands are not executed and a dummy response is provided when the received access port commands are associated with reading from or writing to the protected region; receiving one or more access port commands provided by the external device at the access port and executing or not executing each of the one or more access port commands in accordance with the access mode assigned to the access port; and switching the restricted access mode to the unrestricted access mode without exposing the content of the protected region to the external device via the access port by deleting or obfuscating the content of the protected region.