3. Boot and security and OTP control (BSEC)

3.1 Introduction

The BSEC (boot and security and OTP control) is intended to control an OTP (one time programmable) fuse box, used for on-chip non-volatile storage for device configuration and security parameters.

3.2 BSEC main features

3.3 BSEC functional description

BSEC provides an interface to the OTP (also known as anti-fuse macro) containing 3072 useful bits. BSEC also provides several registers used by the Boot process as well as mechanisms to prevent access to security sensitive information.

3.3.1 BSEC block diagram

Figure 5. BSEC block diagram

BSEC block diagram showing internal components and external interfaces.

The diagram illustrates the BSEC (Boot and security and OTP control) block structure. The BSEC block contains several internal components: Upper OTP shadow register, Lower OTP shadow register, APB interface decoder TrustZone, Control and security logic, SAFMEM sequencer (2 flexible memories), Read initialization of flexible memories, and Program / read flexible memories. External interfaces are shown on the left and right. On the left, SoC system control provides pwrok, rstcore_n, fuseok, and otp_data_valid signals. APB provides an interface to the APB interface decoder TrustZone. On the right, the SAFMEM interface receives clk, pdn, rstn, and other signals. The SoC interface includes jtagin[15:0], jtagout[15:0], fdis[14:0], and hws[255:0]. The CoreSight authentication interface includes dbgen, niden, spiden, spniden, deviceen, and dbgswenable. The Cortex-A7 interface includes cfgsdisable and cp15sdisable[1:0]. The HDP interface receives hdpen. The diagram is labeled MSv46603V4.

BSEC block diagram showing internal components and external interfaces.

3.3.2 Interface to OTP

OTP bits are grouped in words of 32 bits each and are organized in two regions:

Note: OTP bits are initially set to 0 and can be programmed once to one.
Lower OTP words, using 2:1 redundancy, can be bitwise programmed in several operations
Upper OTP words, using internal ECC, must be programmed in a single operation as a bulk 32 bits data.

The OTP bits are not directly accessible by the CPU. Instead the CPU must access shadow registers that contain copies of the OTP useful bits.

There are 96 shadow registers: BSEC_OTP_DATA0 to BSEC_OTP_DATA95.

These 32-bit registers are copies of actual OTP bits. Redundancy and ECC are made transparent to the user. BSEC_OTP_DATAx are also referred to OTP word #x in this document.

There are two possibilities to update the shadow registers:

The following OTP useful bits have a special meaning for BSEC:

3.3.3 OTP security modes

OTP word#0 bits 0 to 6 (with their potential disturbed state) are used to determine the OTP security mode.

The following OTP security modes are available:

The OTP mode is made visible to software by register BSEC_OTP_STATUS.

Table 11. OTP modes definition

BSEC_OTP_DATA0
[6:0]
OTP modeBSEC_OTP_STATUS
SECURE
BSEC_OTP_STATUS
INVALID
0xxx1x1OTP-SECURED
open_device
10
01x1xxx
0xx11xx
01xxxx1
1xxx1x1OTP-SECURED
closed_device
10
11x1xxx
1xx11xx
11xxxx1
All other valuesOTP-INVALIDx1

Note: The OTP mode is computed from BSEC_OTP_DATA0[6:0] only if BSEC_OTP_DISTURBED[0] is equal to zero. Otherwise the OTP mode is forced to OTP-INVALID.

3.3.4 Automatic OTP load on system-reset

On a system-reset, BSEC automatically updates all shadow registers. The OTP mode is determined during this phase.

For OTP-SECURED mode, all OTP words are read and BSEC_OTP_DATA0 to BSEC_OTP_DATA95 are updated.

For OTP-INVALID mode, only BSEC_OTP_DATA0 to BSEC_OTP_DATA31 are updated. BSEC_OTP_DATA32 to BSEC_OTP_DATA95 are set to 0.

BSEC_OTP_STATUS, BSEC_OTP_DISTURBEDx and BSEC_OTP_ERRORx registers are also updated.

fuseok signal is asserted at the end of this phase. This signal is used to release the reset to the SoC.

Note: the OTP word reading starts from word 0, in order for the BSEC to determine the OTP mode from the beginning.

