From: aleph Date: Thu, 21 Apr 2011 09:13:53 +0000 (+0000) Subject: sam3 smc definitions, add ECC registers. X-Git-Tag: 2.7.0~103 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=257804fd23cfe2ac778f8bc01bacd105f323330c;p=bertos.git sam3 smc definitions, add ECC registers. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4863 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/cortex-m3/io/sam3_smc.h b/bertos/cpu/cortex-m3/io/sam3_smc.h index 7f2faaa7..7dc977e0 100644 --- a/bertos/cpu/cortex-m3/io/sam3_smc.h +++ b/bertos/cpu/cortex-m3/io/sam3_smc.h @@ -297,6 +297,31 @@ #define SMC_SR_RB_EDGE0 BV(24) /*\}*/ +/** + * Defines for bit fields in SMC_ECC_CTRL register + */ +/*\{*/ +#define SMC_ECC_CTRL_RST BV(0) +#define SMC_ECC_CTRL_SWRST BV(1) +/*\}*/ + +/** + * Defines for bit fields in SMC_ECC_MD register + */ +/*\{*/ +#define SMC_ECC_MD_ECC_PAGESIZE_SHIFT 0 +#define SMC_ECC_MD_ECC_PAGESIZE_MASK 0x3 +#define SMC_ECC_MD_ECC_PAGESIZE_PS512_16 0x0 +#define SMC_ECC_MD_ECC_PAGESIZE_PS1024_32 0x1 +#define SMC_ECC_MD_ECC_PAGESIZE_PS2048_64 0x2 +#define SMC_ECC_MD_ECC_PAGESIZE_PS4096_128 0x3 +#define SMC_ECC_MD_TYPCORREC_SHIFT 4 +#define SMC_ECC_MD_TYPCORREC_MASK (0x3 << SMC_ECC_MD_TYPCORREC_SHIFT) +#define SMC_ECC_MD_TYPCORREC_CPAGE (0x0 << SMC_ECC_MD_TYPCORREC_SHIFT) +#define SMC_ECC_MD_TYPCORREC_C256B (0x1 << SMC_ECC_MD_TYPCORREC_SHIFT) +#define SMC_ECC_MD_TYPCORREC_C512B (0x2 << SMC_ECC_MD_TYPCORREC_SHIFT) +/*\}*/ + /** * Defines for bit fields in SMC_SETUP registers. */