Updated EM4233 header and example dump

We thought that the user had access to 64 blocks, while in EM4233 factsheet it's stated that only 52 blocks are available
This commit is contained in:
Federico Cerutti
2018-12-27 00:16:34 +01:00
parent ab1fdddb16
commit 9b5dfc2708
3 changed files with 11 additions and 17 deletions
Binary file not shown.
+10 -13
View File
@@ -11,25 +11,24 @@
#include "Application.h"
#define EM4233_STD_UID_SIZE ISO15693_GENERIC_UID_SIZE
#define EM4233_STD_MEM_SIZE 208 // Bytes
#define EM4233_STD_MEM_SIZE 0xD0 // Bytes
#define EM4233_BYTES_PER_BLCK 0x04
#define EM4233_BLCKS_PER_PAGE 0x04
#define EM4233_NUMBER_OF_BLCKS ( EM4233_STD_MEM_SIZE / EM4233_BYTES_PER_BLCK )
#define EM4233_NUMBER_OF_PAGES ( EM4233_STD_MEM_SIZE / (EM4233_BYTES_PER_BLCK * EM4233_BLCKS_PER_PAGE) )
#define EM4233_IC_REFERENCE 0x02
#define EM4233_IC_REFERENCE 0x02 // From EM4233SLIC datasheet and checked against real tags
#define EM4233_USR_MEM_SIZE 64 // Bytes, guessed, not described anywere
#define EM4233_MEM_UID_ADDRESS 0x0100 // From 0x0100 to 0x0107 - UID
#define EM4233_MEM_AFI_ADDRESS 0x0108 // AFI byte address
#define EM4233_MEM_DSFID_ADDRESS 0x0109 // DSFID byte adress
#define EM4233_MEM_INF_ADDRESS 0x010C // Some status bits
#define EM4233_MEM_UID_ADDRESS 0xD0 // From 0x0100 to 0x0107 - UID
#define EM4233_MEM_AFI_ADDRESS 0xD8 // AFI byte address
#define EM4233_MEM_DSFID_ADDRESS 0xD9 // DSFID byte adress
#define EM4233_MEM_INF_ADDRESS 0xDC // Some status bits
#define EM4233_MEM_LSM_ADDRESS 0x0110 // From 0x0108 to 0x0149 - Lock status masks
#define EM4233_MEM_PSW_ADDRESS 0x0150 // From 0x0150 to 0x0153 - Password
#define EM4233_MEM_KEY_ADDRESS 0x0154 // From 0x0120 to 0x0127 - Encryption Key
#define EM4233_MEM_LSM_ADDRESS 0xE0 // From 0xE0 to 0x0113 - Lock status masks
#define EM4233_MEM_PSW_ADDRESS 0x0114 // From 0x0114 to 0x0117 - 32 bit Password
#define EM4233_MEM_KEY_ADDRESS 0x0118 // From 0x0118 to 0x0123 - 96 bit Encryption Key
#define EM4233_SYSINFO_BYTE 0x0F // DSFID - AFI - VICC mem size - IC ref are present
#define EM4233_SYSINFO_BYTE 0x0F // == DSFID - AFI - VICC mem size - IC ref are present
/* Bit masks */
#define EM4233_MASK_READ_PROT ( 1 << 2 ) // For lock status byte
@@ -37,8 +36,6 @@
#define EM4233_MASK_AFI_STATUS ( 1 << 0 )
#define EM4233_MASK_DSFID_STATUS ( 1 << 1 )
#define EM4233_TOT_MEM_SIZE ( EM4233_STD_MEM_SIZE + EM4233_USR_MEM_SIZE )
/* Custom command code */
#define EM4233_CMD_SET_EAS 0xA2
#define EM4233_CMD_RST_EAS 0xA3
@@ -72,10 +72,7 @@
#define ISO15693_CRC16_POLYNORMAL 0x8408
#define ISO15693_CRC16_PRESET 0xFFFF
/*
* The byte used for the lock status has its bits addressed as follow:
*
*/
/* The lock status byte has bits assigned as follow */
#define ISO15693_MASK_UNLOCKED ( 0 << 0 )
#define ISO15693_MASK_USER_LOCK ( 1 << 0 )
#define ISO15693_MASK_FACTORY_LOCK ( 1 << 1 )