Add a TODO to check for Supply Voltage before setting F4 paralleisme to 32 bits
[fw/stlink] / src / stlink-common.c
index b49e21ab046afeb36e7b27ae605320381ef85215..5a51314240eceab6d68bf2d4144f4fd1c6b7aecf 100644 (file)
@@ -812,6 +812,9 @@ int stlink_fread(stlink_t* sl, const char* path, stm32_addr_t addr, size_t size)
         return -1;
     }
 
+    if (size <1)
+       size = sl->flash_size;
+
     if (size > sl->flash_size)
        size = sl->flash_size;
 
@@ -1242,6 +1245,7 @@ int stlink_write_flash(stlink_t *sl, stm32_addr_t addr, uint8_t* base, unsigned
        /* First unlock the cr */
        unlock_flash_if(sl);
 
+       /* TODO: Check that Voltage range is 2.7 - 3.6 V */
        /* set parallelisim to 32 bit*/
        write_flash_cr_psiz(sl, 2);