Setsecurity (), Secstatus (), Table 5: security mode actions allowed – Maxim Integrated 73S12xxF Software User Manual
Page 70: E 70), Table 5
73S12xxF Software User Guide
UG_12xxF_016
70
Rev. 1.50
If the passcode has changed 8 times prior to entering Mode 2, it will be disabled since no more passcode
changes are allowed. Since this mode is controlled by firmware, it can be reset/re-initialized by using the
ICE to reprogram the Flash.
Table 5: Security Mode Actions Allowed
Action
Mode 0
Mode 1
Mode 2
PassCode Change
No
Yes
2
No
Program Space Visible via the ICE
Flctl SFR bit 6:
Set - No
Not Set - Yes
No
Yes
Flash Programmable via ICE
Yes
1
No
Yes
Flash Program via Boot Loader
Yes
Yes
2
No
1
To reprogram the Flash using the ICE, hit the Erase button via the ICE, hit Reset on the EVB, then
reload the Flash. If the new program has the FlCtl SFR security mode bit (bit 6) set, the ICE will continue
to be disabled (this is the case for all firmware with 'BL' in the filename).
2
The Passcode and Boot Loader reside on the first page of Flash, which is protected by Mode 1. In
order to completely protect the Flash, enable Mode 2 which will disable Passcode and Boot Loader
changes.
SETSecurity ()
Purpose
Set the hardware security to Mode 0 or Mode 1. Care must be taken as once this
API is finished, the action is not reversible.
Synopsis
void SETSecurity ( U08 Mode )
Parameters
Mode: Input parameter
MODE0 – This mode only works when the Flash Control SFR (0xB2 bit 6) is set.
LAPI-MBL.lib was built with this SFR already setup for this mode.
MODE1 – The security bit (JP15 on the 1215 EVB) must be set high in order to set
this mode.
Return Codes None.
SECStatus ()
Purpose
The current hardware security status of the part. This function only returns the
hardware security status (MODE 0 or MODE 1). Since Mode 2 is a
firmware/application level control, it will not be reported.
Synopsis
U08 SECStatus ( void )
Parameters
None.
Return Codes MODE0 = BIT0 (0x01) – returned if the part is already in MODE 0.
MODE1 = BIT1 (0x02) – returned if the part is already in MODE 1.
0x00 – returned if no security mode setup has been performed on the part.