This is an automated email from Gerrit.

Spencer Oliver ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/991

-- gerrit

commit 0c9a2220b763e01d0d6bca3b2fa192d0195e7dd4
Author: Spencer Oliver <[email protected]>
Date:   Tue Nov 20 15:17:46 2012 +0000

    flash: use correct stm32f1x option read mask
    
    Make sure we do not mask out the BFB2 boot bank bit, as this is used on
    the larger XL devices.
    
    Change-Id: Iacfdf874140e409e0c4ca9b9aee8f5c2f90dc9be
    Signed-off-by: Spencer Oliver <[email protected]>

diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c
index 2d86e56..37335eb 100644
--- a/src/flash/nor/stm32f1x.c
+++ b/src/flash/nor/stm32f1x.c
@@ -231,7 +231,7 @@ static int stm32x_read_options(struct flash_bank *bank)
        if (retval != ERROR_OK)
                return retval;
 
-       stm32x_info->option_bytes.user_options = (uint16_t)0xFFF8 | 
((optiondata >> 2) & 0x07);
+       stm32x_info->option_bytes.user_options = (uint16_t)0xFFF0 | 
((optiondata >> 2) & 0x0f);
        stm32x_info->option_bytes.user_data = (optiondata >> 
stm32x_info->user_data_offset) & 0xffff;
        stm32x_info->option_bytes.RDP = (optiondata & (1 << OPT_READOUT)) ? 
0xFFFF : 0x5AA5;
 
@@ -1364,7 +1364,7 @@ COMMAND_HANDLER(stm32x_handle_options_write_command)
 {
        struct target *target = NULL;
        struct stm32x_flash_bank *stm32x_info = NULL;
-       uint16_t optionbyte = 0xF8;
+       uint32_t optionbyte = 0xF0;
 
        if (CMD_ARGC < 4)
                return ERROR_COMMAND_SYNTAX_ERROR;

-- 

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to