Microchip® Advanced Software Framework

ecchrs.h File Reference
#include "compiler.h"

Data Structures

struct  ecchrs_options_t
 Input parameters when initializing ECCHRS. More...
 

Macros

Type Correct mode
#define ECCHRS_TYPECORRECT_1_BIT_MODE_0   AVR32_ECCHRS_MD_TYPECORREC_ECC1_PAGE
 1 bit correction for a page size of 512/1024/2048/4096 bytes. More...
 
#define ECCHRS_TYPECORRECT_1_BIT_MODE_1   AVR32_ECCHRS_MD_TYPECORREC_ECC1_256B
 1 bit correction for 256 bytes of data for a page size of 512/2048/4096 bytes. More...
 
#define ECCHRS_TYPECORRECT_1_BIT_MODE_2   AVR32_ECCHRS_MD_TYPECORREC_ECC1_512B
 1 bit correction for 512 bytes of data for a page size of 512/2048/4096 bytes. More...
 
#define ECCHRS_TYPECORRECT_4_BIT   AVR32_ECCHRS_MD_TYPECORREC_ECC4_512B
 4 correction for 512 bytes of data for a page size of 512 to 4096 bytes (by 512 bytes). More...
 
Nand Flash Page Size when using ECCHRS_TYPECORRECT_1_BIT_MODE_x
#define ECCHRS_PAGESIZE_1_BIT_528_W   0
 Page of 528 words. More...
 
#define ECCHRS_PAGESIZE_1_BIT_1056_W   1
 Page of 1056 words. More...
 
#define ECCHRS_PAGESIZE_1_BIT_2112_W   2
 Page of 2112 words. More...
 
#define ECCHRS_PAGESIZE_1_BIT_4224_W   3
 Page of 4224 words. More...
 
Nand Flash Page Size when using ECCHRS_TYPECORRECT_4_BIT
#define ECCHRS_PAGESIZE_4_BIT_528_W   0
 Page of 528 words. More...
 
#define ECCHRS_PAGESIZE_4_BIT_1056_W   1
 Page of 1056 words. More...
 
#define ECCHRS_PAGESIZE_4_BIT_1584_W   2
 Page of 1584 words. More...
 
#define ECCHRS_PAGESIZE_4_BIT_2112_W   3
 Page of 2112 words. More...
 
#define ECCHRS_PAGESIZE_4_BIT_2640_W   4
 Page of 2640 words. More...
 
#define ECCHRS_PAGESIZE_4_BIT_3168_W   5
 Page of 3168 words. More...
 
#define ECCHRS_PAGESIZE_4_BIT_3696_W   6
 Page of 3696 words. More...
 
#define ECCHRS_PAGESIZE_4_BIT_4224_W   7
 Page of 4224 words. More...
 
#define ECCHRS_PAGESIZE_4_BIT_NR_W(x)   ((x)/528 -1)
 Page of (x) words. More...
 
#define ECCHRS_PAGESIZE_4_BIT_NR_S(x)   ((x) -1)
 Page of (x) sectors. More...
 

Functions

static __always_inline U32 ecchrs_4bit_check_error (volatile avr32_ecchrs_t *ecchrs)
 Check (in the 4-bit corrector mode) if an error is detected after reading one or more sectors from the Nand Flash. More...
 
static __always_inline void ecchrs_correct_rs (volatile avr32_ecchrs_t *ecchrs)
 Launch the 4-bit Reed Solomon correction. More...
 
static __always_inline void ecchrs_freeze (volatile avr32_ecchrs_t *ecchrs)
 Freeze the ECCHRS controller. More...
 
static __always_inline U32 ecchrs_get_cw (volatile avr32_ecchrs_t *ecchrs, U32 id)
 Get the ECCHRS codewords. More...
 
static __always_inline void ecchrs_init (volatile avr32_ecchrs_t *ecchrs, const ecchrs_options_t *opt)
 Initialize the ECCHRS. More...
 
static __always_inline void ecchrs_reset (volatile avr32_ecchrs_t *ecchrs)
 Reset the ECCHRS controller. More...
 
static __always_inline void ecchrs_unfreeze (volatile avr32_ecchrs_t *ecchrs)
 Unfreeze the ECCHRS controller. More...