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 | RTI interrupt doesn't work

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

RTI interrupt doesn't work - JCL - Jul 12 4:59:00 2005

Hi all,
I'm having a problem using RTI interrupt with my miniDragon board.
I'm using ICC12 as a compiler and the vectors file brought with the
compiler. I just want to toggle the PortP 0 bit at every RTI
interrupt and scan it with a scope and nothing appears.

Here is my code :

#include <mc9s12dp256.h>

#pragma interrupt_handler RTI_isr

// Fonctions prototypes
void initialize_ports(void);
void RTI_isr(void);
void initialize_RTI(void);

// Programme principal
void main(void)
{
initialize_RTI();
initialize_ports();
PTP = 0x01;
asm("cli");
while(1)
{
;
}
}

void initialize_ports(void)
{
DDRP = 0xff;
}

void RTI_isr(void)
{
CRGFLG = 0x80;
PTP = ~(PTP);
}

void initialize_RTI(void)
{
RTICTL = 0x73;
CRGINT = 0x80;
}

and the vectors file :

#pragma nonpaged_function _start

extern void _start(void); /* entry point in crt??.s */
extern void RTI_isr(void);

#define DUMMY_ENTRY (void (*)(void))0x3E7F

#pragma abs_address:0x3E00
/* the address is 0x3e00 because I'm using the board in EVB mode */

void (*interrupt_vectors[])(void) =
{
/* to cast a constant, say 0xb600, use
(void (*)())0xb600
*/
DUMMY_ENTRY, /*Reserved $FF80*/
DUMMY_ENTRY, /*Reserved $FF82*/
DUMMY_ENTRY, /*Reserved $FF84*/
DUMMY_ENTRY, /*Reserved $FF86*/
DUMMY_ENTRY, /*Reserved $FF88*/
DUMMY_ENTRY, /*Reserved $FF8A*/
DUMMY_ENTRY, /*PWM Emergency Shutdown*/
DUMMY_ENTRY, /*Port P Interrupt*/
DUMMY_ENTRY, /*MSCAN 4 Transmit*/
DUMMY_ENTRY, /*MSCAN 4 Receive*/
DUMMY_ENTRY, /*MSCAN 4 Error*/
DUMMY_ENTRY, /*MSCAN 4 Wake-up*/
DUMMY_ENTRY, /*MSCAN 3 Transmit*/
DUMMY_ENTRY, /*MSCAN 3 Receive*/
DUMMY_ENTRY, /*MSCAN 3 Error*/
DUMMY_ENTRY, /*MSCAN 3 Wake-up*/
DUMMY_ENTRY, /*MSCAN 2 Transmit*/
DUMMY_ENTRY, /*MSCAN 2 Receive*/
DUMMY_ENTRY, /*MSCAN 2 Error*/
DUMMY_ENTRY, /*MSCAN 2 Wake-up*/
DUMMY_ENTRY, /*MSCAN 1 Transmit*/
DUMMY_ENTRY, /*MSCAN 1 Receive*/
DUMMY_ENTRY, /*MSCAN 1 Error*/
DUMMY_ENTRY, /*MSCAN 1 Wake-up*/
DUMMY_ENTRY, /*MSCAN 0 Transmit*/
DUMMY_ENTRY, /*MSCAN 0 Receive*/
DUMMY_ENTRY, /*MSCAN 0 Error*/
DUMMY_ENTRY, /*MSCAN 0 Wake-up*/
DUMMY_ENTRY, /*Flash*/
DUMMY_ENTRY, /*EEPROM*/
DUMMY_ENTRY, /*SPI2*/
DUMMY_ENTRY, /*SPI1*/
DUMMY_ENTRY, /*IIC Bus*/
DUMMY_ENTRY, /*DLC*/
DUMMY_ENTRY, /*SCME*/
DUMMY_ENTRY, /*CRG Lock*/
DUMMY_ENTRY, /*Pulse Accumulator B Overflow*/
DUMMY_ENTRY, /*Modulus Down Counter Underflow*/
DUMMY_ENTRY, /*Port H Interrupt*/
DUMMY_ENTRY, /*Port J Interrupt*/
DUMMY_ENTRY, /*ATD1*/
DUMMY_ENTRY, /*ATD0*/
DUMMY_ENTRY, /*SCI1*/
DUMMY_ENTRY, /*SCI0*/
DUMMY_ENTRY, /*SPI0*/
DUMMY_ENTRY, /*Pulse Accumulator A Input Edge*/
DUMMY_ENTRY, /*Pulse Accumulator A Overflow*/
DUMMY_ENTRY, /*Timer Overflow*/
DUMMY_ENTRY, /*Timer Channel 7*/
DUMMY_ENTRY, /*Timer Channel 6*/
DUMMY_ENTRY, /*Timer Channel 5*/
DUMMY_ENTRY, /*Timer Channel 4*/
DUMMY_ENTRY, /*Timer Channel 3*/
DUMMY_ENTRY, /*Timer Channel 2*/
DUMMY_ENTRY, /*Timer Channel 1*/
DUMMY_ENTRY, /*Timer Channel 0*/
RTI_isr, /*Real Time Interrupt*/
DUMMY_ENTRY, /*IRQ*/
DUMMY_ENTRY, /*XIRQ*/
DUMMY_ENTRY, /*SWI*/
DUMMY_ENTRY, /*Unimplement Intruction Trap*/
DUMMY_ENTRY, /*COP failure reset*/
DUMMY_ENTRY, /*Clock monitor fail reset*/
_start, /*Reset*/
};
#pragma end_abs_address

Any idea why this doesn't work
Thanks a lot

Jean Claude




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


Re: RTI interrupt doesn't work - zeta_alpha2002 - Jul 12 8:47:00 2005

> I'm having a problem using RTI interrupt with my miniDragon board.
> I'm using ICC12 as a compiler and the vectors file brought with the
> compiler. I just want to toggle the PortP 0 bit at every RTI
> interrupt and scan it with a scope and nothing appears.

I wrote this doc, see if doc link below will help. Copy the entire
link string into your browser

<http://support.technologicalarts.ca/docs/Adapt9S12DP/Application%20Notes/How%20to%20use%20ICC12%20with%20Adapt9S12DP256%20and%20FLASH%20Loader.pdf





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

Re: RTI interrupt doesn't work - JCL - Jul 12 10:45:00 2005

Hello zeta_alpha2002,

Thank you. Great doc and very clear. It helps a lot
I just have to adapt the address to my miniDragon board.

Regards
Jean Claude

--- In 68HC12@68HC..., "zeta_alpha2002" <zeta_alpha2002@y...>
wrote:
> > I'm having a problem using RTI interrupt with my miniDragon board.
> > I'm using ICC12 as a compiler and the vectors file brought with the
> > compiler. I just want to toggle the PortP 0 bit at every RTI
> > interrupt and scan it with a scope and nothing appears.
>
> I wrote this doc, see if doc link below will help. Copy the entire
> link string into your browser
>
> <http://support.technologicalarts.ca/docs/Adapt9S12DP/Application%
20Notes/How%20to%20use%20ICC12%20with%20Adapt9S12DP256%20and%20FLASH%
20Loader.pdf




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