1 /** 2 * 3 * Copyright (c) 2019 Microchip Technology Inc. and its subsidiaries. 4 * 5 * \asf_license_start 6 * 7 * \page License 8 * 9 * SPDX-License-Identifier: Apache-2.0 10 * 11 * Licensed under the Apache License, Version 2.0 (the "License"); you may 12 * not use this file except in compliance with the License. 13 * You may obtain a copy of the Licence at 14 * 15 * http://www.apache.org/licenses/LICENSE-2.0 16 * 17 * Unless required by applicable law or agreed to in writing, software 18 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 19 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 * See the License for the specific language governing permissions and 21 * limitations under the License. 22 * 23 * \asf_license_stop 24 * 25 */ 26 27 /** @file prochot.h 28 *MEC1501 Processor temperature control registers 29 */ 30 /** @defgroup MEC1501 Peripherals PROCHOT 31 */ 32 33 #ifndef _PROCHOT_H 34 #define _PROCHOT_H 35 36 #include <stdint.h> 37 #include <stddef.h> 38 39 #include "regaccess.h" 40 41 /* =========================================================================*/ 42 /* ================ PROCHOT =========== */ 43 /* =========================================================================*/ 44 45 #define MCHP_PROCHOT_BASE_ADDR 0x40003400u 46 47 /* 48 * PROCHOT interrupt signal: 49 */ 50 #define MCHP_PROCHOT_GIRQ 17u 51 52 /* Bit position in GIRQ Source, Enable-Set/Clr, and Result registers */ 53 #define MCHP_PROCHOT_GIRQ_POS 17 54 55 #define MCHP_PROCHOT_GIRQ_VAL (1u << MCHP_PROCHOT_GIRQ_POS) 56 57 /* PROCHOT GIRQ aggregated NVIC input */ 58 #define MCHP_PROCHOT_NVIC_AGGR 9u 59 60 /* PROCHOT direct NVIC inputs */ 61 #define MCHP_PROCHOT_NVIC_DIRECT 87u 62 63 /* Cumulative Count register */ 64 #define MCHP_PROCHOT_CCNT_REG_OFS 0 65 #define MCHP_PROCHOT_CCNT_REG_MASK 0x00ffffffu 66 67 /* Duty cycle count register */ 68 #define MCHP_PROCHOT_DCCNT_REG_OFS 4 69 #define MCHP_PROCHOT_DCCNT_REG_MASK 0x00ffffffu 70 71 /* Duty cycle period register */ 72 #define MCHP_PROCHOT_DCPER_REG_OFS 8 73 #define MCHP_PROCHOT_DCPER_REG_MASK 0x00ffffffu 74 75 /* Control and Status register */ 76 #define MCHP_PROCHOT_CTRLS_REG_OFS 0x0c 77 #define MCHP_PROCHOT_CTRLS_REG_MASK 0x00000c3fu 78 #define MCHP_PROCHOT_CTRLS_EN_POS 0 79 #define MCHP_PROCHOT_CTRLS_EN (1u << 0) 80 #define MCHP_PROCHOT_CTRLS_PIN_POS 1 81 #define MCHP_PROCHOT_CTRLS_PIN_HI (1u << 1) 82 #define MCHP_PROCHOT_CTRLS_ASSERT_EN_POS 2 83 #define MCHP_PROCHOT_CTRLS_ASSERT_EN (1u << 2) 84 #define MCHP_PROCHOT_CTRLS_PERIOD_EN_POS 3 85 #define MCHP_PROCHOT_CTRLS_PERIOD_EN (1u << 3) 86 #define MCHP_PROCHOT_CTRLS_RESET_EN_POS 4 87 #define MCHP_PROCHOT_CTRLS_RESET_EN (1u << 4) 88 #define MCHP_PROCHOT_CTRLS_FILT_EN_POS 5 89 #define MCHP_PROCHOT_CTRLS_FILT_EN (1u << 5) 90 91 /* Assertion counter register */ 92 #define MCHP_PROCHOT_ASSERT_CNT_REG_OFS 0x10 93 #define MCHP_PROCHOT_ASSERT_CNT_REG_MASK 0x0000ffffu 94 95 /* Assertion counter limit register */ 96 #define MCHP_PROCHOT_ASSERT_LIM_REG_OFS 0x14 97 #define MCHP_PROCHOT_ASSERT_LIM_REG_MASK 0x0000ffffu 98 99 /** 100 * @brief Processor Hot Interface (PROCHOT) 101 */ 102 typedef struct prochot_regs { 103 __IOM uint32_t CUMUL_COUNT; /*!< (@ 0x0000) PROCHOT Cumulative Count */ 104 __IOM uint32_t DUTY_COUNT; /*!< (@ 0x0004) PROCHOT Duty cycle count */ 105 __IOM uint32_t DUTY_PERIOD; /*!< (@ 0x0008) PROCHOT Duty cycle period */ 106 __IOM uint32_t CTRL_STS; /*!< (@ 0x000c) PROCHOT Control and Status */ 107 __IOM uint32_t ASSERT_COUNT; /*!< (@ 0x0010) PROCHOT Assertion counter */ 108 __IOM uint32_t ASSERT_LIMIT; /*!< (@ 0x0014) PROCHOT Assertion counter limit */ 109 } PROCHOT_Type; 110 111 #endif /* #ifndef _PROCHOT_H */ 112 /* end prochot.h */ 113 /** @} 114 */ 115