Question: Is it possible to check the count down of a PIT

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

Question: Is it possible to check the count down of a PIT

ソリューションへジャンプ
772件の閲覧回数
nijo
Contributor II

Hey,

 

I am trying to debug some code in Code Warrior. I have setup my PIT 0 to use the bus clock and count to 65:

 

SIM_SCGC6 = 0x800000;

 

PIT_TCTRL0 = 0x3UL;
PIT_LDVAL0 = 0x41UL;

 

Is there a way I can check so it is actually started and counting ?

 

In debug mode I can inspect the registers of the PIT, eg, 

 

PIT_MCR0x0 0x40037000
PIT_LDVAL00x1964 0x40037100
PIT_CVAL00xb60 0x40037104
PIT_TCTRL00x3 0x40037108
PIT_TFLG00x1 0x4003710c
PIT_LDVAL10x0 0x40037110
PIT_CVAL10x0 0x40037114
PIT_TCTRL10x0 0x40037118
PIT_TFLG10x0 0x4003711c
PIT_LDVAL20x0 0x40037120
PIT_CVAL20x0 0x40037124
PIT_TCTRL2 0x0 0x40037128
PIT_TFLG2 0x0 0x4003712c
PIT_LDVAL3 0x0 0x40037130
PIT_CVAL3 0x0 0x40037134
PIT_TCTRL3 0x0 0x40037138
PIT_TFLG30x00x4003713c

 

Best regards,

 

0 件の賞賛
1 解決策
576件の閲覧回数
nijo
Contributor II

PIT_LDVAL holds the value we compare against while PIT_CVAL contains the current value that is being counted.

元の投稿で解決策を見る

0 件の賞賛
1 返信
577件の閲覧回数
nijo
Contributor II

PIT_LDVAL holds the value we compare against while PIT_CVAL contains the current value that is being counted.

0 件の賞賛