Execution optimization of MPC5744p

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

Execution optimization of MPC5744p

269 Views
jakozhang
Contributor II

Hello NXP professors:

As a newbie to MPC5744p, I've met a problem about how to optimize the execution time of my program.

This is a picture of a code line in my interrupt service routine.

↓This picture show the timer value before executing the code line I have tested

Snipaste_2023-05-31_21-11-51.png

↓This picture show the timer value after executing the code line I have testedSnipaste_2023-05-31_21-12-35.png

I configured a e-timer(etimer2, channel0) to measure the time intervals between my codes. This timer is configured to clock from MOTC source, and divided by 1, which is 160MHz. My system clock also configured to 160MHz.

Then I found the time to execute this code line is 40 timer cycles, according to 0.25us, that's too slow.

So I wanna know is it normal to use such a long time, or is there any method to further optimize the execution of my codes so that it can use less time.

Greatly thankful!

 

0 Kudos
1 Reply

245 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

In general optimization methods are desrcibed in

https://www.nxp.com/docs/en/application-note/AN4939.pdf

 

main impact have flash configuration, proper PLL setup and enabling cache.

 

Possibly you could choose higher level of code optimization in the compiler.

 

 

 

0 Kudos