Start application after reset.

Comments

7 comments

  • Avatar
    Jon Elliott

    The fact that the program is in the reset_wait loop indicates that you have not defined STARTUP_FROM_RESET - I'd check that you'd defined it in the same build configuration as you are using (or use the Common build configuration which would set it for all build configurations) and that you've set it on the correct node (Philips_LPC230X_Startup.s).

    0
    Comment actions Permalink
  • Avatar
    Michael Woods

    I have encountered a similar problem although I have definitely #defined STARTUP_FROM_RESET, what happens is when I run the code on a development board for the LPC2138/01 the code runs correctly, as in it automatically runs after i have downloaded the program as well as a hardware reset.

     

    However on another board, a prototype board that I have made I can only get the code to automatically run after the code has been flashed, and the code wont automatically run after a hardware reset. Is there any thing that could be causing this? The program is the same on both platforms, it just toggles an led every 20ms

    0
    Comment actions Permalink
  • Avatar
    Darcy Williams

    You don't #define startup from reset, you add it to the preprocessor definitions...  two very different things.

    0
    Comment actions Permalink
  • Avatar
    Michael Woods

    I'm sorry, but placing the the definition in the preprocessor definition makes no difference, and I believe that they are indeed very much the same thing.

     

    Is there anything else that could cause the aforementioned problem?

    0
    Comment actions Permalink
  • Avatar
    Darcy Williams

    Something in the preprocessor defintions is seen by everything.  Something explicity #defined is only visible when included...  so if you put your #define in a .c/.h file it's not going to be seen by the .s.  And you wouldn't typically #define in your .s file because that'll give you problems when trying to debug...  although that doesn't seem like it's going to help in this situation.

    0
    Comment actions Permalink
  • Avatar
    Jon Elliott

    Michael,

    See http://rowley.zendesk.com/entries/61610-application-not-starting-up-from-reset-lpc2000 for a description of possible causes and a description of how to debug it.

    Regards,

    Jon Elliott

    0
    Comment actions Permalink
  • Avatar
    Michael Woods

    I have followed the instructions on the page that you have linked to and found out that after manual power-cycle my lpc2138 is stuck in the boot block.

    I also checked the corresponding pin to enter ISP command handler mode, ie P0.14, which in my circuit is left floating so im not too sure if that is a problem. I also am aware that I have a hard RESET line, with a momentary switch instead of a supervisor chip to hold the line low for a certain duration (which i should have fixed soon). I also have so far added my own interrupt routine for TIMER1, for which I dont think I have a problem with because of the code being able to run on a different lpc2138 chip on a dev board with no problems.

     

    I will try to keep P0.14 high during reset,

    Which I have just done and it has solved my problem. Thank you very much

    0
    Comment actions Permalink

Please sign in to leave a comment.