System Timer Module activation on MPC564xB board

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

System Timer Module activation on MPC564xB board

跳至解决方案
1,674 次查看
skpavankumar
Contributor I

Hi Everybody,

 

I'm trying to activate the system timer module (STM) on a MPC564xB board and try to read it's value.

Does any one of you already have a working code, so that I can re-use the same?

 

Thanks!

Pavan

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
1,163 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

You are writing to the wrong bit positions. Use following...

STMCR = 0x00005001;

Regards,

Petr

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,163 次查看
skpavankumar
Contributor I

Hi Everybody,

I tried to enable the STM module, with a prescalar "0x50" using the below code, but the register value doesn't seem to change.

#define STMCR ( *(volatile unsigned long  *)  0xFFF3C000  );

STMCR = 0x80500000;

Can some one please help me out on this aspect?

Am I missing out on something here?

Is there a protection mechanism which is preventing me to write into this register?

Thanks.

Cheers,

Pavan

0 项奖励
回复
1,164 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

You are writing to the wrong bit positions. Use following...

STMCR = 0x00005001;

Regards,

Petr

0 项奖励
回复
1,163 次查看
skpavankumar
Contributor I

Hi Petr,

Thanks for pointing out the mistake! It now works :-)

Kind Regards,

Pavan

0 项奖励
回复