RTEMS  5.0.0
Data Structures | Macros | Typedefs | Functions
smc.h File Reference
#include "chip.h"

Go to the source code of this file.

Data Structures

union  _SmcStatus
 
struct  _SmcStatus::_SmcStatusBits
 

Macros

#define NFC_SRAM_BASE_ADDRESS   0x200000
 
#define NFC_CMD_BASE_ADDR   0x70000000
 
#define NFCADDR_CMD_CMD1   (0xFFu << 2)
 
#define NFCADDR_CMD_CMD2   (0xFFu << 10)
 
#define NFCADDR_CMD_VCMD2   (0x1u << 18)
 
#define NFCADDR_CMD_ACYCLE   (0x7u << 19)
 
#define NFCADDR_CMD_ACYCLE_NONE   (0x0u << 19)
 
#define NFCADDR_CMD_ACYCLE_ONE   (0x1u << 19)
 
#define NFCADDR_CMD_ACYCLE_TWO   (0x2u << 19)
 
#define NFCADDR_CMD_ACYCLE_THREE   (0x3u << 19)
 
#define NFCADDR_CMD_ACYCLE_FOUR   (0x4u << 19)
 
#define NFCADDR_CMD_ACYCLE_FIVE   (0x5u << 19)
 
#define NFCADDR_CMD_CSID   (0x7u << 22)
 
#define NFCADDR_CMD_CSID_0   (0x0u << 22)
 
#define NFCADDR_CMD_CSID_1   (0x1u << 22)
 
#define NFCADDR_CMD_CSID_2   (0x2u << 22)
 
#define NFCADDR_CMD_CSID_3   (0x3u << 22)
 
#define NFCADDR_CMD_CSID_4   (0x4u << 22)
 
#define NFCADDR_CMD_CSID_5   (0x5u << 22)
 
#define NFCADDR_CMD_CSID_6   (0x6u << 22)
 
#define NFCADDR_CMD_CSID_7   (0x7u << 22)
 
#define NFCADDR_CMD_DATAEN   (0x1u << 25)
 
#define NFCADDR_CMD_DATADIS   (0x0u << 25)
 
#define NFCADDR_CMD_NFCRD   (0x0u << 26)
 
#define NFCADDR_CMD_NFCWR   (0x1u << 26)
 
#define NFCADDR_CMD_NFCCMD   (0x1u << 27)
 
#define Hsiao_ERROR_SINGLEBIT   1
 
#define Hsiao_ERROR_ECC   2
 
#define Hsiao_ERROR_MULTIPLEBITS   3
 

Typedefs

typedef union _SmcStatus SmcStatus
 

Functions

void SMC_NFC_Configure (uint32_t mode)
 
void SMC_NFC_Reset (void)
 
void SMC_NFC_EnableNfc (void)
 
void SMC_NFC_EnableSpareRead (void)
 
void SMC_NFC_DisableSpareRead (void)
 
void SMC_NFC_EnableSpareWrite (void)
 
void SMC_NFC_DisableSpareWrite (void)
 
uint8_t SMC_NFC_isSpareRead (void)
 
uint8_t SMC_NFC_isSpareWrite (void)
 
uint8_t SMC_NFC_isTransferComplete (void)
 
uint8_t SMC_NFC_isReadyBusy (void)
 
uint8_t SMC_NFC_isNfcBusy (void)
 
uint32_t SMC_NFC_GetStatus (void)
 
void SMC_NFC_SendCommand (uint32_t cmd, uint32_t addressCycle, uint32_t cycle0)
 
void SMC_NFC_Wait_CommandDone (void)
 
void SMC_NFC_Wait_XfrDone (void)
 
void SMC_NFC_Wait_RBbusy (void)
 
void SMC_NFC_Wait_HammingReady (void)
 
void SMC_ECC_Configure (uint32_t type, uint32_t pageSize)
 
uint32_t SMC_ECC_GetCorrectoinType (void)
 
uint8_t SMC_ECC_GetStatus (uint8_t eccNumber)
 
void SMC_ECC_GetValue (uint32_t *ecc)
 
void SMC_ECC_GetEccParity (uint32_t pageDataSize, uint8_t *code, uint8_t busWidth)
 
uint8_t SMC_ECC_VerifyHsiao (uint8_t *data, uint32_t size, const uint8_t *originalCode, const uint8_t *verifyCode, uint8_t busWidth)
 

Detailed Description

Definitions and function prototype for SMC module

Macro Definition Documentation

◆ Hsiao_ERROR_ECC

#define Hsiao_ERROR_ECC   2

The original code has been corrupted.

◆ Hsiao_ERROR_MULTIPLEBITS

#define Hsiao_ERROR_MULTIPLEBITS   3

Multiple bits are incorrect in the data and they cannot be corrected.

◆ Hsiao_ERROR_SINGLEBIT

#define Hsiao_ERROR_SINGLEBIT   1

A single bit was incorrect but has been recovered.

◆ NFC_CMD_BASE_ADDR

#define NFC_CMD_BASE_ADDR   0x70000000

Base address for NFC Address Command

◆ NFC_SRAM_BASE_ADDRESS

#define NFC_SRAM_BASE_ADDRESS   0x200000

Base address of NFC SRAM