MCF5485 : slice timers

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

MCF5485 : slice timers

1,302 Views
ericp
Contributor I
Hi,
 
 I am working with Coldfire 5485 and I want to use SLT0 slice timer in Interrupt Enable Mode.
But I never run the handler of the interrupt when SCNT0 reaches 0 ...
Here is my code for the initialization of the timer:
     // Interrupt source 53 
     vi_counterTimerTest   = 0;
     MCF_INTC_ICR53        = MCF_INTC_ICRn_IL(2) | MCF_INTC_ICRn_IP(7);
     MCF_INTC_IMRH        &= ~MCF_INTC_IMRH_INT_MASK53;
     MCF_SLT_SLTCNT0       = 0xFFFFFFFF;
     MCF_SLT_SCNT0         = 0xFFFFFFFF;
     MCF_SLT_SCR0          = MCF_SLT_SCR_IEN | MCF_SLT_SCR_TEN | MCF_SLT_SCR_RUN;
 
More precisions :
  • I put the IT Handler in my vector table, for the number 117 (0x75)
  • I've corrected the file mcf548x_slt.h (offset for some registers) 
  • I've writen 0x2000 in SR in order to unmask all ITs

Thanks for your help...

 


Message Edited by ericp on 2007-08-29 08:39 AM
Labels (1)
0 Kudos
2 Replies

406 Views
ericp
Contributor I
Hi,
Thanks for your answer, I saw my mistake yesterday and  now it's OK.
bye.
 
0 Kudos

406 Views
SiE
Contributor I
Hi,
if you want to use the slicetimer 0 you have to use the source 54 not 53. For example MCF_INTC_IMRH_INT_MASK54 instead of MCF_INTC_IMRH_INT_MASK53. If you want to you the source 53 you can use the slicetimer 1.
You can find this information also in the datasheet on page 339.
 
 
 
 
0 Kudos