External Interrupts And Dma; External Interrupts And Wake Up From Stop Mode; Example I - Fujitsu ALL Series Application Note

16-bit microcontroller
Table of Contents

Advertisement

4.2.2 External Interrupts and DMA

The user has to take special care when using DMA transfer triggered by an External
Interrupt pin connected to disturbed signal source (as explained before in the section 4.2).
During the bouncing time of the switch, multiple DMA transfers can happen which is not
desired. The DMA as such is not able to disable the interrupts during this bouncing time, so
the software debounce mechanism discussed in section 4.2 cannot be realized in this case.
Hence it is required to use the capacitor (hardware debounce) circuit as shown in Figure 2-2.
By using the same, the bouncing of the switch is eliminated at the hardware level itself and
the clean signal (without noise) would appear at the external interrupt pin.

4.3 External Interrupts and Wake Up from Stop Mode

4.3.1 Example I

The following example shows, that External Interrupts can be used to request a stop mode
and can wake up the MCU from this mode.
External Interrupt 0 is used to wake up the MCU and External Interrupt 1 is used to request a
stop mode. Before stop mode "0x0F" is written to Port00, during run mode this Port is
counting.
/* 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.
/*
/*---------------------------------------------------------------------------*/
// initialise external int 0
void
Init_extint0 (void)
{
ADER2_ADE16 = 0;
PIER07_IE0 = 1;
ENIR0_EN0 = 0;
ELVR0_LA0 = 1;
ELVR0_LB0 = 1;
}
// initialise external int 1
void
Init_extint1 (void)
{
ADER2_ADE17 = 0;
PIER07_IE1 = 1;
ENIR0_EN1 = 0;
ELVR0_LA1 = 1;
ELVR0_LB1 = 1;
}
MCU-AN -300203-E-V17
EXTERNAL INTERRUPTS
Chapter 4 External Interrupt Examples
(C) Fujitsu Microelectronics Europe GmbH
// select IO mode
// disable ext int 0
// LB0,LA0 = 11 -> falling edge
// select IO mode
// disable interrupt request
// LB1,LA1 = 11 -> falling edge
- 14 -
© Fujitsu Microelectronics Europe GmbH
*/
*/
P

Advertisement

Table of Contents
loading

This manual is also suitable for:

F2mc-16fx family

Table of Contents