Figure 6. Power-on and initial read timing diagram

Timing diagram showing the power-on and initial read sequence for a system. The diagram is divided into three main sections: System power-up sequence, BSEC / SAFMEM interface, and SoC reset sequence. In the System power-up sequence, VDD and VDD_CORE rise above their minimum thresholds, followed by pwrok, rstcore_n, and pclk (~64 MHz). In the BSEC / SAFMEM interface, safmem_pdn is active low for >1µs, followed by safmem_resetsn, safmem_clk, and fuseok. A timing constraint of ~100µs to read SAFMEM is shown. In the SoC reset sequence, Mrepair_done is active low during MEM repair, followed by (CPU_resetsn) and CPU Boot.

The diagram illustrates the power-on and initial read timing sequence, divided into three main sections:

MSv46604V1

Timing diagram showing the power-on and initial read sequence for a system. The diagram is divided into three main sections: System power-up sequence, BSEC / SAFMEM interface, and SoC reset sequence. In the System power-up sequence, VDD and VDD_CORE rise above their minimum thresholds, followed by pwrok, rstcore_n, and pclk (~64 MHz). In the BSEC / SAFMEM interface, safmem_pdn is active low for >1µs, followed by safmem_resetsn, safmem_clk, and fuseok. A timing constraint of ~100µs to read SAFMEM is shown. In the SoC reset sequence, Mrepair_done is active low during MEM repair, followed by (CPU_resetsn) and CPU Boot.

3.3.5 OTP words status

Note: All status registers are updated during the initial read, but the disturbed and error status registers are also updated after each OTP read operation.
The first 32 OTP words implement a scheme to improve OTP robustness against hardware attacks during read as follows: Spare bits 32 to 37 are intended to support ECC and are not

used by 2:1 redundancy. They are therefore written with a simple pattern (for example OTP word address on 5 bits with even parity on the 6th bit). This pattern is checked during every OTP read. If the value read on bit 32 to 37 does not match the expected value, a disturbed information is reported to BSEC_OTP_DISTURBED0 register.

3.3.6 OTP operations

BSEC is clocked by PCLK clock source (single clock for functional and interface registers). An OTP word reading, writing (programming) or locking is called an OTP operation.

One OTP operation is performed via the BSEC_OTP_CONTROL register. It starts when the software writes a valid request to BSEC_OTP_CONTROL register and when no other operation is on going (an OTP operation cannot start until the previous one is finished).

Specific read, programming or permanent write lock operations are detailed below.

OTP read

A read operation consists in updating one of BSEC_OTP_DATA0 to BSEC_OTP_DATA95 registers with the corresponding word from OTP word.

To trigger a read operation, the software must set BSEC_OTP_CONTROL register with the word number given in ADDR field and with PROG bit set to 0.

The software can check the BUSY bit from the BSEC_OTP_STATUS register: Once cleared, this BUSY bit indicates that the read operation is complete.

When the read operation is finished, the BSEC state machine updates the “disturbed” and “error” status registers.

BSEC parameters depending on OTP content, are also updated when the corresponding OTP words are read. The OTP mode is updated when a read operation of the word 0 is performed.

Note: In OTP-INVALID mode, or if bit OTP in BSEC_OTP_LOCK register is set, words 32 to 95 cannot be read. The corresponding shadow registers are not modified.

OTP programming

A programming operation consists in programming one or several bits of an OTP word to one.

OTP word bits may be incrementally programmed to one but bits programmed to one can not be written to zero.

Lower OTP words are bitwise programmable and can be programmed incrementally to one's, upper OTP words have to be programmed in a single operation because of ECC encoding.

To trigger a programming operation, the two following steps are required:

The software checks then the BUSY bit from the BSEC_OTP_STATUS register: Once cleared, this BUSY bit indicates that the write operation is complete.

In the same register, the progfail bit is set if the write operation has failed.

Note: a programming operation to an OTP word does not update the corresponding shadow register. If needed, the software can update the shadow register with a read operation. In OTP-INVALID mode, the upper OTP (words 32 to 95) can not be programmed, regardless of bit GPLOCK in BSEC_OTP_LOCK register and regardless of registers BSEC_OTP_SPLOCK2/3.

