sam3 smc definitions, add ECC registers.
authoraleph <aleph@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 21 Apr 2011 09:13:53 +0000 (09:13 +0000)
committeraleph <aleph@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 21 Apr 2011 09:13:53 +0000 (09:13 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4863 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/cortex-m3/io/sam3_smc.h

index 7f2faaa78e823248cffdde3de86f192e7cd08c83..7dc977e0bcc7d3132c7d68de3263b0e7254a634a 100644 (file)
 #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.
  */