cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4DISCOVERY, can't seem to run anything

esa
Associate II
Posted on May 26, 2014 at 02:13

I have a F4 discovery board, which I am trying to run a simple led-blinker on. I've tried the demo .hex, demo IO_Togglek, Blinky from Keil and one other simple demo.

I have used precompiled/built with GCC or Keil. 

I can program and verify the memory contents with the integrated St-link v2 from either Keil �Vision or the ST-Link Utility. However I can't seem to get it to run the code properly.

I have tried single-stepping in �Vision, which seems to get stuck on random instructions, go to a hard fault or jump to a random address that seems to be after the end of the actual disassembly shown

(like: 0x008C0190 0000      MOVS          r0,r0, where the actual disassembly seems to end around 0x00010000.) This is accompanied by ''Cannot access memory'' (outside the bounds?)

Do I have a faulty board or is there something obvious that I'm doing wrong?

#stm32f4 #discovery
7 REPLIES 7
Posted on May 26, 2014 at 03:55

The original STM32F4-DISCO, not the STM32F429I-DISCO with the LCD, right?

Have you tried using the firmware library download? Perhaps the GPIO example.

I did post my own hex file recently, but honestly couldn't find it again with a quick Google.

What version of Keil uV?
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
esa
Associate II
Posted on May 26, 2014 at 09:28

Yes, it doesn't have an LCD.

By firmware library, do you mean this? 

http://www.st.com/web/en/catalog/tools/PF257904

I tried flashing the .hex from Project\Demonstration\Binary\ and compiling 

Project\Peripheral_Examples\IO_Toggle\. 

My µV is version 5.10.0.2, full version listing here: 

http://pastebin.com/AJmTfxYZ

raptorhal2
Lead
Posted on May 27, 2014 at 20:00

Incorrect project options settings can cause mysterious execution behavior. Check that the processor device is correct. It probably is STM32F407VG. Check that the Linker interface configuration file (.icf) and Debugger device description file (.ddf) match the processor device.

I am not familiar with Keil. If there are other similar settings, clive1 can probably define them.

And, check that startup_stm32f4xx.s and system_stm32f4xx.c files are included in the project.

Cheers, Hal

Posted on May 27, 2014 at 20:58

Attached .HEX blinks LED on STM32F4-DISCO

________________

Attachments :

STM32F4-Discovery-LED_Toggle.hex : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzjv&d=%2Fa%2F0X0000000bOs%2FszqpWULAi74GUD7D06F_wq7Z1k.M7.jMIEhEHqfoUwQ&asPdf=false
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
esa
Associate II
Posted on May 28, 2014 at 14:03

Results are the same as with other .hex files I've tried. Nothing.

ST-Link Utility is also successfully verify it (and all the others I've tried), so programming/flash should not be an issue.

Also if I go to ST-Link Utility -> Target -> MCU Core

I can't get it to show anything but Running or 0x(null) on all the fields. A few days earlier I also got something like ''can't run application'' a few times but haven't got that in a while.

Posted on May 28, 2014 at 17:07

Well it definitely sounds like you have a hardware problem.

Anything wired to BOOT0, or other pins on the board?

You could check the supply voltages, and RESET pin.

Other than that you should probably try another board.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
esa
Associate II
Posted on May 28, 2014 at 20:13

I don't have anything else connected to the board than a mini-USB cable. I'll try checking the voltages later.

Maybe I'll just try to get the board replaced / get a new one