Vectors.c File; Main.c File - Fujitsu MB95200 Series Setup Manual

F2mc-8fx family 8-bit microcontroller easy kit
Hide thumbs Also See for MB95200 Series:
Table of Contents

Advertisement

4.3.3 Vectors.c File

The Vectors.c contains the MB95200 Series MCU Interrupt vector definition.
User can pre-set all interrupt control registers in function InitIrqLevels(). It can be used to set
all interrupt priorities in static applications. For example, to set the external interrupt ch.0 to
level 0, change the following code:
ILR0 = 0xFF;
To
ILR0 = 0xFC;
And declare the interrupt function as in Vectors.c below,
......
__interrupt void external_int00 (void);
......
#pragma intvect external_int00 0 // IRQ0: external interrupt ch0 | ch4
Then user can write his own interrupt sub-routine in Main.C shown as below.
/*--------------------- INTERRUPT SERVICE ROUTINE -------------------------
--*/
__interrupt void external_int00(void)
{
//User code
}

4.3.4 Main.c File

Main.c contains the user code.
Easy Kit FMCDC-MB95260H-EK-01 V1.2
Chapter 4 4BSample Code Manual
// IRQ0: external interrupt ch.0 | ch.4
// IRQ1: external interrupt ch.1 | ch.5
// IRQ2: external interrupt ch.2 | ch.6
// IRQ3: external interrupt ch.3 | ch.7
// IRQ0: external interrupt ch.0 | ch.4
// IRQ1: external interrupt ch.1 | ch.5
// IRQ2: external interrupt ch.2 | ch.6
// IRQ3: external interrupt ch.3 | ch.7
MCU-AN-500059-E-12 – Page 17

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fmcdc-mb95260h-ek-01

Table of Contents