2021-03-31 07:01:48 +02:00
|
|
|
/****************************************************************************
|
2021-03-08 22:39:04 +01:00
|
|
|
* arch/hc/src/m9s12/m9s12_int.h
|
2010-10-24 16:50:12 +02: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
|
2010-10-24 16:50:12 +02:00
|
|
|
*
|
2021-03-28 15:52:32 +02:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2010-10-24 16:50:12 +02: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.
|
2010-10-24 16:50:12 +02:00
|
|
|
*
|
2021-03-31 07:01:48 +02:00
|
|
|
****************************************************************************/
|
2010-10-24 16:50:12 +02:00
|
|
|
|
2022-01-15 03:44:35 +01:00
|
|
|
#ifndef __ARCH_HC_SRC_M9S12_M9S12_INT_H
|
|
|
|
#define __ARCH_HC_SRC_M9S12_M9S12_INT_H
|
2010-10-24 16:50:12 +02:00
|
|
|
|
2021-03-31 07:01:48 +02:00
|
|
|
/****************************************************************************
|
2010-10-24 16:50:12 +02:00
|
|
|
* Included Files
|
2021-03-31 07:01:48 +02:00
|
|
|
****************************************************************************/
|
2010-10-24 16:50:12 +02:00
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
#include "chip.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
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/* Register Offsets *********************************************************/
|
2010-10-24 16:50:12 +02:00
|
|
|
|
2010-10-28 03:33:47 +02:00
|
|
|
/* Offsets relative to CORE1 */
|
2010-10-24 16:50:12 +02:00
|
|
|
|
|
|
|
#define HCS12_INT_ITCR_OFFSET 0x0015 /* Interrupt Test Control Register */
|
|
|
|
#define HCS12_INT_ITEST_OFFSET 0x0016 /* Interrupt Test Registers */
|
2010-10-28 03:33:47 +02:00
|
|
|
|
|
|
|
/* Offsets relative to CORE2 */
|
|
|
|
|
|
|
|
#define HCS12_INT_HPRIO_OFFSET 0x0003 /* Highest Priority Interrupt */
|
2010-10-24 16:50:12 +02:00
|
|
|
|
2021-03-31 07:01:48 +02:00
|
|
|
/* Register Addresses *******************************************************/
|
2010-10-24 16:50:12 +02:00
|
|
|
|
2010-10-28 03:33:47 +02:00
|
|
|
#define HCS12_INT_ITCR (HCS12_REG_BASE+HCS12_CORE1_BASE+HCS12_INT_ITCR_OFFSET)
|
|
|
|
#define HCS12_INT_ITEST (HCS12_REG_BASE+HCS12_CORE1_BASE+HCS12_INT_ITEST_OFFSET)
|
|
|
|
#define HCS12_INT_HPRIO (HCS12_REG_BASE+HCS12_CORE2_BASE+HCS12_INT_HPRIO_OFFSET)
|
2010-10-24 16:50:12 +02:00
|
|
|
|
2021-03-31 07:01:48 +02:00
|
|
|
/* Register Bit-Field Definitions *******************************************/
|
2010-10-24 16:50:12 +02:00
|
|
|
|
2010-10-25 16:58:37 +02:00
|
|
|
/* Interrupt Test Control Register Bit-Field Definitions */
|
2010-10-24 16:50:12 +02:00
|
|
|
|
|
|
|
#define INT_ITCR_ADR_SHIFT (0) /* Bits 0-3: Test register select */
|
|
|
|
#define INT_ITCR_ADR_MASK (15 << INT_ITCR_ADR_SHIFT)
|
|
|
|
#define INT_ITCR_WRTINT (1 << 4) /* Bit 4: Write to the Interrupt Test Registers */
|
|
|
|
|
|
|
|
/* Interrupt Test Registers Bit-Field Definitions */
|
|
|
|
|
|
|
|
#define INT_ITEST_INT(n) (1 << ((n) >> 1))
|
|
|
|
#define INT_ITEST_INT0 (1 << 0) /* Bit 0: Test vector 0xffx0 */
|
|
|
|
#define INT_ITEST_INT2 (1 << 1) /* Bit 1: Test vector 0xffx2 */
|
|
|
|
#define INT_ITEST_INT4 (1 << 2) /* Bit 2: Test vector 0xffx4 */
|
|
|
|
#define INT_ITEST_INT6 (1 << 3) /* Bit 3: Test vector 0xffx6 */
|
|
|
|
#define INT_ITEST_INT8 (1 << 4) /* Bit 4: Test vector 0xffx8 */
|
|
|
|
#define INT_ITEST_INTA (1 << 5) /* Bit 5: Test vector 0xffxa */
|
|
|
|
#define INT_ITEST_INTC (1 << 6) /* Bit 6: Test vector 0xffxc */
|
|
|
|
#define INT_ITEST_INTE (1 << 7) /* Bit 7: Test vector 0xffxe */
|
|
|
|
|
|
|
|
/* Highest Priority Interrupt Bit-Field Definitions */
|
2021-03-31 07:01:48 +02:00
|
|
|
|
2010-10-24 16:50:12 +02:00
|
|
|
/* Holds the least of the highest priority interrupt vector address */
|
|
|
|
|
|
|
|
#define INT_HPRIO_MASK (0xfe)
|
|
|
|
|
2021-03-31 07:01:48 +02:00
|
|
|
/****************************************************************************
|
2010-10-24 16:50:12 +02:00
|
|
|
* Public Types
|
2021-03-31 07:01:48 +02:00
|
|
|
****************************************************************************/
|
2010-10-24 16:50:12 +02:00
|
|
|
|
2021-03-31 07:01:48 +02:00
|
|
|
/****************************************************************************
|
2010-10-24 16:50:12 +02:00
|
|
|
* Public Data
|
2021-03-31 07:01:48 +02:00
|
|
|
****************************************************************************/
|
2010-10-24 16:50:12 +02:00
|
|
|
|
2021-03-31 07:01:48 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Functions Prototypes
|
|
|
|
****************************************************************************/
|
2010-10-24 16:50:12 +02:00
|
|
|
|
2022-01-15 03:44:35 +01:00
|
|
|
#endif /* __ARCH_HC_SRC_M9S12_M9S12_INT_H */
|