Fujitsu ALL Series Application Note
Fujitsu ALL Series Application Note

Fujitsu ALL Series Application Note

16-bit microcontroller

Advertisement

Quick Links

Fujitsu Microelectronics Europe
MCU-AN -300203-E-V17
Application Note
F²MC-16FX FAMILY
16-BIT MICROCONTROLLER
ALL SERIES
EXTERNAL INTERRUPTS
APPLICATION NOTE

Advertisement

Table of Contents
loading

Summary of Contents for Fujitsu ALL Series

  • Page 1 Fujitsu Microelectronics Europe MCU-AN -300203-E-V17 Application Note F²MC-16FX FAMILY 16-BIT MICROCONTROLLER ALL SERIES EXTERNAL INTERRUPTS APPLICATION NOTE...
  • Page 2: Revision History

    V1.5, Fixed typos, added flowchart and modified code for disturbed signal, 2007-08-28 V1.6, Updated key features and added external interrupt timing, MPi 2008-06-24 V1.7; add information on Port Input Enable; PHu This document contains 20 pages. MCU-AN -300203-E-V17 - 2 - © Fujitsu Microelectronics Europe GmbH...
  • Page 3: Warranty And Disclaimer

    Product or parts thereof, if the Product is returned to Fujitsu Microelectronics Europe GmbH in original packing and without further defects resulting from the customer’s use or the transport.
  • Page 4: Table Of Contents

    External Interrupts and Wake Up from Stop Mode..........14 4.3.1 Example I ....................14 4.3.2 Example II....................17 5 ADDITIONAL INFORMATION ..................18 LIST OF FIGURES ......................19 LIST OF TABLES....................... 20 MCU-AN -300203-E-V17 - 4 - © Fujitsu Microelectronics Europe GmbH...
  • Page 5: Introduction

    Level sensitivity - low and high selectable • ISR execution is started in 200 ns + minimum 10 CPU cycles after first rising / falling edge at external interrupt pin © Fujitsu Microelectronics Europe GmbH - 5 - MCU-AN -300203-E-V17...
  • Page 6: External Interrupts

    Here the INTn needs to be configured to detect a falling edge. INTn Figure 2-2: External Interrupts Connection Diagram MCU-AN -300203-E-V17 - 6 - © Fujitsu Microelectronics Europe GmbH...
  • Page 7: Register

    External Interrupt 0 shall be used. This is shown as INT0 in pin assignment. On MB96340 series, this function shares pin P07_0. Hence, this pin must be enabled for input: PIER07_IE0 = 1; © Fujitsu Microelectronics Europe GmbH - 7 - MCU-AN -300203-E-V17...
  • Page 8: External Interrupt Timing

    Time required for the context saving is dependent on various factors. Those are described in section 2.4.1 of Interrupts application note MCU-AN-300210. The above mentioned time of 10 cycles is the minimum timing required for context saving. MCU-AN -300203-E-V17 - 8 - © Fujitsu Microelectronics Europe GmbH...
  • Page 9: External Interrupt Examples

    The following example shows how to set up the External Interrupt Channel 0 of the MB96340 Series. /* 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.
  • Page 10: Disturbed Signals

    (i.e. if EPSR07_PS0 =1). It should be noted that the above mentioned logic would work properly only when the key bounces a few times before settling at a position after a key press. MCU-AN -300203-E-V17 - 10 - © Fujitsu Microelectronics Europe GmbH...
  • Page 11: Sequence Diagram

    Valid key press if key is still pressed (i.e. if EPSR07_PS0 =1) after Waiting for debounce delay Switch back External from ISR interrupt Figure 4-2: Sequence Diagram – Disturbed Input Signal © Fujitsu Microelectronics Europe GmbH - 11 - MCU-AN -300203-E-V17...
  • Page 12 EXTERNAL INTERRUPTS Chapter 4 External Interrupt Examples /* 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. (C) Fujitsu Microelectronics Europe GmbH...
  • Page 13 Please note, that the ISRs for the External Interrupts and the Reload Timer also has to be defined in vectors.c. /* 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.
  • Page 14: External Interrupts And Dma

    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.
  • Page 15 // clear ext. int 0 request flag ENIR0_EN0 = 1; // enable ext. int0 EIRR0_ER1 = 0; // clear ext. int 1 request flag ENIR0_EN1 = 0; // disable ext. int1 © Fujitsu Microelectronics Europe GmbH - 15 - MCU-AN -300203-E-V17...
  • Page 16 Please note, that the corresponding interrupt vector and level has to be defined in the vectors.c module of our standard template project. /* 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.
  • Page 17: Example Ii

    There is no need to have an interrupt service routine in this case. /* 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.
  • Page 18: Additional Information

    EXTERNAL INTERRUPTS Chapter 5 Additional Information 5 Additional Information Information about FUJITSU Microcontrollers can be found on the following Internet page: http://mcu.emea.fujitsu.com/ The software examples related to this application note is: 96340_irq_ext 96340_irq_ext_stop_wakeup It can be found on the following Internet page: http://mcu.emea.fujitsu.com/mcu_product/mcu_all_software.htm...
  • Page 19: List Of Figures

    Figure 2-2: External Interrupts Connection Diagram .............. 6 Figure 3-1: External Interrupt Timing..................8 Figure 4-1: Interrupt Timing – Disturbed Input Signal ............10 Figure 4-2: Sequence Diagram – Disturbed Input Signal............11 © Fujitsu Microelectronics Europe GmbH - 19 - MCU-AN -300203-E-V17...
  • Page 20: List Of Tables

    EXTERNAL INTERRUPTS List of Tables List of Tables Table 2-1: ELVR ........................7 MCU-AN -300203-E-V17 - 20 - © Fujitsu Microelectronics Europe GmbH...

This manual is also suitable for:

F2mc-16fx family

Table of Contents