MCF5234 PIT Problem

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

MCF5234 PIT Problem

1,740 Views
sirlenzelot
Contributor II
Hello,
 
I try to get PIT0 running. Everything works fine so far. As PIT Counter reaches 0 my ISR is called. Bus as it is leaved, I get Interrupt 2 (Access Error).
 
Do I need to do anything else but set PSCR.PIF = 1 in my ISR in order to reset the PIT Interrupt?
 
PIT0 Setup and ISR:
Code:
PMR.OVW = 1;
PMR.PM = 0x8F0D;PCSR.PRE = 0xB;PCSR.PIE = 1;PCSR.DBG = 1;PCSR.RLD = 1;PCSR.EN = 1;void PIT0_isr(void){     PIT0.PCSR.B.PIF = 1;}

 
Did someone have a similar problem and solved it?
 
Thanks for your help.
 
best regards (vy73)
 
Sir Lenzelot
Labels (1)
0 Kudos
2 Replies

315 Views
stzari
Contributor III
Hi,

Don't you have to declare the handler as an interrupt function ?
(I haven't worked with CodeWarrior, so I can't tell you how to do this).

HTH
Stamatis
0 Kudos

315 Views
sirlenzelot
Contributor II
Hi Stamatis.
That was my mistake.
Thanks for opening my eyes.
 
Have a nice weekend.
 
best regards (vy73)
 
Sir Lenzelot
 

Message Edited by sir lenzelot on 2007-03-2302:14 PM

0 Kudos