]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/tmimsp/common/chips/at25df/Stm25p.h
tmimsp: support 4 KB sectors on AT25DF041A
[tinyos-2.x.git] / tos / platforms / tmimsp / common / chips / at25df / Stm25p.h
index a8bfd745b076b464d4efc53c6f7d46af921e6762..e8ad229f79deb4bef564b310e81900e53bb817f4 100644 (file)
 /**
  * This header must override the one found in TOS/chips/stm25p to account
  * for the differences in the Atmel AT25DF041A, which is generally compatible
- * with the Numonyx (formerly ST) M25P family.
+ * with the Numonyx (formerly ST) M25P family.  The part uses a modified
+ * Stm25pSpiP.nc file, in this directory, to support 4 KB erase blocks (aka 4 KB
+ * sector size).
  *
  * Derived from original Stm25p.h by Arch Rock Corporation in
  * TOSDIR/chips/stm25p.
+ *
+ * @author R. Steve McKown <rsmckown@gmail.com>
  */
 
 #ifndef __STM25P_H__ /* do not change this header definition */
@@ -45,10 +49,10 @@ typedef storage_addr_t stm25p_addr_t;
 typedef storage_len_t stm25p_len_t;
 
 enum {
-  STM25P_NUM_SECTORS = 8,
-  STM25P_SECTOR_SIZE_LOG2 = 16,
+  STM25P_NUM_SECTORS = 128,
+  STM25P_SECTOR_SIZE_LOG2 = 12,
   STM25P_SECTOR_SIZE = 1L << STM25P_SECTOR_SIZE_LOG2,
-  STM25P_SECTOR_MASK = 0xffff,
+  STM25P_SECTOR_MASK = 0x0fff,
   STM25P_PAGE_SIZE_LOG2 = 8,
   STM25P_PAGE_SIZE = 1 << STM25P_PAGE_SIZE_LOG2,
   STM25P_PAGE_MASK = STM25P_PAGE_SIZE - 1,