C Algorithm, Execution Time

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

C Algorithm, Execution Time

746 次查看
walter_gallegos
Contributor I

I'm working with a sliced algorithm, so I like to know the execution time of each slice.

Exist into KDS a tool to calculate the execution time of a C algorithm or process ?

标签 (1)
标记 (3)
0 项奖励
2 回复数

399 次查看
BlackNight
NXP Employee
NXP Employee

Hi Walter,

I'm using the Segger SystemViewer (see https://mcuoneclipse.com/2015/11/16/segger-systemview-realtime-analysis-and-visualization-for-freert... ) for this kind of measurement. With

SEGGER_SYSVIEW_OnUserStart(id)

I can start a measurement point, and with

SEGGER_SYSVIEW_OnUserStop(id)

I have the corresponding end point. You can have multiple different IDs so you can measure different spans. Using the SystemViewer I get the exact timing. I hope you are using a Cortex-M4(F) core, then you get the number of cycles. Otherwise on an a M0+ (because it does not have a cycle counter in hardware) the timing is measured with the SysTick ticks.

I hope this helps,

Erich

0 项奖励

399 次查看
walter_gallegos
Contributor I

Hi Erich

Thank for answer, Segger SystemViewer apparently do the task; unfortunately I'm using  a P&E pod. So, I don't have access to a J-Link.

I will place some assert to validate pre/post-conditions into the slices; is not the same but be warrant non overlapping working condition.

Regards

Walter

0 项奖励