summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey McRae <geoff@spacevs.com>2011-11-10 22:48:12 +0000
committerGeoffrey McRae <geoff@spacevs.com>2011-11-10 22:48:12 +0000
commit46eb51eb068dd64ac7147f133939f0cbfa58dfd6 (patch)
treee5fb375cfa0d745f9e3cb73dee4ed62e86e0ff36
parentc0c0786a57dc8caf16f417e36c07d4b972c23713 (diff)
Issue #18 - Thanks bolmsted
Patch for adding F2 and F4 to stm32flash. Only the F4 part has been tested on a STM32F4 discovery board. The serial timeout needed to be increased to accommodate the significant increase in the mass erase time.
-rw-r--r--serial_posix.c2
-rw-r--r--stm32.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/serial_posix.c b/serial_posix.c
index 377c9ba..f4097b4 100644
--- a/serial_posix.c
+++ b/serial_posix.c
@@ -147,7 +147,7 @@ serial_err_t serial_setup(serial_t *h, const serial_baud_t baud, const serial_bi
CREAD;
h->newtio.c_cc[VMIN ] = 0;
- h->newtio.c_cc[VTIME] = 30;
+ h->newtio.c_cc[VTIME] = 180;
/* set the settings */
serial_flush(h);
diff --git a/stm32.c b/stm32.c
index da38f42..d0ff131 100644
--- a/stm32.c
+++ b/stm32.c
@@ -48,6 +48,8 @@ struct stm32_cmd {
const stm32_dev_t devices[] = {
{0x412, "Low-density" , 0x20000200, 0x20002800, 0x08000000, 0x08008000, 4, 1024, 0x1FFFF800, 0x1FFFF80F, 0x1FFFF000, 0x1FFFF800},
{0x410, "Medium-density" , 0x20000200, 0x20005000, 0x08000000, 0x08020000, 4, 1024, 0x1FFFF800, 0x1FFFF80F, 0x1FFFF000, 0x1FFFF800},
+ {0x411, "STM32F2xx" , 0x20002000, 0x20020000, 0x08000000, 0x08100000, 4, 16384, 0x1FFFC000, 0x1FFFC00F, 0x1FFF0000, 0x1FFF77DF},
+ {0x413, "STM32F4xx" , 0x20002000, 0x20020000, 0x08000000, 0x08100000, 4, 16384, 0x1FFFC000, 0x1FFFC00F, 0x1FFF0000, 0x1FFF77DF},
{0x414, "High-density" , 0x20000200, 0x20010000, 0x08000000, 0x08080000, 2, 2048, 0x1FFFF800, 0x1FFFF80F, 0x1FFFF000, 0x1FFFF800},
{0x416, "Medium-density ULP", 0x20000800, 0x20004000, 0x08000000, 0x08020000, 16, 256, 0x1FF80000, 0x1FF8000F, 0x1FF00000, 0x1FF01000},
{0x418, "Connectivity line" , 0x20001000, 0x20010000, 0x08000000, 0x08040000, 2, 2048, 0x1FFFF800, 0x1FFFF80F, 0x1FFFB000, 0x1FFFF800},