Hi,
I created my own sketch for the LPC54114 MCU using MCU Xpresso IDE. when I compile and debug the code it works fine. that means I can check my algorithm working fine and can read the respected data in console window. but after I stop the debug mode the code is not running by just powering up the board.
But when I do same process with example codes it works fine in debug mode and also by power it up.
I think I made a mistake in configuration settings. Can anyone help me to get out of this problem.
I am using LPCXpresso54114 evaluation board.
Thank you.
Solved! Go to Solution.
Hello Dineshkumar J,
Unfortunately, I'm not able to reproduce the behavior you mentioned. Here are the steps I'm following to create the new project.
Select New project in the Quickstart Panel
Select your development board, in this case LPCXpresso 54114.
Select UART as the SDK debug console.
Leave default properties in Advanced project settings and click on finish.
When I enter to the debug session I'm able to see the Hello World printed in the terminal. If I exit the debug session and I reset the board I'm also able to see the Hello World in the terminal, so the project is still there once I exit the debug session.
Could you please follow these steps and try with a simple project that just prints Hello World in the terminal?
Hope it helps!
Victor.
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Dineshkumar J,
How are you creating the new project? Are you using the New project wizard? It sounds like you are saving the program in the RAM memory, this is why you are loosing the program.
In the MCU settings of your project you should see the Flash memory at the top, could you please confirm this on your side?
Regards,
Victor.
Hi victor,
I used a new project wizard to create a project. I checked my memory settings and flash memory was configured in memory settings of my project.
Thank you.
Are you using printf to the console? If so, that only works when debugging - otherwise it will hang, waiting for the debugger.
I don't think it could be the problem because printf command also used in the example codes but it still working after the debug closed.
Your project is probably configured semihosting printf : See section 15.4, "What is Semihosting?" (and in particular section 15.4.5,"Semihosted printf and Debugging"), of the MCUXpresso IDE v10.2.0 User Guide for details.
Either ensure that you have the hard fault handler in your project, or else you can probably use Quick Settings to reconfigure the PRINTF macro to point to the UART DEBUG_CONSOLE system (see section 18.1, "Quick Settings" for details).
Hi,
Now I removed all PRINTF lines from my code but the problem still occurs. It runs in debug mode but not in normal mode.
I think there may be a any other problem which causes this.
I need to solve this problem as soon as possible.
Thank you.
Hello Dineshkumar J,
Unfortunately, I'm not able to reproduce the behavior you mentioned. Here are the steps I'm following to create the new project.
Select New project in the Quickstart Panel
Select your development board, in this case LPCXpresso 54114.
Select UART as the SDK debug console.
Leave default properties in Advanced project settings and click on finish.
When I enter to the debug session I'm able to see the Hello World printed in the terminal. If I exit the debug session and I reset the board I'm also able to see the Hello World in the terminal, so the project is still there once I exit the debug session.
Could you please follow these steps and try with a simple project that just prints Hello World in the terminal?
Hope it helps!
Victor.
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi victorjimenez,
I tried your solution it works great.
The problem is when I use this settings with my coding it produce the same problem. So that I debugged the entire coding step by step. Then I figured out the real problem. My coding is entirely based on the current time based switching condition. For getting current time I used the clock() function described in the time library. This returns the correct value in the debug mode. But not in the running mode. To confirm this I unindent the clock function write the simple blinking condition based on input it works fine, and also I created a new project to print the clock() functions return value. It output is strange not like the expected one.
I would like to know alternate solution for getting current time or reason behind this strange action.
Thank you.
Have a great day!
Hello Dineshkumar J,
You want to get the current time in the format hh:mm:ss? If so, I recommend you to check the example of the RTC module that comes with the SDK.
Hope it helps!
Victor.
No, Not in that format. I just need it as the incremental value or in terms of seconds only. based upon that value and input I have to switch the condition.
For more clear explanation it is same as the millis() function in the Arduino IDE.
Hello Dineshkumar J,
If you want to have a precision of seconds, then I highly recommend you to use the internal RTC instead of the time library.
Hope it helps!
Victor.
Hi,
My project is automatically configured with the hard fault handler by IDE.
And also I can't able to change to change the Quick settings>SDK DEBUG CONSOLE settings it is blurred and I can't able to access it.