How to measure clock cycles/ timing in true time simulator/ Real-time debugger between breakpoints

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

How to measure clock cycles/ timing in true time simulator/ Real-time debugger between breakpoints

ソリューションへジャンプ
1,371件の閲覧回数
ramakr02
Contributor III

Dear All,

Following are the details of the hardware used:

1. Development board: EVB9S12XF512E (S12XFSTARTERKITE: S12XF 2-Node Starter Kit)

2. Target Processor: MC9S12XF512MLM

3. IDE: CodeWarrior Classic HCS12(X) 5.2 (Added the missing derivatives)

I was wondering if there is any debugger option or tool within true time simulator/ Real-time debugger to count or measure clock cycles (or time) elapsed between a breakpoint or start and stop of program on-board?

Any help is welcome!   @dianabatrlova , @RadekS 

Thank you.

Best regards,

Rohit

0 件の賞賛
返信
1 解決策
1,358件の閲覧回数
RadekS
NXP Employee
NXP Employee

Hi ramakr02,

You may switch hiwave into Full Chip Simulation (menu-Component-Set Connection). 
The Register window will show clock cycles. You may switch to the time axis (in ms) by click on the clock value at the Status bar. This tool is good mainly for testing limited code snippets due to a lack of interrupts.

Unfortunately, no clock counter directly in CPU which may be used in run-time debugging on MCU. You may configure and use TCNT register for measuring time periods. However, we typically use an Oscilloscope or Logic Analyzer together with GPIO pin toggling for time measurement.

The GPIO pin toggling presents minimum code intervention and known self-compensated delay for port write.  

I hope it helps you.

Best regards

Radek

 

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,359件の閲覧回数
RadekS
NXP Employee
NXP Employee

Hi ramakr02,

You may switch hiwave into Full Chip Simulation (menu-Component-Set Connection). 
The Register window will show clock cycles. You may switch to the time axis (in ms) by click on the clock value at the Status bar. This tool is good mainly for testing limited code snippets due to a lack of interrupts.

Unfortunately, no clock counter directly in CPU which may be used in run-time debugging on MCU. You may configure and use TCNT register for measuring time periods. However, we typically use an Oscilloscope or Logic Analyzer together with GPIO pin toggling for time measurement.

The GPIO pin toggling presents minimum code intervention and known self-compensated delay for port write.  

I hope it helps you.

Best regards

Radek

 

0 件の賞賛
返信
1,356件の閲覧回数
ramakr02
Contributor III

Thank you @RadekS .

 

I've configured PIT1 for 20usec period, just wanted to confirm that period in debugger. Oscilloscope is an option. 

 

Also, I think the flexray module on chip, is not halted when true time simulator is paused. Is that true?  

 

Best regards,

Rohit

0 件の賞賛
返信