AT45DBxx Security Register programming (AT45DB041E, AT45DB161, AT45DB641E etc.)

Interesting examples and tutorials about REVELPROG-IS features and device programming
ArT
Posts: 1497
Joined: Wed Mar 25, 2015 8:54 am
Location: Warsaw, Poland
Has thanked: 51 times
Been thanked: 160 times

AT45DBxx Security Register programming (AT45DB041E, AT45DB161, AT45DB641E etc.)

Postby ArT » Thu Dec 05, 2019 12:52 pm

In all DATAFLASH AT45DB series devices (AT45DB021E, AT45DB041E, AT45DB081E, AT45DQ161, AT45DB161E, AT45DQ321, AT45DB321E, AT45DB641E etc.) from Adesto/Atmel is 128 Bytes Security Register.

The device contains a specialized Security Register that can be used for purposes such as unique device serialization or locked key storage. The register is comprised of a total of 128 bytes that is divided into two portions. The first 64 bytes (byte locations 0 through 63) of the Security Register are allocated as a One-Time Programmable space. Once these 64 bytes have been programmed, they cannot be erased or reprogrammed. The remaining 64 bytes of the register (byte locations 64 through 127) are factory programmed by Adesto and will contain a unique value for each device. The factory programmed data is fixed and cannot be changed.


You can programm first 64 bytes of this register with custom script tool in REVELPROG-IS. It's OTP register, it means that the user programmable portion of the Security Register can only be programmed one time so please use below scripts carefully.

If you reprogrammed or clonned AT45DBxx device and it still is not working in your target board and it seems that everything is ok (verification pass, read is the same) then probably you will need also program security register. First read security register from old chip and program security register in new chip. You will need modify below write script to your needs (64 bytes of data).

Reading Security Register 128 Bytes (100% safe) script:

Code: Select all

#SCRIPT HEADER;
SCRIPT:v1.8.1;
#HARDWARE SETTINGS;
HW:SPI-AT,3.3V,SLOW;

// Read Security Register (64bytes OTP + 64bytes Adesto SN) for AT45DBxx chips
#OPERATION;
SW:0,0,1,127,5,5,10,0,100,500;
INSTR:77,A5,A5,A5;


Writing Security Register 64 OTP Bytes (can be executed only once!) script:
Please note: Modify your 64 DATA bytes!

Code: Select all

#SCRIPT HEADER;
SCRIPT:v1.8.1;
#HARDWARE SETTINGS;
HW:SPI-AT,3.3V,SLOW;

// Write Security Register (64bytes OTP) for AT45DBxx chips
// PLEASE NOTE! It's one time programmable register (OTP)
// when once programmed - it can not be changed!
// please fill 64 bytes of DATA below carefully!
#OPERATION;
SW:1,63,0,0,100,0,100,0,100,500;
INSTR:9B,00,00,00;
DATA:00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F,10,11,12,13,14,15,16,17,18,19,1A,1B,1C,1D,1E,1F,20,21,22,23,24,25,26,27,28,29,2A,2B,2C,2D,2E,2F,30,31,32,33,34,35,36,37,38,39,3A,3B,3C,3D,3E,3F;

// Read Security Register (64bytes OTP + 64bytes Adesto SN) for AT45DBxx chips
#OPERATION;
SW:0,0,1,127,100,0,0,0,100,500;
INSTR:77,A5,A5,A5;

Return to “Tutorials and Examples”

Who is online

Users browsing this forum: No registered users and 3 guests