PIT Timer clock source

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

PIT Timer clock source

ソリューションへジャンプ
1,514件の閲覧回数
Reyna_pan45
Contributor II

hi  ALL

I created a project about pit timer about 1 ms timer interrupt with RTD 3.0.0 ,S32DS 3.5, s32K312

PIT clock frequency is 30 MHz ,so 1 ms =1/( 30 MHz/30000) 

so PIT_PERIOD =  30000,but the timer is incorrect ,

and i debug the project find the PIT clock frequency ≈ 121 MHz

could you tell me was wrong with my project ?thanks

see attached file "pit_test.zip"

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,503件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

your system is running out of FIRC not SPLL due to wrong clock init API used. 
So instead of Clock_Ip_InitClock(&Clock_Ip_aClockConfig[0]); use rather

Clock_Ip_Init(&Clock_Ip_aClockConfig[0]);

then have #define PIT_PERIOD 30000U /* 1ms */ as you calculated

BR, Petr

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,504件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

your system is running out of FIRC not SPLL due to wrong clock init API used. 
So instead of Clock_Ip_InitClock(&Clock_Ip_aClockConfig[0]); use rather

Clock_Ip_Init(&Clock_Ip_aClockConfig[0]);

then have #define PIT_PERIOD 30000U /* 1ms */ as you calculated

BR, Petr

0 件の賞賛
返信