microcontroller MC9S08QG8: bus frequency of the MTIM module and TPM module

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

microcontroller MC9S08QG8: bus frequency of the MTIM module and TPM module

ソリューションへジャンプ
877件の閲覧回数
marmor
Contributor III

In the microcontroller MC9S08QG8 there are a timer module (MTIM) and a timer / PWM module (TPM). In both modules, you can select the clock source you want to use. I selected the bus clock.

When I opened processor expert to initialize both modules,I configured the clock source of both modules were the bus clock, so both modules should have the same frequency and therefore the same period. Processor expert indicates the period and in both modules is different. TPM period is 256 times greater than the MTIM period. All this happens with the same configuration of the system clock.

My question is: ¿ why does this happen? Someone knows what happen?

  I attached some pictures which shows what I mean.

 

 

En el microcontrolador MC9S08QG8 hay un módulo timer(MTIM) y un módulo timer/PWM(TPM). En a,bos módulos se puede seleccionar ala fuente de reloj que quieras usar. Yo seleccioné el reloj del bus. Cuando abrí Processor Expert para inicializar ambos módulos los configuré para que su fuente de reloj fuese la del bus, por lo que ambos módulos deberían tener la misma frecuencia y por ende el mismo periodo. En el Processor Expert te indican el periodo del reloj del módulo cuando seleccionas una fuente y los periodos de ambos módulos eran diferentes. El periodo del módulo TPM era 256 veces mayor que el de MTIM y nose por qué. Todo esto ocurre con la misma configuración de reloj del sistema. ¿Alguien sabe que puede ocurrir?

 

Adjunto unas fotos para mayor aclaración

10465_10465.pngCPU.png10472_10472.pngMTIM.png10473_10473.pngTPM.png

ラベル(1)
1 解決策
499件の閲覧回数
weapon
Senior Contributor I

Hi Maria,

the modulo register of MTIM is 8-bit,  but TPM's is 16-bit.  Modulo register value =  0 is equat to modulo value = 65535.

in your setting, MTIM, 0.125 * 256 = 32us, TPM: 0.125*65536 = 8.192ms.

Hope I clarify clearly.

B.R

Weiping

元の投稿で解決策を見る

3 返答(返信)
500件の閲覧回数
weapon
Senior Contributor I

Hi Maria,

the modulo register of MTIM is 8-bit,  but TPM's is 16-bit.  Modulo register value =  0 is equat to modulo value = 65535.

in your setting, MTIM, 0.125 * 256 = 32us, TPM: 0.125*65536 = 8.192ms.

Hope I clarify clearly.

B.R

Weiping

499件の閲覧回数
marmor
Contributor III

thank you very much.
I thought the indicated period was the time it took to make an account.

0 件の賞賛
499件の閲覧回数
Wlodek_D_
Senior Contributor II

Hello,

Thank you for your post, however please consider moving it to the right community place (e.g. 8-bit Microcontrollers or CodeWarrior Development Tools ) to get it visible for active members.

For details please see general advice Where to post a Discussion?

Thank you for using Freescale Community.

0 件の賞賛