Re: [Openocd-development] [PATCH] stm32 : improve unlock procedure for mass_erase

2010-07-16 Thread gcembed
That's why, at first, I have created a new command to keep mass_erase behavious unchanged. I think that is the better way to do. I already try several TCL combination but none work properly. If someone post a (full) working TCL script, it is good for me. So I going to wait some days/weeks to see

Re: [Openocd-development] [PATCH] stm32 : improve unlock procedure for mass_erase

2010-07-16 Thread Andreas Fritiofson
On Fri, Jul 16, 2010 at 10:10 AM, gcembed wrote: > Hello, > I am back. > Andreas, can I add something in stm32x_mass_erase() like > >    stm32x_read_options() >    if (protected) : unlock + reset > >    continue with current code >    /* unlock option flash registers */ >    target_write_u32(targe

Re: [Openocd-development] [PATCH] stm32 : improve unlock procedure for mass_erase

2010-07-16 Thread gcembed
Hello, I am back. Andreas, can I add something in stm32x_mass_erase() like stm32x_read_options() if (protected) : unlock + reset continue with current code /* unlock option flash registers */ target_write_u32(target, STM32_FLASH_KEYR, KEY1); target_write_u32(target, STM32

Re: [Openocd-development] [PATCH] stm32 : improve unlock procedure for mass_erase

2010-06-01 Thread Andreas Fritiofson
On Tue, Jun 1, 2010 at 1:56 PM, gcembed wrote: > Hello, > I have added a new command for stm32x : mass_erase_unlock > This function combine "stm32x unlock 0" + reset to apply unlock + "stm32x > mass_erase 0" > In this way, it is more easier to handle the unlock sequence and makes the > (annoying)

[Openocd-development] [PATCH] stm32 : improve unlock procedure for mass_erase

2010-06-01 Thread gcembed
Hello, I have added a new command for stm32x : mass_erase_unlock This function combine "stm32x unlock 0" + reset to apply unlock + "stm32x mass_erase 0" In this way, it is more easier to handle the unlock sequence and makes the (annoying) reset procedure transparent. After calling mass_erase_un