projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sam3 nand driver: initial ECC implementation.
[bertos.git]
/
bertos
/
cpu
/
cortex-m3
/
drv
/
mt29f_sam3.h
diff --git
a/bertos/cpu/cortex-m3/drv/mt29f_sam3.h
b/bertos/cpu/cortex-m3/drv/mt29f_sam3.h
index 06a582baf705124657e51a6e8b0a5347b8875e0f..284d937b1942ba52bca08d12dff2cfcf98f1cfc0 100644
(file)
--- a/
bertos/cpu/cortex-m3/drv/mt29f_sam3.h
+++ b/
bertos/cpu/cortex-m3/drv/mt29f_sam3.h
@@
-42,9
+42,12
@@
// MT29F2G08AAD, FIXME: configurable
// MT29F2G08AAD, FIXME: configurable
-#define MT29F_PAGE_SIZE 0x800 // 2048 B
+#define MT29F_DATA_SIZE 0x800 // 2048 B
+#define MT29F_SPARE_SIZE 0x40 // 64 B
+#define MT29F_PAGE_SIZE (MT29F_DATA_SIZE + MT29F_SPARE_SIZE)
#define MT29F_BLOCK_SIZE 0x20000 // 128 kB
#define MT29F_SIZE 0x10000000 // 256 MB
#define MT29F_BLOCK_SIZE 0x20000 // 128 kB
#define MT29F_SIZE 0x10000000 // 256 MB
+#define MT29F_ECC_NWORDS (MT29F_DATA_SIZE / 256)
#define MT29F_CSID NFC_CMD_CSID_0 // Chip select
/*
#define MT29F_CSID NFC_CMD_CSID_0 // Chip select
/*
@@
-61,8
+64,8
@@
#define MT29F_PINS_PORTC (MT29F_PIN_OE | MT29F_PIN_WE | MT29F_PIN_IO)
#define MT29F_PERIPH_PORTC PIO_PERIPH_A
#define MT29F_PINS_PORTC (MT29F_PIN_OE | MT29F_PIN_WE | MT29F_PIN_IO)
#define MT29F_PERIPH_PORTC PIO_PERIPH_A
-#define MT29F_PIN_CLE BV(
22
)
-#define MT29F_PIN_ALE BV(
21
)
+#define MT29F_PIN_CLE BV(
9
)
+#define MT29F_PIN_ALE BV(
8
)
#define MT29F_PINS_PORTD (MT29F_PIN_CLE | MT29F_PIN_ALE)
#define MT29F_PERIPH_PORTD PIO_PERIPH_A
#define MT29F_PINS_PORTD (MT29F_PIN_CLE | MT29F_PIN_ALE)
#define MT29F_PERIPH_PORTD PIO_PERIPH_A