OTP permanent write lock

A permanent write lock operation consists in forcing an OTP word to be permanently write-locked and not programmable.

For permanent write lock of an OTP word, the software must perform the same sequence as a normal programming operation with bit LOCK in BSEC_OTP_CONTROL register, with field ADDR in BSEC_OTP_CONTROL register and with BSEC_OTP_WRDATA register (see Table 12). After permanent lock programming, it is required to update BSEC_OTP_WRLOCKEDx registers with OTP content. In order to do this, the software must perform a word read with LOCK bit set and word address provided in BSEC_OTP_CONTROL register.

Table 12. OTP permanent write lock

OTP wordto beBSEC control register valueUse 2 bits per word for lower OTPs
0ADDR[6:0] 0x00WRDATA[31:0] 0x0000 0003
10x000x0000 000C
.........
70x000x0000 C000
80x010x0000 0003Use 2 bits per word for
.........lower OTPs
150x010x0000 C000
160x020x0000 0003
.........
310x030x0000 C000
320x040x0000 0001
330x040x0000 0002
.........
470x040x0000 8000
480x050x0000 0001
.........
630x050x0000 8000
.........
950x070x0000 8000

3.3.7 JTAG registers

The BSEC_JTAGIN and BSEC_JTAGOUT registers are two 16-bit registers used to communicate between software and JTAG SoC interface. This interface is used during Boot as communication channel to the external JTAG TAP controller.

3.3.8 BSEC lock registers

BSEC_OTP_LOCK register is used to lock access to security sensitive areas with sticky bits. The locks are active until the next system-reset (see Section 3.6.5: BSEC OTP lock configuration register (BSEC_OTP_LOCK)).

3.3.9 Debug control

The software controls the scope of the Debug by BSEC_ENABLE register. The access to this register can be locked until next system-reset with bit DENREG in BSEC_OTP_LOCK register.

BSEC_ENABLE is driving hardware signals to the SoC (such as CoreSight authentication interface and other specific control listed in Table 13).

For more information, see Section 64: Debug support (DBG).

BSEC_ENABLE default values depends on BSEC OTP mode as shown in Table 13.

Table 13. BSEC_ENABLE default values after reset

SignalOTP-
SECURED
open_device
OTP-SECURED
closed_device
OTP-
INVALID
Comment
dbgen100CoreSight authentication
niden100CoreSight authentication
spiden000CoreSight authentication
spniden000CoreSight authentication
deviceen100CoreSight authentication
dbgswenable000CoreSight authentication
hdpen000Hardware debug port tracing
cfgsdisable000Disable some of Cortex®-A7 GIC secure access
cp15sdisable[1:0]0b000b000b00Disable some of Cortex®-A7 CP15 secure access

3.3.10 Sticky lock register

Three sticky lock registers are used to control the reload of shadow registers, at OTP word granularity:

3.4 OTP layout

Lower OTP words (1 Kbits)

The lower OTP bits are stored in shadow registers BSEC_OTP_DATA0 to BSEC_OTP_DATA31 and used for general purpose and non-secret data.

These OTP are protected by a 2:1 redundancy implemented with consecutive even/odd bits.

The specific bits impacting hardware such as OTP modes, engineering, trim and memory repair are located in: CFG0, CFG1 and 8 other words (HW0 to HW7).

Upper OTP words (2 Kbits)

The upper OTP words are stored in shadow registers BSEC_OTP_DATA32 to BSEC_OTP_DATA95 and are reserved to store security sensitive information (secrets keys, certificate, RMA key). These words may also store public non-volatile information.

These upper OTP bits can be used during the Boot process to support advanced security services such as secure secret provisioning (SSP), encrypted Boot or secure storage.

The upper OTP words are protected by ECC and must be used with 32-bit word granularity.

3.4.1 DMA requests

BSEC does not support DMA hardware interface.

3.4.2 TrustZone awareness

BSEC is TrustZone aware. All APB register read and write accesses are checked for permission. Table 14 and Table 15 describe the permission rules depending on OTP mode and register type.

If permission check fails:

