66 #define NFC_SRAM_BASE_ADDRESS 0x200000 68 #define NFC_CMD_BASE_ADDR 0x70000000 72 #define NFCADDR_CMD_CMD1 (0xFFu << 2) 74 #define NFCADDR_CMD_CMD2 (0xFFu << 10) 76 #define NFCADDR_CMD_VCMD2 (0x1u << 18) 78 #define NFCADDR_CMD_ACYCLE (0x7u << 19) 80 #define NFCADDR_CMD_ACYCLE_NONE (0x0u << 19) 82 #define NFCADDR_CMD_ACYCLE_ONE (0x1u << 19) 84 #define NFCADDR_CMD_ACYCLE_TWO (0x2u << 19) 86 #define NFCADDR_CMD_ACYCLE_THREE (0x3u << 19) 88 #define NFCADDR_CMD_ACYCLE_FOUR (0x4u << 19) 90 #define NFCADDR_CMD_ACYCLE_FIVE (0x5u << 19) 92 #define NFCADDR_CMD_CSID (0x7u << 22) 94 #define NFCADDR_CMD_CSID_0 (0x0u << 22) 96 #define NFCADDR_CMD_CSID_1 (0x1u << 22) 98 #define NFCADDR_CMD_CSID_2 (0x2u << 22) 100 #define NFCADDR_CMD_CSID_3 (0x3u << 22) 102 #define NFCADDR_CMD_CSID_4 (0x4u << 22) 104 #define NFCADDR_CMD_CSID_5 (0x5u << 22) 106 #define NFCADDR_CMD_CSID_6 (0x6u << 22) 108 #define NFCADDR_CMD_CSID_7 (0x7u << 22) 110 #define NFCADDR_CMD_DATAEN (0x1u << 25) 112 #define NFCADDR_CMD_DATADIS (0x0u << 25) 114 #define NFCADDR_CMD_NFCRD (0x0u << 26) 116 #define NFCADDR_CMD_NFCWR (0x1u << 26) 118 #define NFCADDR_CMD_NFCCMD (0x1u << 27) 126 #define Hsiao_ERROR_SINGLEBIT 1 129 #define Hsiao_ERROR_ECC 2 132 #define Hsiao_ERROR_MULTIPLEBITS 3 142 extern void SMC_NFC_Configure(uint32_t mode);
143 extern void SMC_NFC_Reset(
void);
144 extern void SMC_NFC_EnableNfc(
void);
145 extern void SMC_NFC_EnableSpareRead(
void);
146 extern void SMC_NFC_DisableSpareRead(
void);
147 extern void SMC_NFC_EnableSpareWrite(
void);
148 extern void SMC_NFC_DisableSpareWrite(
void);
149 extern uint8_t SMC_NFC_isSpareRead(
void);
150 extern uint8_t SMC_NFC_isSpareWrite(
void);
151 extern uint8_t SMC_NFC_isTransferComplete(
void);
152 extern uint8_t SMC_NFC_isReadyBusy(
void);
153 extern uint8_t SMC_NFC_isNfcBusy(
void);
154 extern uint32_t SMC_NFC_GetStatus(
void);
156 extern void SMC_NFC_SendCommand(uint32_t cmd, uint32_t addressCycle,
158 extern void SMC_NFC_Wait_CommandDone(
void);
159 extern void SMC_NFC_Wait_XfrDone(
void);
160 extern void SMC_NFC_Wait_RBbusy(
void);
161 extern void SMC_NFC_Wait_HammingReady(
void);
163 extern void SMC_ECC_Configure(uint32_t type, uint32_t pageSize);
164 extern uint32_t SMC_ECC_GetCorrectoinType(
void);
165 extern uint8_t SMC_ECC_GetStatus(uint8_t eccNumber);
167 extern void SMC_ECC_GetValue(uint32_t *ecc);
168 extern void SMC_ECC_GetEccParity(uint32_t pageDataSize, uint8_t *
code,
170 extern uint8_t SMC_ECC_VerifyHsiao(uint8_t *data, uint32_t
size,
171 const uint8_t *originalCode,
const uint8_t *verifyCode, uint8_t busWidth);
uint8_t rbEdge
Definition: smc.h:50
uint8_t hammingReady
Definition: smc.h:50
uint8_t xfrDone
Definition: smc.h:50
Definition: inftrees.h:24
uint8_t cmdDone
Definition: smc.h:50
uint8_t smcSts
Definition: smc.h:50
unsigned size
Definition: tte.h:74