testing n-Bed SPI flash

Dependencies:   at45db161d mbed

Fork of SPIFLASH_AT45DB by Suga koubou

Files at this revision

API Documentation at this revision

Comitter:
chalikias
Date:
Fri Jan 23 09:41:37 2015 +0000
Parent:
0:54f4cc3dfc0e
Commit message:
n-bed related comments

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 54f4cc3dfc0e -r a78f957bd042 main.cpp
--- a/main.cpp	Mon Nov 26 03:14:24 2012 +0000
+++ b/main.cpp	Fri Jan 23 09:41:37 2015 +0000
@@ -1,3 +1,8 @@
+// N.C. n-bed test AT45DB161E
+// PAGE_SIZE 512, PAGE_NUM 8192
+
+
+
 /*
  * SPI FLASH AT45DB081D (Atmel)
  *   8Mbit
@@ -6,7 +11,8 @@
 #include "at45db161d.h"
 
 #undef PAGE_SIZE
-#define PAGE_SIZE 264 // AT45DB081D (1MB)
+//#define PAGE_SIZE 264 // AT45DB081D (1MB)
+#define PAGE_SIZE 512 // AT45DB081D (1MB) N.C.
 //#define PAGE_SIZE 528 // AT45DB321D (4MB)
 #define PAGE_NUM 4095 // AT45DB081D (1MB)
 //#define PAGE_NUM 8192 // AT45DB321D (4MB)
@@ -18,7 +24,7 @@
 Serial pc(USBTX, USBRX);
 
 SPI spi(p11, p12, p13); // mosi, miso, sclk
-ATD45DB161D memory(spi, p19);
+ATD45DB161D memory(spi, p14);
 
 void flash_write (int addr, char *buf, int len) {
     int i;
@@ -44,7 +50,7 @@
     Timer t;
     ATD45DB161D::ID id;
 
-    pc.baud(115200);
+    //pc.baud(115200);
     spi.frequency(16000000);
     wait_ms(500);