Great,
Luckily Im a bloody beginner and in an evaluation phase right now.
I think for the real work, I will switch over to an FT2232H based 
programming hardware, which seems to be supported way better by OpenOCD 
than any STLINK and is even cheaper.

Thanks again and keep up the good work!

Mit freundlichen Grüßen

         Simon Küppers

Am 06.09.2012 21:48, schrieb Spencer Oliver:
> On 06/09/12 20:32, Simon Küppers wrote:
>> Thanks for you Answer. I can see the problem.
>> I assume it would be impossible to implement such a 16 bit write routine
>> into the original firmware, which is owned by STM ;-)
>
> That's correct, however we can hope.
>
>> I think the warning is appropriate, could save some time to those having
>> the same problems as I have.
>>
>> Im curious, what the suggested fix for the problem is and how STMs Tool
>> manages this 16 bit write access. Am I right in assuming, that a
>> bootloader is loaded into the processor, which accepts the data from the
>> programmer and does the 16 bit write from user code instead of via the
>> JTAG/SWD interface?
>>
>
> ST use a small loader program, this is what we do for flash but not 
> the option bytes.
>
> The current patch only fixes the issue for stm321x family, i prefer a 
> generic patch that adds a stlink 16bit read/write routine.
>
>> My question is, if this problem is also present in STLINK/V2 or FT2232H
>> Programmers.
>>
>
> all stlink's have the issue at the moment - all other interfaces are ok.
>
>> I now removed the protection using the "STM32 ST-Link Utility"-Tool by
>> STM then reinstalled the WinUSB driver and loaded the flash using
>> OpenOCD again. I then tried my script again, and like before, nothing
>> worked.
>> I reverted back to the mass-storage driver and looked via the ST-Link
>> Utility and discovered that the Read Protection Bit has been set again
>> by OpenOCD!
>>
>> I found out, that the current and broken version of "stm32f1x unlock 0"
>> actually sets the Readout Protection! Now I am doing only a mass_erase
>> followed by write_image and everything works now.
>> Yeehaw!
>> Thanks for your time and help.
>>
>> PS: Not only throw a warning with stm32f1x unlock, but also remove the
>> erratic behaviour of enabling the Readout Protection.
>>
>
> the error thrown now will prevent this from happening now.
>
> Spen
>


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to