Analog Devices ADSP-SC58 Series Hardware Reference Manual page 533

Sharc+ processor
Table of Contents

Advertisement

OTP API Overview
OTP Counters
The OTPC module implements a counter API to allow easy reading or writing of the counter without dealing with
the complexities of rewriting OTP memory sections that are ECC protected.
The OTPC module provides two functional APIs for counters. These APIs are not extra; the module uses the same
get and pgm APIs. The APIs are functionally unique in the way that they set and retrieve data as counters in OTP
memory.
The API uses a different method to count bits because each bit in OTP memory can only be set =1 once, and the
ECC protects each 16-bit unit. This functionality essentially means that each 16-bit unit can only be written to
once. Therefore, a counter that can count 0–31 requires 32 × 16 bits of memory.
The API receives and returns the value of the counter as a uint8_t binary number. Writing a value less than the
current value of the counter or greater than the maximum value results in an error.
To implement this functionality, the driver counts by shifting 1's from the left, treating each block as 1 bit. A three-
bit counter is encoded as follows.
bit 2
0000
0001
0001
0001
Lock API
This API locks the device.
Name
PP Define
Prototype
Return Value
Stack Requirements
bool res = adi_rom_lock();
Calling this function locks the device, making it a secure. Once locked, the
that the part is locked, and access is limited. For more information, refer to the security documentation regarding a
locked device.
NOTE:
Locked Status. The
the lock function, the register still indicates that the part is open.
12–6
bit 1
0000
0000
0001
0001
Lock API
FUNC_ROM_LOCK
bool adi_rom_lock();
bool
valid stack
OTPC_SECU_STATE
ADSP-SC58x/ADSP-2158x SHARC+ Processor Hardware Reference
bit 0
0000
0000
0000
0001
OTPC_SECU_STATE
register is updated only after the part is rebooted. After calling
Value
0
1
2
3
-
-
-
true for success
-
register indicates

Advertisement

Table of Contents
loading

This manual is also suitable for:

Adsp-2158 series

Table of Contents