This is an automated email from Gerrit.

Andreas Fritiofson (andreas.fritiof...@gmail.com) just uploaded a new patch set 
to Gerrit, which you can find at http://openocd.zylin.com/1963

-- gerrit

commit b27103234f7708f51337cdc7e094e6c27eb97ad7
Author: Andreas Fritiofson <andreas.fritiof...@gmail.com>
Date:   Fri Feb 21 17:17:32 2014 +0100

    stm32f1x: Fix option byte flag parsing
    
    Change-Id: Ifa04e1f215ac5790db3d432cc0d7d532660459f2
    Signed-off-by: Andreas Fritiofson <andreas.fritiof...@gmail.com>

diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c
index 105bd79..1b67ff0 100644
--- a/src/flash/nor/stm32f1x.c
+++ b/src/flash/nor/stm32f1x.c
@@ -1433,12 +1433,12 @@ COMMAND_HANDLER(stm32x_handle_options_write_command)
                else if (strcmp("HWWDG", CMD_ARGV[0]) == 0)
                        optionbyte &= ~(1 << 0);
                else if (strcmp("NORSTSTOP", CMD_ARGV[0]) == 0)
-                       optionbyte &= ~(1 << 1);
-               else if (strcmp("RSTSTNDBY", CMD_ARGV[0]) == 0)
+                       optionbyte |= (1 << 1);
+               else if (strcmp("RSTSTOP", CMD_ARGV[0]) == 0)
                        optionbyte &= ~(1 << 1);
                else if (strcmp("NORSTSTNDBY", CMD_ARGV[0]) == 0)
-                       optionbyte &= ~(1 << 2);
-               else if (strcmp("RSTSTOP", CMD_ARGV[0]) == 0)
+                       optionbyte |= (1 << 2);
+               else if (strcmp("RSTSTNDBY", CMD_ARGV[0]) == 0)
                        optionbyte &= ~(1 << 2);
                else if (stm32x_info->has_dual_banks) {
                        if (strcmp("BOOT0", CMD_ARGV[0]) == 0)

-- 

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to