cancel
Showing results for 
Search instead for 
Did you mean: 

LED blinking

osindgy
Associate
Posted on September 17, 2012 at 17:17

Hi,

I am an university student and working on the STM32F4 board, I am very new to this environment and am just tyring to get handson for my Dissertation project. I have started using this kit and able to blink LEDs as a first step. I use the STLink to debug. Now i want to run this program from flash. I use the CrossWorks IDE to flashby using Program Flash menu. But after i power up there is no LED blinking. Please let me know what am i doing wrong.
3 REPLIES 3
Posted on September 17, 2012 at 17:29

Make sure you are compiling the application to a FLASH address.

Using the debug options should program it into flash, cycling the power should demonstrate this.

If it is not writing into flash you need to check settings or logs to understand why.

There have been problems in the past, with other IDE, that the ''Program Flash'' option doesn't work properly for ST-LINK's, but the ''Debug'', ''Load Application at Startup'' and ''Run to Main'' type options do work, and do program the flash.

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

Thanks for the response, When i use the Debug option to run, I can see that the main() address is at 0x08000390 which should be flash, and i can single step and run, no issues. But when i power cycle the program just doesnt work. Is there anything i should take care of.

frankmeyer9
Associate II
Posted on September 18, 2012 at 08:20

I think your ''problem'' is a different one, and it is Crossworks - specific.

As the toolchain designers often had supposedly problems to get control over a running controller via JTAG, the use a endless loop at the startup code to keep it from starting the application without debugger attached.

If you do not like this behavior, and your application is stable, define ''STARTUP_FROM_RESET'' in your project settings before rebuild. This will remove this endless loop. That issue is described in the Crossworks manual and the support website, too.