need trim?

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

need trim?

423件の閲覧回数
hotashu
Contributor III

Hello,

 

i have one TWR-S12G128 board.

with processor expert, I set bus clock as 10M. but in debugger, when i use FLASH command to check the bus frequency, it shows 11M. should i trim the frequceny? if yes how to?

ラベル(1)
0 件の賞賛
返信
1 返信

329件の閲覧回数
iggi
NXP Employee
NXP Employee

You can check the bus frequency value by measuring the signal on oscilloscope.

There is ECLK pin on S12(X) devices which can provide bus signal (on the S12G128, it is pin 25 (PB0) or connector J8 - pin1). To ensure that, put this code line into main function:

ECLKCTL_NECLK=0;

See ECLKCTL register description in the ref. manual.

If it is the same, i would rather recommend setting the bus freq manually. Here is attached the PLL calculator.

Execute the file and select S12P family (the CPMU module is the same as on S12G). Then select Oscillator = 8MHz and desired Bus Freq.

On the right side you'll see register settings.

The way how to initialize the System Clocks is described in the SW example project of the application note AN4455 MC9S12G128 Demonstration Lab Training:

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4455.pdf

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4455SW.zip

Regards,

Ivan

0 件の賞賛
返信