#include "chip.h"
Go to the source code of this file.
Functions | |
void | SMC_NFC_Configure (uint32_t cfg) |
Sets NFC configuration. | |
void | SMC_NFC_Reset (void) |
Reset NFC controller. | |
void | SMC_NFC_EnableNfc (void) |
Enable NFC controller. | |
void | SMC_NFC_EnableSpareRead (void) |
Enable NFC controller reads both main and spare area in read mode. | |
void | SMC_NFC_DisableSpareRead (void) |
The NFC controller skips spare area in read mode. | |
void | SMC_NFC_EnableSpareWrite (void) |
Enables the NFC controller writes both main and spare area in write. | |
void | SMC_NFC_DisableSpareWrite (void) |
The NFC controller skips spare area in write mode. | |
uint8_t | SMC_NFC_isSpareRead (void) |
Check if spare area be read in read mode. | |
uint8_t | SMC_NFC_isSpareWrite (void) |
Check if spare area be written in write mode. | |
uint8_t | SMC_NFC_isTransferComplete (void) |
Check if NFC transfer complete. | |
uint8_t | SMC_NFC_isReadyBusy (void) |
Check Ready/Busy line. | |
uint8_t | SMC_NFC_isNfcBusy (void) |
Check if NFC Controller is busy. | |
uint32_t | SMC_NFC_GetStatus (void) |
Get NFC Status. | |
void | SMC_NFC_Wait_CommandDone (void) |
Wait for NFC command has done. | |
void | SMC_NFC_Wait_XfrDone (void) |
Wait for NFC Data Transfer Terminated. | |
void | SMC_NFC_Wait_HammingReady (void) |
Wait for NFC Data Transfer Terminated. | |
void | SMC_NFC_Wait_RBbusy (void) |
Wait for NFC Ready/Busy Line 3 Edge Detected. | |
void | SMC_NFC_SendCommand (uint32_t cmd, uint32_t addressCycle, uint32_t cycle0) |
Uses the HOST nandflash controller to send a command to the NFC. | |
void | SMC_ECC_Configure (uint32_t type, uint32_t pageSize) |
Configures ECC mode. | |
uint32_t | SMC_ECC_GetCorrectoinType (void) |
Get ECC correction type. | |
uint8_t | SMC_ECC_GetStatus (uint8_t eccNumber) |
Get ECC status. | |
void | SMC_ECC_GetValue (uint32_t *ecc) |
Get all ECC parity and Nparity value. | |
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) |
Implementation of NFC functions.
Definition in file smc.c.
void SMC_ECC_Configure | ( | uint32_t | type, | |
uint32_t | pageSize | |||
) |
uint32_t SMC_ECC_GetCorrectoinType | ( | void | ) |
void SMC_ECC_GetEccParity | ( | uint32_t | pageDataSize, | |
uint8_t * | code, | |||
uint8_t | busWidth | |||
) |
Get ECC code for 8bit/16-bit data path NAND flash by giving data path. 24-bit or 32-bit ECC is generated in order to perform one bit correction for a page in page 512/1024/2048/4096.
size | Data size in bytes. | |
code | Codes buffer. | |
busWidth | 8bit/16bit data path. |
Definition at line 685 of file smc.c.
uint8_t SMC_ECC_GetStatus | ( | uint8_t | eccNumber | ) |
uint8_t SMC_ECC_VerifyHsiao | ( | uint8_t * | data, | |
uint32_t | size, | |||
const uint8_t * | originalCode, | |||
const uint8_t * | verifyCode, | |||
uint8_t | busWidth | |||
) |
Verifies hsiao codes for a data block. The block is verified between the given HSIAO code generated by hardware and original HSIAO codes store has been previously stored. Returns 0 if the data is correct, Hsiao_ERROR_SINGLEBIT if one or more block(s) have had a single bit corrected, or either Hsiao_ERROR_ECC or Hsiao_ERROR_MULTIPLEBITS.
data | Data buffer to verify. | |
size | Size of the data in words. | |
originalCode | Original codes. | |
verifyCode | codes to be verified. | |
dataPath | 8bit/16bit data path. |
Definition at line 727 of file smc.c.
void SMC_NFC_Configure | ( | uint32_t | cfg | ) |
uint32_t SMC_NFC_GetStatus | ( | void | ) |
uint8_t SMC_NFC_isNfcBusy | ( | void | ) |
uint8_t SMC_NFC_isReadyBusy | ( | void | ) |
uint8_t SMC_NFC_isSpareRead | ( | void | ) |
uint8_t SMC_NFC_isSpareWrite | ( | void | ) |
uint8_t SMC_NFC_isTransferComplete | ( | void | ) |
void SMC_NFC_SendCommand | ( | uint32_t | cmd, | |
uint32_t | addressCycle, | |||
uint32_t | cycle0 | |||
) |