Table 14. Write access permissions
OTP modeControl registers(1)Lower OTP shadow registersUpper OTP shadow registers
APB secureAPB non-secureAPB secureAPB non-secureAPB secureAPB non-secure
OTP-SECUREDYesNoYesNoYesNo
OTP-INVALIDNoNoNoNoNoNo

1. BSEC control registers are any BSEC registers except BSEC_OTP_DATA0 to BSEC_OTP_DATA95.

Table 15. Read access permissions
OTP modeControl registers(1)Lower OTP shadow registersUpper OTP shadow registers
APB secureAPB non-secureAPB secureAPB non-secureAPB secureAPB non-secure
OTP-SECUREDYesYesYesYesYesNo
OTP-INVALIDYesNoNoNoNoNo

1. BSEC control registers are any BSEC registers except BSEC_OTP_DATA0 to BSEC_OTP_DATA95.

3.4.3 BSEC clocking and initialization

BSEC has a single clock domain (PCLK).

3.5 BSEC interrupts

BSEC does not support any interrupt.

3.6 BSEC registers

The peripheral registers are accessed by words (32-bit).

Any write access to read-only registers are silently ignored.

Any attempt to modify locked registers (locked by sticky locks or by lock bits) are silently ignored.

3.6.1 BSEC OTP configuration register (BSEC_OTP_CONFIG)

Address offset: 0x000

Reset value: 0x0000 000E

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.TREAD[1:0]PRGWIDTH[3:0]FRC[1:0]PWRU
P
rwrwrwrwrwrwrwrwrw

Bits 31:9 Reserved, must be kept at reset value.

Bits 8:7 TREAD[1:0]: set OTP reading current level (default = 0b00)

Bits 6:3 PRGWIDTH[3:0]: OTP programming pulse width (default = 0b0001)

Bits 2:1 FRC[1:0]: OTP clock frequency range selection

00: 10 MHz ≤ frequency ≤ 20 MHz

01: 20 MHz ≤ frequency ≤ 30 MHz

10: 30 MHz ≤ frequency ≤ 45 MHz

11: 45 MHz ≤ frequency ≤ 67 MHz

Note: 0b11 is used by default. OTP initial read is always using an internal OSC with 64 MHz max frequency. Reading OTP at a lower frequency than the range programmed by FRC[1:0] is possible.

Bit 0 PWRUP: OTP power-up control

0: OTP powered down

1: OTP powered up

Note: After the power-on initial read of OTP, BSEC powers down OTP. PWRUP bit is then cleared.

Prior to any read or programming operation, OTP must be powered up again by setting PWRUP bit.

OTP read is qualified by pwrok input signal, which indicates that VDD and VDD1 supplies are in valid range.

3.6.2 BSEC OTP control register (BSEC_OTP_CONTROL)

Address offset: 0x004

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.LOCKPROGRes.ADDR[6:0]
rwrwrwrwrwrwrwrwrw

Bits 31:10 Reserved, must be kept at reset value.

3.6.3 BSEC OTP write data register (BSEC_OTP_WRDATA)

Address offset: 0x008
Reset value: 0x0000 0000

