This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

program freeze

I've got lots of experience in programming but I now learn arm.

So now I am turning on and off a pair of led's. I am having two problems. When I click the button for the led's to shut off they only shut off for a second and then come back on. Also when I click the on button, which is suppose to cause the leds the flash, the program freezes. I know there are more efficent ways to get leds to flash than the code I am using. I am just trying to do different things for generally knowledge. plz help.

  • Sorry I really did try to read your code. But Keil refused to send me your IP number, so I couldn't hack your computer to get access to the source code.

    Maybe you should consider posting the code here? Just remember to use the proper tags when you paste in the code - and it helps if the code is indented with space since web pages doesn't much understand what setting you might have used in your editor for indenting hard tab characters.

    One thing to consider - does your program ends with an infinite loop so it doesn't run out of main()?

    If your program hangs when it should blink - it shoudln't be too hard to figure out which code line that makes the difference, using standard debugging concepts. What makes a PC program hang? Your ARM processor will behave similarly if you get stack overflows, impossible loop conditions, invalid pointers, ...

  • a)
    With MDK-ARM V5 (even with the Eval-Version) we do offer several example projects demonstrating the LED-Blinking. I recommend to i.e. open the MCB4300's Blinky-Project, offered at the Pack Installer. This Knowledgebase Article explains the required steps to get access to a project:
    http://www.keil.com/support/docs/3731.htm

    b)
    It is making things easier for us to comment on any request if you let us know the Keil-product and version you have installed.