diff options
-rw-r--r-- | examples/test-fsmc.cpp | 2 | ||||
-rw-r--r-- | libmaple/fsmc.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/examples/test-fsmc.cpp b/examples/test-fsmc.cpp index ff55330..d1c8567 100644 --- a/examples/test-fsmc.cpp +++ b/examples/test-fsmc.cpp @@ -49,6 +49,7 @@ void test_all_addresses() { uint16 count = 0;
uint16 *ptr;
Serial1.println("Now writing all memory addresses (unrolled loop)");
+ SerialUSB.end();
start = micros();
for (ptr = ptr_start; ptr < ptr_end;) {
*ptr++ = count++;
@@ -69,6 +70,7 @@ void test_all_addresses() { *ptr++ = count++;
}
end = micros();
+ SerialUSB.begin();
Serial1.print("Done. Elapsed time (us): ");
Serial1.println(end - start);
diff --git a/libmaple/fsmc.c b/libmaple/fsmc.c index 61fd06c..42e0eb1 100644 --- a/libmaple/fsmc.c +++ b/libmaple/fsmc.c @@ -99,7 +99,7 @@ void fsmc_native_sram_init(void) { /* FIXME replace with macros from fsmc.h */ bank->BCR = (1 << 12) | (1 << 4) | 1; - bank->BTR = (0xF << 16) | (0x3 << 8) | 1; + bank->BTR = (3 << 8); /* (FSMC_BWTR3 not used for this simple configuration.) */ } |