cancel
Showing results for 
Search instead for 
Did you mean: 

I bricked my brand new VLDiscovery board

andyturk
Associate II
Posted on August 11, 2012 at 09:46

About 45 minutes into playing with my new VLDiscovery board, I seem to have bricked it. I downloaded a ''bad'' program onto the thing and now it's telling me that the device is protected and resists all my attempts to put a ''good'' program into flash.

I'm doing all this on OS X (Lion) with opened 0.6.0-rc1. Openocd seemed to work well enough to put the bad code down, so I've got to believe there's some magic incantation that will let me use the same setup to get it working again. The board cost less than $10, but it'd be a shame to throw it away because of some bad bits. I'm pretty sure my opened setup is workable because I can successfully flash a STMF4Discovery board with good code. What I'm missing is some way to bring the VLDiscovery board back.

Unfortunately, I don't have access to a windows environment and CrossWorks chokes when I try to install the STM32 packages and thus never sees my board via USB.

The board seems generally hosed now with bogus values coming back for the size of flash memory. Is it just a paperweight now?

--------------------------------------

$ telnet localhost 4444

Trying 127.0.0.1...

Connected to localhost.

Escape character is '^]'.

Open On-Chip Debugger

> halt

target was in unknown state when halt was requested

target state: halted

target halted due to debug-request, current mode: Thread 

xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc

> mdw 0 4 

0x00000000: 40000080 00000000 00000000 00000000 

> flash erase_sector 0 0 last

device id = 0x10016420

flash size = 5384kbytes

erased sectors 0 through 5383 on flash bank 0 in 0.029046s

> cd /Users/andy/code/chibios/demos/ARMCM3-STM32F100-DISCOVERY

> flash write_image build/ch.elf

Padding image section 0 with 4 bytes

flash write algorithm aborted by target

target state: halted

target halted due to breakpoint, current mode: Thread 

xPSR: 0x41000000 pc: 0x2000003a msp: 0xfffffffc

flash write failed at address 0x8000002

flash memory write protected

error writing to flash at address 0x08000000 at offset 0x00000000

in procedure 'flash'

20 REPLIES 20
frankmeyer9
Associate II
Posted on August 13, 2012 at 19:54

That was a somehow cryptical expression of disfavour for Apples Closed-Source / Customer Lock-in strategy. That is much more expressed in its iphone/ipad product lines.

I can't see any special reason to choose Mac for SW development, apart from the OS and the GUI. And this is where personal taste comes in, and flame wars start ...

Posted on August 13, 2012 at 21:48

Then again I can see the appeal of an IPS screen with 2880x1800, or one of the 2560x1440 or 2560x1600 displays.

I'm just scared by the delta in cost compared to a 6 core PC with a 28'' 1920x1200 display.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
frankmeyer9
Associate II
Posted on August 14, 2012 at 07:28

Agree.

Nothing against a Mac, except for the rather astronomical costs, compared to an equivalent Non-Mac system.

andyturk
Associate II
Posted on August 14, 2012 at 08:04

I dunno if they're ''astronomical''--worst case, the Apple tax is what, 50% more? My desktop box is a '10 mac mini server. It's fast enough (just), super small and quiet as well. Development work isn't all that demanding of a system (unlike gaming or database work), so it suits my needs fine. Occasionally, I lust after something more beefy, but I'm holding out for when Apple gets around to refreshing the minis with Ivy Bridge.

Besides, the whole rounded corner brushed aluminum thing looks a lot better than ''beige.''

http://turkish.smugmug.com/Electronics/Panasonic-13XX/i-bRXLMVh/0/X2/IMG0380-X2.jpg

 

From: fm

Posted: Tuesday, August 14, 2012 7:28 AM

Subject: I bricked my brand new VLDiscovery board

Agree.

Nothing against a Mac, except for the rather astronomical costs, compared to an equivalent Non-Mac system.

Posted on August 16, 2012 at 17:05

Received the board, it appear to be locked in ''Read Out Protection'' mode, the ST-Link utilities wouldn't read the content, using the options I had it turn ROP off, which achieved that and mass erased the part. Now appears to be working, I brought up the Blinky example in Keil.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
andyturk
Associate II
Posted on August 16, 2012 at 19:32

Excellent! I wonder how the readout protection got turned on? Yikes.

You'll be pleased to know that I haven't bricked my F4 board. Yet. ;)

andyturk
Associate II
Posted on August 16, 2012 at 19:33

Oh, I forgot to ask whether it's reporting a valid flash memory size now.

Posted on August 16, 2012 at 22:07

Yes, now reports 128KB, before it was reporting some stupidly large values as I recall.

Did you try and set the options bytes before it died?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
andyturk
Associate II
Posted on August 17, 2012 at 00:20

''Did you try and set the options bytes before it died?''

Not in code on the device. I did make several hamfisted attempts to crack it open with OOCD. That's probably where it went off the rails.
tdowad
Associate
Posted on August 28, 2012 at 02:24

I do believe I have broken my STM32F0-Discovery by assigning USART2 to the pins PA14 & PA15 ---- one of those pins is shared with the SWD.

I am looking for the jumper for BOOT0...