LPC1343 firmware running execution speed issue after compiling

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1343 firmware running execution speed issue after compiling

1,891 Views
blue_falcon
Contributor I

Hello everyone,
I'm new to the embbeded world and have an electronic project with a LPC1343FBD48 MCU on which I have to apply changes in the firmware.
I have the project source code and I am able to write the original firmware to the MCU by connecting it through USB via ISP.
Making modifications in the project source code implies that the code need to be recompiled.
I have found a way (by trials and errors) to compile the project source code using different LCPXpress versions but once flashed, the program in my project seems to run pretty slow compared to the firmware binary initially compiled by the person who created the project.
My project has a screen, that's how i see the 'execution speed issue' (slow screen refresh, slow cursor moving in menu, slow video playing etc...).
Could someone please provide me clue on where or what to check for this execution speed issue ?
Could this be a wrong compilation option (Compilation run successfully) ? A problem with the CMSIS library (used version seems to be 1.3) and my hardware ?
Because of project have been created in 2015 in thought i have to used 'Newlib' instead of 'Redlib', am I correct ?
Note : CMSIS library is directly in the src dir of my project in my case. I'm not importing it. The files were given by the project creator.
Note 2 : Project have been created in 2015 and i have bought my LPC1343FBD48 recently, in 2020.
In advance many thanks for any advice or clue,
If you need more precisions on my case, feel free to ask,

Best Regards,

 

Labels (2)
0 Kudos
Reply
2 Replies

1,860 Views
blue_falcon
Contributor I

Hello @converse, thanks for your answer !
My problem is solved thanks to your point 1.
I read somewhere that by default, the LPC1343 runs at 12Mhz if we don't specify it another frequency in code (correct me if that statement is wrong).
That made sense as my firmware was running slowly... (Has to run at 72Mhz, full speed).
After seeking again in the project code, in found in cr_startup_lpc13xx.c that if the symbol __USE_CMSIS is defined, then the SystemInit() function would be called, which, would set the "main clock speed" to 72Mhz.
I then defined __USE_CMSIS symbol for the MCU Compiler and MCU Assembler, compiled files again, flashed my firmware again, and... it worked at the correct speed !
Thanks again for the clue !

0 Kudos
Reply

1,886 Views
converse
Senior Contributor V

Couple of suggestions:

1. Check the clock speed of your LPC1343 - are you running more slowly than the original?

2. Are you running the Debug version of the build, rather than the Release (optimised) version?

0 Kudos
Reply