aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2010-08-07 21:25:51 -0400
committerbnewbold <bnewbold@robocracy.org>2010-08-07 21:25:51 -0400
commitb2dd49c3141d8a21a4e7c7ef51dee7329f847c30 (patch)
tree6677879437eb8b227ee64b71dcfeb6d707b68af9 /examples
parent7b391d7f76a2d56242420c560d65f00a60f78682 (diff)
downloadlibrambutan-b2dd49c3141d8a21a4e7c7ef51dee7329f847c30.tar.gz
librambutan-b2dd49c3141d8a21a4e7c7ef51dee7329f847c30.zip
FSMC tweaks
Diffstat (limited to 'examples')
-rw-r--r--examples/test-fsmc.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/examples/test-fsmc.cpp b/examples/test-fsmc.cpp
index 6449cfd..f4fd068 100644
--- a/examples/test-fsmc.cpp
+++ b/examples/test-fsmc.cpp
@@ -1,8 +1,6 @@
#include "wirish.h"
#include "fsmc.h"
-#include "rcc.h"
-#include "gpio.h"
#define LED_PIN 23 // hack for maple native
#define DISC_PIN 14 // hack for USB on native
@@ -40,8 +38,6 @@ void setup() {
uint32 id;
scb = (SCB_Reg*)SCB_BASE;
- rcc_enable_clk_fsmc();
-
pinMode(LED_PIN, OUTPUT);
pinMode(DISC_PIN, OUTPUT);
digitalWrite(DISC_PIN,1);
@@ -96,13 +92,11 @@ void loop() {
toggle ^= 1;
delay(1);
- ptr = (uint16*)(0x60000000);
- count = 0;
- for(int i = 0; i<1024; i++) {
+ for(int i = 0; i<100; i++) { // modify this to speed things up
count++;
ptr++;
- *ptr = (0x0000FFFF & count);
//delay(10); // tweak this to test SRAM resiliance over time
+ *ptr = (0x0000FFFF & count);
if(*ptr != (0x0000FFFF & count)) {
Serial1.println("ERROR: mismatch, halting");
while(1) { }