2021-03-31 07:01:48 +02:00
|
|
|
/****************************************************************************
|
2011-02-13 21:00:48 +01:00
|
|
|
* arch/hc/include/m9s12/irq.h
|
2009-12-03 18:24:42 +01:00
|
|
|
*
|
2021-03-28 15:52:32 +02:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2009-12-03 18:24:42 +01:00
|
|
|
*
|
2021-03-28 15:52:32 +02:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2009-12-03 18:24:42 +01:00
|
|
|
*
|
2021-03-28 15:52:32 +02:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2009-12-03 18:24:42 +01:00
|
|
|
*
|
2021-03-31 07:01:48 +02:00
|
|
|
****************************************************************************/
|
2009-12-03 18:24:42 +01:00
|
|
|
|
2020-04-05 23:00:04 +02:00
|
|
|
/* This file should never be included directly but, rather,
|
2009-12-03 18:24:42 +01:00
|
|
|
* only indirectly through nuttx/irq.h
|
|
|
|
*/
|
|
|
|
|
2011-02-13 21:00:48 +01:00
|
|
|
#ifndef __ARCH_HC_INCLUDE_M9S12_IRQ_H
|
|
|
|
#define __ARCH_HC_INCLUDE_M9S12_IRQ_H
|
2009-12-03 18:24:42 +01:00
|
|
|
|
2021-03-31 07:01:48 +02:00
|
|
|
/****************************************************************************
|
2009-12-03 18:24:42 +01:00
|
|
|
* Included Files
|
2021-03-31 07:01:48 +02:00
|
|
|
****************************************************************************/
|
2009-12-03 18:24:42 +01:00
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
#include <nuttx/irq.h>
|
|
|
|
|
2021-03-31 07:01:48 +02:00
|
|
|
/****************************************************************************
|
2015-04-08 16:04:12 +02:00
|
|
|
* Pre-processor Definitions
|
2021-03-31 07:01:48 +02:00
|
|
|
****************************************************************************/
|
2009-12-03 18:24:42 +01:00
|
|
|
|
|
|
|
/* IRQ Numbers */
|
|
|
|
|
2009-12-11 16:29:11 +01:00
|
|
|
#define HCS12_IRQ_VRESET 0 /* fffe: External reset, power on reset orlow voltage reset */
|
|
|
|
#define HCS12_IRQ_VCLKMON 1 /* fffc: Clock monitor fail reset */
|
|
|
|
#define HCS12_IRQ_VCOP 2 /* fffa: COP failure reset*/
|
|
|
|
#define HCS12_IRQ_VTRAP 3 /* fff8: Unimplemented instruction trap */
|
|
|
|
#define HCS12_IRQ_VSWI 4 /* fff6: SWI */
|
|
|
|
#define HCS12_IRQ_VXIRQ 5 /* fff4: XIRQ */
|
|
|
|
#define HCS12_IRQ_VIRQ 6 /* fff2: IRQ */
|
|
|
|
#define HCS12_IRQ_VRTI 7 /* fff0: Real-time interrupt */
|
|
|
|
/* ffe8-ffef: Reserved */
|
|
|
|
#define HCS12_IRQ_VTIMCH4 8 /* ffe6: Standard timer channel 4 */
|
|
|
|
#define HCS12_IRQ_VTIMCH5 9 /* ffe4: Standard timer channel 5 */
|
|
|
|
#define HCS12_IRQ_VTIMCH6 10 /* ffe2: Standard timer channel 6 */
|
|
|
|
#define HCS12_IRQ_VTIMCH7 11 /* ffe0: Standard timer channel 7 */
|
|
|
|
#define HCS12_IRQ_VTIMOVF 12 /* ffde: Standard timer overflow */
|
|
|
|
#define HCS12_IRQ_VTIMPAOVF 13 /* ffdc: Pulse accumulator overflow */
|
|
|
|
#define HCS12_IRQ_VTIMPAIE 14 /* ffda: Pulse accumulator input edge */
|
|
|
|
#define HCS12_IRQ_VSPI 15 /* ffd8: SPI */
|
|
|
|
#define HCS12_IRQ_VSCI0 16 /* ffd6: SCI0 */
|
|
|
|
#define HCS12_IRQ_VSCI1 17 /* ffd4: SCI1 */
|
|
|
|
#define HCS12_IRQ_VATD 18 /* ffd2: ATD */
|
|
|
|
/* ffd0: Reserved */
|
|
|
|
#define HCS12_IRQ_VPORTJ 19 /* ffce: Port J */
|
|
|
|
#define HCS12_IRQ_VPORTH 20 /* ffcc: Port H */
|
|
|
|
#define HCS12_IRQ_VPORTG 21 /* ffca: Port G */
|
|
|
|
/* ffc8: Reserved */
|
|
|
|
#define HCS12_IRQ_VCRGPLLLCK 22 /* ffc6: CRG PLL lock */
|
|
|
|
#define HCS12_IRQ_VCRGSCM 23 /* ffc4: CRG self clock mode */
|
|
|
|
/* ffc2: Reserved */
|
|
|
|
#define HCS12_IRQ_VIIC 24 /* ffc0: IIC bus */
|
|
|
|
/* ffba-ffbf: Reserved */
|
|
|
|
#define HCS12_IRQ_VFLASH 25 /* ffb8: FLASH */
|
|
|
|
#define HCS12_IRQ_VEPHY 26 /* ffb6: EPHY interrupt */
|
|
|
|
#define HCS12_IRQ_VEMACCRXBAC 27 /* ffb4: EMAC receive buffer A complete */
|
|
|
|
#define HCS12_IRQ_VEMACCRXBBC 28 /* ffb2: EMAC receive buffer B complete */
|
|
|
|
#define HCS12_IRQ_VEMACTXC 29 /* ffb0: EMAC frame transmission complete */
|
|
|
|
#define HCS12_IRQ_VEMACRXFC 30 /* ffae: EMAC receive flow control */
|
|
|
|
#define HCS12_IRQ_VEMACMII 31 /* ffac: EMAC MII management transfer complete */
|
|
|
|
#define HCS12_IRQ_VEMACRXERR 32 /* ffaa: EMAC receive error */
|
|
|
|
#define HCS12_IRQ_VEMACRXBAO 33 /* ffa8: EMAC receive buffer A overrun */
|
|
|
|
#define HCS12_IRQ_VEMACRXBBO 34 /* ffa6: EMAC receive buffer B overrun */
|
|
|
|
#define HCS12_IRQ_VEMACBRXERR 35 /* ffa4: EMAC babbling receive error */
|
|
|
|
#define HCS12_IRQ_VEMACLC 36 /* ffa2: EMAC late collision */
|
|
|
|
#define HCS12_IRQ_VEMACEC 37 /* ffa0: EMAC excessive collision */
|
|
|
|
/* ff80-ff9f: Reserved */
|
2011-02-26 17:55:39 +01:00
|
|
|
#define HCS12_IRQ_NVECTORS 38
|
|
|
|
|
2021-03-31 07:01:48 +02:00
|
|
|
/* GPIO interrupts.
|
|
|
|
* The m9s12x supports several interrupts on PIM ports G, H,
|
2011-02-26 17:55:39 +01:00
|
|
|
* and J. We go through some special efforts to keep the number of IRQs
|
|
|
|
* to a minimum in this sparse interrupt case.
|
|
|
|
*
|
|
|
|
* Port G: Pins 0-7
|
|
|
|
* Port H: Pins 0-6
|
|
|
|
* Port J: Pins 0-3 and 6-7
|
|
|
|
*/
|
|
|
|
|
2016-07-22 23:01:00 +02:00
|
|
|
#ifdef CONFIG_HCS12_GPIOIRQ
|
2011-02-26 17:55:39 +01:00
|
|
|
|
|
|
|
/* To conserve space, interrupts must also be configured, port by port */
|
|
|
|
|
|
|
|
# define HCC12_IRQ_PGFIRST HCS12_IRQ_NVECTORS
|
|
|
|
# ifdef CONFIG_HCS12_PORTG_INTS
|
|
|
|
# define HCS12_IRQ_PGSET 0xff
|
|
|
|
# define HCS12_IRQ_PG0 (HCC12_IRQ_PGFIRST+0)
|
|
|
|
# define HCS12_IRQ_PG1 (HCC12_IRQ_PGFIRST+1)
|
|
|
|
# define HCS12_IRQ_PG2 (HCC12_IRQ_PGFIRST+2)
|
|
|
|
# define HCS12_IRQ_PG3 (HCC12_IRQ_PGFIRST+3)
|
|
|
|
# define HCS12_IRQ_PG4 (HCC12_IRQ_PGFIRST+4)
|
|
|
|
# define HCS12_IRQ_PG5 (HCC12_IRQ_PGFIRST+5)
|
|
|
|
# define HCS12_IRQ_PG6 (HCC12_IRQ_PGFIRST+6)
|
|
|
|
# define HCS12_IRQ_PG7 (HCC12_IRQ_PGFIRST+7)
|
|
|
|
# define HCC12_IRQ_PHFIRST (HCC12_IRQ_PGFIRST+8)
|
|
|
|
# else
|
|
|
|
# define HCC12_IRQ_PHFIRST HCC12_IRQ_PGFIRST
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifdef CONFIG_HCS12_PORTH_INTS
|
|
|
|
# define HCS12_IRQ_PHSET 0x7f
|
|
|
|
# define HCS12_IRQ_PH0 (HCC12_IRQ_PHFIRST+0)
|
|
|
|
# define HCS12_IRQ_PH1 (HCC12_IRQ_PHFIRST+1)
|
|
|
|
# define HCS12_IRQ_PH2 (HCC12_IRQ_PHFIRST+2)
|
|
|
|
# define HCS12_IRQ_PH3 (HCC12_IRQ_PHFIRST+3)
|
|
|
|
# define HCS12_IRQ_PH4 (HCC12_IRQ_PHFIRST+4)
|
|
|
|
# define HCS12_IRQ_PH5 (HCC12_IRQ_PHFIRST+5)
|
|
|
|
# define HCS12_IRQ_PH6 (HCC12_IRQ_PHFIRST+6)
|
|
|
|
# define HCC12_IRQ_PJFIRST (HCC12_IRQ_PHFIRST+7)
|
|
|
|
# else
|
|
|
|
# define HCC12_IRQ_PJFIRST HCC12_IRQ_PHFIRST
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifdef CONFIG_HCS12_PORTJ_INTS
|
|
|
|
# define HCS12_IRQ_PJSET 0xcf
|
|
|
|
# define HCS12_IRQ_PJ0 (HCC12_IRQ_PJFIRST+0)
|
|
|
|
# define HCS12_IRQ_PJ1 (HCC12_IRQ_PJFIRST+1)
|
|
|
|
# define HCS12_IRQ_PJ2 (HCC12_IRQ_PJFIRST+2)
|
|
|
|
# define HCS12_IRQ_PJ3 (HCC12_IRQ_PJFIRST+3)
|
|
|
|
# define HCS12_IRQ_PJ6 (HCC12_IRQ_PJFIRST+4)
|
|
|
|
# define HCS12_IRQ_PJ7 (HCC12_IRQ_PJFIRST+5)
|
|
|
|
# define HCS12_IRQ_NIRQS (HCC12_IRQ_PJFIRST+6)
|
|
|
|
# else
|
|
|
|
# define HCS12_IRQ_NIRQS HCC12_IRQ_PJFIRST
|
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# define HCS12_IRQ_NIRQS HCS12_IRQ_NVECTORS
|
2016-07-22 23:01:00 +02:00
|
|
|
#endif /* CONFIG_HCS12_GPIOIRQ */
|
2011-02-26 17:55:39 +01:00
|
|
|
|
|
|
|
#define HCS12_IRQ_VILLEGAL HCS12_IRQ_NIRQS /* Any reserved vector */
|
|
|
|
#define NR_IRQS (HCS12_IRQ_NIRQS+1)
|
2009-12-03 18:24:42 +01:00
|
|
|
|
2021-03-31 07:01:48 +02:00
|
|
|
/****************************************************************************
|
2009-12-03 18:24:42 +01:00
|
|
|
* Public Types
|
2021-03-31 07:01:48 +02:00
|
|
|
****************************************************************************/
|
2009-12-03 18:24:42 +01:00
|
|
|
|
2021-03-31 07:01:48 +02:00
|
|
|
/****************************************************************************
|
2009-12-03 18:24:42 +01:00
|
|
|
* Public Data
|
2021-03-31 07:01:48 +02:00
|
|
|
****************************************************************************/
|
2009-12-03 18:24:42 +01:00
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#define EXTERN extern "C"
|
2015-06-13 03:26:01 +02:00
|
|
|
extern "C"
|
|
|
|
{
|
2009-12-03 18:24:42 +01:00
|
|
|
#else
|
|
|
|
#define EXTERN extern
|
|
|
|
#endif
|
|
|
|
|
2021-03-31 07:01:48 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Functions Prototypes
|
|
|
|
****************************************************************************/
|
2009-12-03 18:24:42 +01:00
|
|
|
|
|
|
|
#undef EXTERN
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2011-02-13 21:00:48 +01:00
|
|
|
#endif /* __ARCH_HC_INCLUDE_M9S12_IRQ_H */
|