Execution optimization of MPC5744p

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Execution optimization of MPC5744p

563件の閲覧回数
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 件の賞賛
返信
1 返信

539件の閲覧回数
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 件の賞賛
返信