31302928272625242322212019181716
WRDATA[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
WRDATA[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 WRDATA[31:0]: OTP write data

3.6.4 BSEC OTP status register (BSEC_OTP_STATUS)

Address offset: 0x00C
Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PWR ONPROG FAILBUSYIN VALIDRes.SEC URE
rrrrr

Bit 5 PWRON: OTP power status

Note: used to poll pwrok signal value

Bit 4 PROGFAIL: last programming status

Bit 3 BUSY: OTP operation status

Note: bit polling is used to determine operation completion.

Bit 2 INVALID: OTP invalid mode

Bit 1 Reserved, must be kept at reset value.

Bit 0 SECURE: OTP secured mode

Note: The reset value of SECURE and INVALID bits depends on OTP mode.

Note: The lowest bits SECURE and INVALID must be used to identify the OTP mode instead of reading shadow register BSEC_OTP_DATA0. Precedence is INVALID > SECURE.

3.6.5 BSEC OTP lock configuration register (BSEC_OTP_LOCK)

Address offset: 0x010

Reset value: 0x0000 0000

Bit_RangeField_NameDescriptionAccessReservedMaskValueTypeModeStateResetOffsetAddressRegisterSectionPage
31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GPROM
Res.Res.Res.LOCKRes.DEN
Res.Res.Res.REGLOCKOTP
Res.Res.Res.rsrsrsrs
Res.Res.Bit 4GPLOCK: programming sticky lock
Res.Res.Bit 2DENREG: debug enable register sticky lock

Bits 31:5 Reserved, must be kept at reset value.

Bit 4 GPLOCK: programming sticky lock

Bit 3 Reserved, must be kept at reset value.

Bit 2 DENREG: debug enable register sticky lock

3.6.6 BSEC debug configuration register (BSEC_DENABLE)

Address offset: 0x014

Reset value: 0x0000 0000

Note: reset value depends on OTP secure mode according to Table 13: BSEC_DENABLE default values after reset on page 172.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.DBG
SWEN
ABLE
CFG
S
DIS
ABLE
CP15SDISABLE
[1:0]
SPNID
EN
SPID
EN
HDPENDE
VICE
EN
NIDENDBG
EN
Res.
rwrwrwrwrwrwrwrwrwrw

Bits 31:11 Reserved, must be kept at reset value.

Bit 10 DBGSWENABLE: control self hosted debug enable with signal dbgswenable

Bit 9 CFGSDISABLE: write access to secure GIC registers disable with signal cfgsdisable

Bits 8:7 CP15SDISABLE[1:0]: write access to some secure Cortex®-A7 CP15 registers disable

Bit 6 SPNIDEN: secure privilege non-invasive debug enable with signal spiden

Bit 5 SPIDEN: secure privilege invasive debug enable with signal spiden

Bit 4 HDPEN: hardware debug port enable with signal hdp

Bit 3 DEVICEEN: controls access to debug component via external debug port by signal deviceen
0: disabled
1: enabled

Bit 2 NIDEN: non-invasive debug enable with signal niden
0: non-invasive debug disabled
1: non-invasive debug enabled

Bit 1 DBGGEN: debug enable with signal dbgen
0: disabled
1: enabled

Bit 0 Reserved, must be kept at reset value.

3.6.7 BSEC OTP disturbed status register x (BSEC_OTP_DISTURBEDx)

BSEC_OTP_DISTURBED0 is used to report disturbed state of BSEC_OTP_DATA0 to BSEC_OTP_DATA31 (lower 1 Kbits OTP).

BSEC_OTP_DISTURBED1 is used to report disturbed state of BSEC_OTP_DATA32 to BSEC_OTP_DATA63.

BSEC_OTP_DISTURBED2 is used to report disturbed state of BSEC_OTP_DATA64 to BSEC_OTP_DATA95.

Address offset: 0x01C+0x004*x, (x = 0 to 2)

Reset value: 0x0000 0000

31302928272625242322212019181716
DIS[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
DIS[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 DIS[31:0]: disturbed status of the corresponding OTP word

0: OTP word has been read correctly

1: OTP word is disturbed, either because of a read with disturbcheck failed or because the spare ECC bits [37:32] for words 0 to 31 do not match expected value. It may result from a possible hardware attack.

Note: ECC bits resilience against hardware attacks is applied only to lower OTP region.

3.6.8 BSEC OTP error status register x (BSEC_OTP_ERRORx)

BSEC_OTP_ERROR0 is used to report error state of BSEC_OTP_DATA0 to BSEC_OTP_DATA31 (lower 1 Kbits OTP which are protected by 2:1 redundancy).

BSEC_OTP_ERROR1 is used to report error state of BSEC_OTP_DATA32 to BSEC_OTP_DATA63 which are protected by 6-bit ECC.

BSEC_OTP_ERROR2 is used to report error state of BSEC_OTP_DATA64 to BSEC_OTP_DATA95 which are protected by 6-bit ECC.

Address offset: 0x034+0x004*x, (x = 0 to 2)

Reset value: 0x0000 0000

31302928272625242322212019181716
ERR[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
ERR[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 ERR[31:0]: error status of the correspond OTP word

0: OTP word has been read correctly

1: OTP word is erroneous, either because 2:1 redundancy has failed for words 0 to 31 or because ECC check has failed for words 32 to 95.

3.6.9 BSEC OTP lock status register x (BSEC_OTP_WRLOCKEDx)

BSEC_OTP_WRLOCKED0 is used to report permanent write lock of BSEC_OTP_DATA0 to BSEC_OTP_DATA31.

BSEC_OTP_WRLOCKED1 is used to report permanent write lock of BSEC_OTP_DATA32 to BSEC_OTP_DATA63.

BSEC_OTP_WRLOCKED2 is used to report permanent write lock of BSEC_OTP_DATA64 to BSEC_OTP_DATA95.

Permanent write lock requires a programming sequence to lock a word (see section: Section 3.3.6: OTP operations on page 170).

Address offset: 0x04C+0x004*x, (x = 0 to 2)

Reset value: 0x0000 0000

31302928272625242322212019181716
WRLOCK[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
WRLOCK[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 WRLOCK[31:0]: permanent word lock status of the correspond OTP word

0: OTP word not locked

1: OTP word permanently locked

3.6.10 BSEC OTP sticky programming lock register x (BSEC_OTP_SPLOCKx)

BSEC_OTP_SPLOCK0 is used to lock the programming of BSEC_OTP_DATA0 to BSEC_OTP_DATA31 until next system-reset

BSEC_OTP_SPLOCK1 is used to lock the programming of BSEC_OTP_DATA32 to BSEC_OTP_DATA63 until next system-reset

BSEC_OTP_SPLOCK2 is used to lock the programming of BSEC_OTP_DATA64 to BSEC_OTP_DATA95 until next system-reset

Attempt to sticky program locked OTP word are silently ignored.

Address offset: 0x064+0x004*x, (x = 0 to 2)

Reset value: 0x0000 0000

RM0442 3.6.10column_2Bits 31:0column_4WRLOCK[31:0]0 1 2column_7column_8column_9column_10column_11column_12column_13column_14column_15column_16
313029282726252423 SPLOCK[31:16]22212019181716
rsrsrsrsrsrsrsrsrsrsrsrsrsrsrsrs
151413121110987 SPLOCK[15:0]6543210
rsrsrsrsrsrsrsrsrsrsrsrsrsrsrsrs
Bits 31:0SPLOCK[31:0]: lock programming for the OTP word until next power-on reset

Bits 31:0 SPLOCK[31:0]: lock programming for the OTP word until next power-on reset

0: OTP word not locked

1: OTP word locked for programming

3.6.11 BSEC OTP shadow write sticky lock register x (BSEC_OTP_SWLOCKx)

BSEC_OTP_SWLOCK0 is used to prevent writing to BSEC_OTP_DATA0 to BSEC_OTP_DATA31 until next system-reset.

BSEC_OTP_SWLOCK1 is used to prevent writing to BSEC_OTP_DATA32 to BSEC_OTP_DATA63 until next system-reset.

BSEC_OTP_SWLOCK2 is used to prevent writing to BSEC_OTP_DATA64 to BSEC_OTP_DATA95 until next system-reset.

Write to shadow write locked BSEC_OTP_DATA word are silently ignored.

Note: Writing to OTP word 0 shadow is always prevented.

Address offset: 0x07C + 0x004 * x, (x = 0 to 2)

Reset value: 0x0000 0001, 0x0000 0000, 0x0000 0000

31302928272625242322212019181716
SWLOCK[31:16]
rsrsrsrsrsrsrsrsrsrsrsrsrsrsrsrs
1514131211109876543210
SWLOCK[15:0]
rsrsrsrsrsrsrsrsrsrsrsrsrsrsrsrs

Bits 31:0 SWLOCK[31:0]: lock the writing for the OTP shadow word until next power-on reset.

0: shadow word not locked

1: shadow word locked and cannot be written by software

Note: BSEC_OTP_SWLOCK0 bit 0 is forced to 1 by hardware, writing to this bit has no effect.

3.6.12 BSEC OTP shadow read sticky lock register x (BSEC_OTP_SRLOCKx)

BSEC_OTP_SRLOCK0 is used to prevent reloading of BSEC_OTP_DATA0 to BSEC_OTP_DATA31 until next system-reset.

BSEC_OTP_SRLOCK1 is used to prevent reloading of BSEC_OTP_DATA32 to BSEC_OTP_DATA63 until next system-reset.

BSEC_OTP_SRLOCK2 is used to prevent reloading of BSEC_OTP_DATA64 to BSEC_OTP_DATA95 until next system-reset.

Setting SRLOCK bits or attempt to reload a locked OTP do not clear the corresponding BSEC_OTP_DATAx shadow register.

Note: BSEC_OTP_SRLOCK0 bit 0 is controlled by hardware according to fuse_ok, writing to this bit has no effect.

Address offset: 0x094 + 0x004 * x, (x = 0 to 2)

Reset value: 0x0000 000X, 0x0000 0000, 0x0000 0000

31302928272625242322212019181716
SRLOCK[31:16]
rsrsrsrsrsrsrsrsrsrsrsrsrsrsrsrs
1514131211109876543210
SRLOCK[15:0]
rsrsrsrsrsrsrsrsrsrsrsrsrsrsrsrs

Bits 31:0 SRLOCK[31:0]: prevent reloading of the shadow word from OTP until next power-on reset.

0: OTP word not locked

1: OTP word locked and cannot be reloaded

Note: Reloading of OTP word 0 is prevented after its initial read on a system reset.

3.6.13 BSEC JTAG input register (BSEC_JTAGIN)

Address offset: 0x0AC

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
DATA[15:0]
rrrrrrrrrrrrrrrr

Bits 31:16 Reserved, must be kept at reset value.

Bits 15:0 DATA[15:0]: JTAG input data

16-bit copy from JTAG SoC register

3.6.14 BSEC JTAG output register (BSEC_JTAGOUT)

Address offset: 0x0B0

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
DATA[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:16 Reserved, must be kept at reset value.

Bits 15:0 DATA[15:0]: JTAG output data
16-bit copy to JTAG SoC register

3.6.15 BSEC scratch register (BSEC_SCRATCH)

Address offset: 0x0B4

Reset value: 0x0000 0000

31302928272625242322212019181716
DATA[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
DATA[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 DATA[31:0]: scratch data
This register is a general purpose register.

3.6.16 BSEC shadow register x (BSEC_OTP_DATAx)

The complete description of BSEC_OTP_DATAx register values and properties can be found in Section 4: OTP mapping (OTP).

Several OTP directly impact BSEC behavior, such as:

Address offset: 0x200+0x004*x, (x = 0 to 95)

Reset value: 0xXXXXXXXX

The reset value depends on the actual OTP programmed value and the OTP mode.

31302928272625242322212019181716
DATA[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
DATA[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 DATA[31:0]: shadow register read from OTP or written by software (OTP emulation mode)

The update of shadow registers is controlled by other registers and by OTP security mode.

3.6.17 BSEC hardware configuration register (BSEC_HWCFGR)

Address offset: 0xFF0

Reset value: 0x00000014

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.ECC_USE[3:0]SIZE[3:0]
rrrrrrrr

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:4 ECC_USE[3:0]: protection / redundancy scheme used

0x0: No

0x1: ECC for upper OTP bits used

Others: reserved

Bits 3:0 SIZE[3:0]: OTP block size

0x2: 2 Kbits

0x4: 4 Kbits

0x8: 8 Kbits

Others: reserved

3.6.18 BSEC version register (BSEC_VERR)

Address offset: 0xFF4

Reset value: 0x0000 0011

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.MAJREV[3:0]MINREV[3:0]
rrrrrrrr

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:4 MAJREV[3:0]: major revision information

Bits 3:0 MINREV[3:0]: minor revision information

3.6.19 BSEC identification register (BSEC_IPIDR)

Address offset: 0xFF8

Reset value: 0x0010 0032

31302928272625242322212019181716
ID[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
ID[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 ID[31:0]: BSEC identification

3.6.20 BSEC size identification register (BSEC_SIDR)

Address offset: 0xFFC

Reset value: 0xA3C5 DD04

31302928272625242322212019181716
SID[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
SID[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 SID[31:0]: BSEC size identification

3.6.21 BSEC register map

Table 16 describes BSEC register map and reset values.

Table 16. BSEC register map and reset values
OffsetRegister name and reset value313029282726252423222120191817161514131211109876543210
0x000BSEC_OTP_CONFIGRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TREADPRGWDTHFRCPWRUP
Reset value000001110
0x004BSEC_OTP_CONTROLRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.LOCKPROGRes.ADDR[6:0]
Reset value000000000
0x008BSEC_OTP_WRDATAWRDATA[31:0]
Reset value
0x00CBSEC_OTP_STATUSRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PWRONPROGFAILBUSYINVALIDRes.SECURE
Reset value00000
0x010BSEC_OTP_LOCKRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GPLOCKRes.DENREGROMLOCKOTP
Reset value0000
0x014BSEC_OTP_DENABLERes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CFGSWENABLECFGSDISABLECP15SDISABLE[1:0]Res.SPNIDENSPIDENHDPENDEVICEENNIDENDBGENRes.
Reset value000000000
0x01CBSEC_OTP_DISTURBED0DIS[31:0]
Reset value00000000000000000000000000000000
0x020BSEC_OTP_DISTURBED1DIS[31:0]
Reset value00000000000000000000000000000000
0x024BSEC_OTP_DISTURBED2DIS[31:0]
Reset value00000000000000000000000000000000
0x034BSEC_OTP_ERROR0ERR[31:0]
Reset value00000000000000000000000000000000

Table 16. BSEC register map and reset values (continued)

OffsetRegister name and reset value313029282726252423222120191817161514131211109876543210
0x038BSEC_OTP_ERROR1ERR[31:0]
Reset value00000000000000000000000000000000
0x03CBSEC_OTP_ERROR2ERR[31:0]
Reset value00000000000000000000000000000000
0x04CBSEC_OTP_WRLOCKED0WRLOCK[31:0]
Reset value00000000000000000000000000000000
0x050BSEC_OTP_WRLOCKED1WRLOCK[31:0]
Reset value00000000000000000000000000000000
0x054BSEC_OTP_WRLOCKED2WRLOCK[31:0]
Reset value00000000000000000000000000000000
0x064BSEC_OTP_SPLOCK0SPLOCK[31:0]
Reset value00000000000000000000000000000000
0x068BSEC_OTP_SPLOCK1SPLOCK[31:0]
Reset value00000000000000000000000000000000
0x06CBSEC_OTP_SPLOCK2SPLOCK[31:0]
Reset value00000000000000000000000000000000
0x07CBSEC_OTP_SWLOCK0SWLOCK[31:0]
Reset value00000000000000000000000000000001
0x080BSEC_OTP_SWLOCK1SWLOCK[31:0]
Reset value00000000000000000000000000000000
0x084BSEC_OTP_SWLOCK2SWLOCK[31:0]
Reset value00000000000000000000000000000000
0x094BSEC_OTP_SRLOCK0SRLOCK[31:0]
Reset value0000000000000000000000000000000X
0x098BSEC_OTP_SRLOCK1SRLOCK[31:0]
Reset value00000000000000000000000000000000

Table 16. BSEC register map and reset values (continued)

OffsetRegister name and reset value313029282726252423222120191817161514131211109876543210
0x09CBSEC_OTP_SRLOCK2SRLOCK[31:0]
Reset value00000000000000000000000000000000
0x0ACBSEC_JTAGINRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DATA[15:0]
Reset value0000000000000000
0x0B0BSEC_JTAGOUTRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DATA[15:0]
Reset value0000000000000000
0x0B4BSEC_SCRATCHDATA[31:0]
Reset value00000000000000000000000000000000
0x200BSEC_OTP_DATA0DATA[31:0]
Reset valuexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0x204BSEC_OTP_DATA1DATA[31:0]
Reset valuexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
···
0x37CBSEC_OTP_DATA95DATA[31:0]
Reset valuexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0xFF0BSEC_IPHW_CFGRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.ECC_USE [3:0]SIZE[3:0]
Reset value00010100
0xFF4BSEC_VERRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MAJREV [3:0]MINREV [3:0]
Reset value00010001
0xFF8BSEC_IPIDRID[31:0]
Reset value00000000000100000000000000110010
0xFFCBSEC_SIDRSID[31:0]
Reset value10100011110001011101110100000100
Refer to Section 2.5 on page 153 for the register boundary addresses.