Fujitsu MB91460 SERIES Nota aplikacyjna - Strona 15

Przeglądaj online lub pobierz pdf Nota aplikacyjna dla Płyta główna Fujitsu MB91460 SERIES. Fujitsu MB91460 SERIES 26 stron. 32-bit microcontroller
Również dla Fujitsu MB91460 SERIES: Podręcznik użytkownika (45 strony), Pierwsze kroki (41 strony), Nota aplikacyjna (23 strony), Nota aplikacyjna (29 strony), Nota aplikacyjna (29 strony)

Fujitsu MB91460 SERIES Nota aplikacyjna

3 Interrupt Recommendations and Examples

RECOMMENDATIONS AND EXAMPLES FOR THE INTERRUPT USAGE

3.1 Interrupt Vector Definition

By using the
#pragma
to use our standard template project, which contains a file called vectors.c which performs all
interrupt settings. The user may use or copy and modify this file for own projects.
Please make sure to always define the complete interrupt vector table in just one C module
and do not split it.
/* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */
/* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */
/* ELIGIBILITY FOR ANY PURPOSES.
/*
/*---------------------------------------------------------------------------*/
#pragma
intvect DefaultIRQHandler 15
#pragma
intvect My_IRQHandler_1
#pragma
intvect DefaultIRQHandler
#pragma
intvect My_IRQHandler_2
#pragma
intvect My_IRQHandler_3
#pragma
intvect DefaultIRQHandler
#pragma
intvect DefaultIRQHandler
#pragma
intvect My_IRQHandler_4
#pragma
intvect My_IRQHandler_5
#pragma
intvect My_IRQHandler_6
#pragma
intvect DefaultIRQHandler
. . .
Please note, that if the Interrupt service functions are located in a different C module, their
prototypes have to be defined also for the vector definition.

3.2 Setting an Interrupt Level

The following code snippet assigns the level 24 to reload timer 0 and 1.
/* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */
/* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */
/* ELIGIBILITY FOR ANY PURPOSES.
/*
/*---------------------------------------------------------------------------*/
void
InitIrqLevels(void)
{
. . .
ICR08 = 24;
. . .
. . .
}
© Fujitsu Microelectronics Europe GmbH
INTERRUPTS
Chapter 3 Interrupt Recommendations and Examples
intvect directive, an interrupt vector is defined. It is recommended
(C) Fujitsu Microelectronics Europe GmbH
16
17
18
19
20
21
22
23
24
25
(C) Fujitsu Microelectronics Europe GmbH
/* Reload Timer 0
/* Reload Timer 1
/* Non Maskable Interrupt
/* External Interrupt 0
/* External Interrupt 1
/* External Interrupt 2
/* External Interrupt 3
/* External Interrupt 4
/* External Interrupt 5
/* External Interrupt 6
/* External Interrupt 7
/* External Interrupt 8
/* External Interrupt 9
*/
*/
- 15 -
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
MCU-AN-300055-E-V10