Prusa MINI Firmware overview
otp.h
Go to the documentation of this file.
1 // otp.h - OTP memory mapping
2 #ifndef _OTP_H
3 #define _OTP_H
4 
5 // board revision (three bytes maj.min.sub)
6 #define OTP_BOARD_REVISION_ADDR 0x1FFF7800
7 #define OTP_BOARD_REVISION_SIZE 3
8 
9 // timestamp (seconds since 1970, litle-endian)
10 #define OTP_BOARD_TIME_STAMP_ADDR 0x1FFF7804
11 #define OTP_BOARD_TIME_STAMP_SIZE 4
12 
13 // serial number without first four characters "CZPX" (total 15 chars, zero terminated)
14 #define OTP_SERIAL_NUMBER_ADDR 0x1FFF7808
15 #define OTP_SERIAL_NUMBER_SIZE 16
16 
17 // mac address - xx:xx:xx:xx:xx:xx, six byte array
18 #define OTP_MAC_ADDRESS_ADDR 0x1FFF781A
19 #define OTP_MAC_ADDRESS_SIZE 6
20 
21 // lock block - 16 bytes (byte at 0x1FFF7A00 locks 0x1FFF7800-0x1FFF781f)
22 #define OTP_LOCK_BLOCK_ADDR 0x1FFF7A00
23 #define OTP_LOCK_BLOCK_SIZE 16
24 
25 // unique identifier 96bits
26 #define OTP_STM32_UUID_ADDR 0x1FFF7A10
27 #define OTP_STM32_UUID_SIZE 12
28 
29 #define otp_lock_sector0 (*((uint8_t *)OTP_LOCK_BLOCK_ADDR))
30 
31 #endif // _OTP_H