We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello Sir,
I am using LPC2368 controller for my project.I am using 72 MHz frequency for my project which is the maximum frequency of CPU.
Actually I have certain section of code which must be process in 700 us but it is taking 800 us when i checked it on CRO. I am using C programming .I can n,t reduce instruction .I want to know that is there is any way to increase processing speed of that particular code of section so that it will complete in require time. I will be very thankful .
Thanks & Regards
Rohit
Have you selected the C/C++ compiler's optimization level to O3 and check the "optimize for time" option ?
I want to know that is there is any way to increase processing speed of that particular code of section so that it will complete in require time.
First you need to make sure that the MCU is set up for maximum performance. In particular, the Memory Acceleration Module (MAM) has to be set up properly. Also, make sure that the CPU clock frequency really is 72 MHz. Try different compiler settings (optimization levels, speed or size as optimization goal).
I can n,t reduce instruction
Why is that? You can try to identify performance bottlenecks in your code and eliminate them. For example, if your code performs many random accesses of table data in flash memory, it will be beneficial to have the table in RAM. Some loop unrolling might be beneficial also. It all depends on the exact nature of the code, of course.
Thanks Sir for your kind support
Yes i am confirm that CPU is running at 72 MHz.I checked all PLL setting
Yes it is also true that i have to access table that are stored in flash but if Can not save these tables into RAM that because i need RAM for other purpose.
What is loop unrolling?
en.wikipedia.org/.../Loop_unwinding
Thanks Sir for your reply
NO the C/C++ compiler's optimization level was set to default in my project.
Now i set it to O3. I notice that it reduces size of code to a great extent.