Startup.asm File; Vectors.c File - Fujitsu MB95200H Series Setup Manual

Hide thumbs Also See for MB95200H Series:
Table of Contents

Advertisement

#define PDR0_P03 _pdr0.bit._P03
#define PDR0_P04 _pdr0.bit._P04
#define PDR0_P05 _pdr0.bit._P05
#define PDR0_P06 _pdr0.bit._P06
#define PDR0_P07 _pdr0.bit._P07
In MB95200H/210H.asm, PDR0 address 0x0000 is allocated to PDR0 as below.
__pdr0 .res.b 1
PDR0
.equ 0x0000

4.3.2 Startup.asm File

The Startup.asm is the MB95200H/210H MCU initialization file including stack settings,
register bank settings and watchdog settings etc;

4.3.3 Vectors.c File.

The Vectors.c contains the MB95200H/210H 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;
// 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
To
ILR0 = 0xFC;
// 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
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
}
Starter Kit MB2146-410-01-E Setup Guide V1.1
Chapter 4 Sample Code Manual
;000000 /* Port0 */
MCU-UM-500002-E-11 – Page 19

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb95210h seriesMb2146-410-01-e

Table of Contents