Fujitsu 8FX MB2146-510-01-E Setup Manual page 22

8-bit microcontroller mb95560h/570h/580h series starter kit
Table of Contents

Advertisement

4.3.2 Startup.asm File
The Startup.asm is the MB95560H/570H/580H MCU initialization file including stack settings, reg-
ister bank settings and watchdog settings etc;
4.3.3 Vectors.c File.
The Vectors.c contains the MB95560H/570H/580H MCU Interrupt vectors definition.
User can pre-set all interrupt control registers in function InitIrqLevels(). It can be used to set all in-
terrupt priorities in static applications. For example, to set the external interrupt ch.0 to level 0,
change the following code:
ILR0 = 0xFF; // IRQ0: external interrupt ch.0 | ch.4
To
ILR0 = 0xFC; // IRQ0: external interrupt ch.0 | ch.4
And declare the interrupt function as in Vectors.c below,
... ...
__interrupt void external_int00 (void);
... ...
#pragma intvect external_int00 0 // IRQ0: external interrupt ch.0 | ch.4
Then user can write his own interrupt sub-routine in Main.C shown as below.
/*--------------------- INTERRUPT SERVICE ROUTINE ---------------------------*/
__interrupt void external_int00 (void)
{
}
4.3.4 Main.c File
Main.c contains the user code.
18
// IRQ1: external interrupt ch.1
// IRQ2: external interrupt ch.2 | ch.6
// IRQ3: external interrupt ch.3 | ch.7
// IRQ1: external interrupt ch.1 | ch.5
// IRQ2: external interrupt ch.2 | ch.6
// IRQ3: external interrupt ch.3 | ch.7
//User code
|
ch.5

Advertisement

Table of Contents
loading

Table of Contents