2014-05-25 05:13 PM
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 #discovery2014-05-25 06:55 PM
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?2014-05-26 12:28 AM
Yes, it doesn't have an LCD.
By firmware library, do you mean this? 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:2014-05-27 11:00 AM
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, Hal2014-05-27 11:58 AM
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=false2014-05-28 05:03 AM
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 CoreI 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.2014-05-28 08:07 AM
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.2014-05-28 11:13 AM
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