Modulo Timer (S08MTIMV1) does not work in MC9S08SG4

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Modulo Timer (S08MTIMV1) does not work in MC9S08SG4

670 Views
tejaskamod
Contributor I

I am having issues with modulo timer in my SG4. The counter does not count. The issue is with RTC module.

 

MTIMCLK_CLKS = 0;

 

  MTIMCLK_PS = 0;

  MTIMSC_TOIE = 0;

  MTIMMOD = 0xFF;

  MTIMSC_TRST = 1;

MTIMSC_TSTP = 0;

Labels (1)
0 Kudos
2 Replies

472 Views
Rick_Li
NXP Employee
NXP Employee

Hi Tejas Kamod,

I tried your MTIM configuration on my side and the counter works, it runs as expect.

According your configuration, the CLOCK source is BUS clock.

And the RTC can not be used as MTIM clock source.So, I don't exactly know what "The issue is with RTC module" means.

0 Kudos

472 Views
tejaskamod
Contributor I

Hello,

Thanks for the reply,

I can see the counter is ticking in full chip simulation mode, but when I try to debug the code with USB multilink is always remains ZERO.

All the MTIM register are showing value of 0x00.

I tried to use RTC and can see same issue, all the RTC register values remains ZERO.

All other peripherals including TPM are working perfect on target.

0 Kudos