Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC

Ads

Discussion Groups

Discussion Groups | 68HC12 | HCS12 Interrupts

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

HCS12 Interrupts - tophongli - Apr 10 14:06:15 2007

Hello,

I am using IAR to develop a 9s12d64 based project. I am new to these
and am having problems with interrupts. .

In main program, I have the following init routine to turn realtime
interrupt on:
void rti_init (void)
{
RTICTL = 0x17; /* set RTI prescaler */
CRGINT = 0x80; /* Enable RTI interrupts */
}

In ISR, I have the following routine with a dead loop blinking the
LED.

#pragma vector = 0xFFF0
__interrupt void RTI_interrupt (void){
CRGFLG = 0x80; /* Clear Flag */
...
dead loop with LED blinking
...
}

For some reason, the program didn't go to ISR and I can see it still
running in main routine. I tried SCI interrupts and still nothing
happened.

Main routine:
__monitor void putch0 (char x)
{
SCI0CR2 |= 0x80; /* Enable SCI0 Interrupt */
SCI0CR2 |= 0x40 /* Added this one still no use */
}

ISR:
#pragma vector = 0xFFD6
__interrupt void SCI0_interrupt (void)
{
dead loop with LED blinking
}

When I add "__enable_interrupt();" in main routine, the program no
longer running in main routine. It goes to somewhere but still not in
my three interrupt service routines (RTI, SCI0, SCI1). Maybe it goes
to some other higher priority ones? I didn't set any priorities and
no any other service routines. Where it can go? I must have missed
something here. Anyone can help? Thanks a lot.

Best regards,
Hong



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )