On 5 February 2012 14:38, Flemming Frandsen <[email protected]> wrote:
> Hi, I have a problem with my olimex-arm-usb-tiny-h adapter, for some
> reason I can't program the flash except the first time I try after
> plugging in the adapter, the second and subsequent times I try data
> will come back from flash as all 1's.
>
> I suspect the adapter is being left in some weird state that's only
> cleared by power-cycling it.
>

Are you using SRST to reset the target?

The cortex-m3 supports SRST (hardware) reset and two types of software
reset - either SYSRESETREQ or VECTRESET.
OpenOCD defaults to VECTRESET for cores that do not support
SYSRESETREQ - according to the docs the LPC1768 is one of them.

Generally the issue with using VECTRESET is that it only resets the m3
core - peripherals are not reset.
If possible i would try using SRST to reset the target, as this should
also reset the peripherals.
Another solution is to create a peripheral reset script - have a look
at the stellaris.cfg as they also suffer a similar issue.

Cheers
Spen

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to