Update repo

This commit is contained in:
hangpersonal committed 2026-08-30 23:04:35 -07:00
1 parent 749dab5721
commit ce65a0f59a
14950 files changed
+4408250 -1

No files matched your search

@@ -0,0 +1,177 @@
//###########################################################################
//
// FILE: hw_aes.h
//
// TITLE: Definitions for the AES registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_AES_H
#define HW_AES_H
//*************************************************************************************************
//
// The following are defines for the AES register offsets
//
//*************************************************************************************************
#define AES_O_KEY2_6 0x0U // XTS Second Key or CBC-MAC Third Key
#define AES_O_KEY2_7 0x4U // XTS Second Key or CBC-MAC Third Key
#define AES_O_KEY2_4 0x8U // XTS/CCM Second Key or CBC-MAC Third Key
#define AES_O_KEY2_5 0xCU // XTS Second Key or CBC-MAC Third Key
#define AES_O_KEY2_2 0x10U // XTS/CCM/CBC-MAC Second Key or Hash Key Input
#define AES_O_KEY2_3 0x14U // XTS/CCM/CBC-MAC Second Key or Hash Key Input
#define AES_O_KEY2_0 0x18U // XTS/CCM/CBC-MAC Second Key or Hash Key Input
#define AES_O_KEY2_1 0x1CU // XTS/CCM/CBC-MAC Second Key or Hash Key Input
#define AES_O_KEY1_6 0x20U // Key
#define AES_O_KEY1_7 0x24U // Key
#define AES_O_KEY1_4 0x28U // Key
#define AES_O_KEY1_5 0x2CU // Key
#define AES_O_KEY1_2 0x30U // Key
#define AES_O_KEY1_3 0x34U // Key
#define AES_O_KEY1_0 0x38U // Key
#define AES_O_KEY1_1 0x3CU // Key
#define AES_O_IV_IN_OUT_0 0x40U // Initialization Vector 0
#define AES_O_IV_IN_OUT_1 0x44U // Initialization Vector 1
#define AES_O_IV_IN_OUT_2 0x48U // Initialization Vector 2
#define AES_O_IV_IN_OUT_3 0x4CU // Initialization Vector 3
#define AES_O_CTRL 0x50U // Input/Output Buffer Control and Mode Selection
#define AES_O_C_LENGTH_0 0x54U // Crypto Data Length 0
#define AES_O_C_LENGTH_1 0x58U // Crypto Data Length 1
#define AES_O_AUTH_LENGTH 0x5CU // AAD Data Length
#define AES_O_DATA_IN_OUT_0 0x60U // Data Word 0
#define AES_O_DATA_IN_OUT_1 0x64U // Data Word 1
#define AES_O_DATA_IN_OUT_2 0x68U // Data Word 2
#define AES_O_DATA_IN_OUT_3 0x6CU // Data Word 3
#define AES_O_TAG_OUT_0 0x70U // Hash Result 0
#define AES_O_TAG_OUT_1 0x74U // Hash Result 1
#define AES_O_TAG_OUT_2 0x78U // Hash Result 2
#define AES_O_TAG_OUT_3 0x7CU // Hash Result 3
#define AES_O_REV 0x80U // Module Revision Number
#define AES_O_SYSCONFIG 0x84U // System Configuration
#define AES_O_SYSSTATUS 0x88U // Reset Status
#define AES_O_IRQSTATUS 0x8CU // Interrupt Status
#define AES_O_IRQENABLE 0x90U // Interrupt Enable
#define AES_O_DIRTY_BITS 0x94U // Accessed / Dirty Bits
//*************************************************************************************************
//
// The following are defines for the bit fields in the AES_CTRL register
//
//*************************************************************************************************
#define AES_CTRL_OUTPUT_READY 0x1U // Output Ready Status
#define AES_CTRL_INPUT_READY 0x2U // Input Ready Status
#define AES_CTRL_DIRECTION 0x4U // Encryption/Decryption Selection
#define AES_CTRL_KEY_SIZE_S 3U
#define AES_CTRL_KEY_SIZE_M 0x18U // Key Size
#define AES_CTRL_MODE 0x20U // ECB/CBC Mode
#define AES_CTRL_CTR 0x40U // Counter Mode
#define AES_CTRL_CTR_WIDTH_S 7U
#define AES_CTRL_CTR_WIDTH_M 0x180U // AES-CTR Mode Counter Width
#define AES_CTRL_ICM 0x200U // AES Integer Counter Mode (ICM) Enable
#define AES_CTRL_CFB 0x400U // Full block AES cipher feedback mode (CFB128)
// Enable
#define AES_CTRL_XTS_S 11U
#define AES_CTRL_XTS_M 0x1800U // AES-XTS Operation Enable
#define AES_CTRL_F8 0x2000U // AES f8 Mode Enable
#define AES_CTRL_F9 0x4000U // AES f9 Mode Enable
#define AES_CTRL_CBCMAC 0x8000U // AES-CBC MAC Enable
#define AES_CTRL_GCM_S 16U
#define AES_CTRL_GCM_M 0x30000U // AES-GCM Mode Enable
#define AES_CTRL_CCM 0x40000U // AES-CCM Mode Enable
#define AES_CTRL_CCM_L_S 19U
#define AES_CTRL_CCM_L_M 0x380000U // Width of the length field for CCM operations
#define AES_CTRL_CCM_M_S 22U
#define AES_CTRL_CCM_M_M 0x1C00000U // Length of the authentication field for CCM
// operations
#define AES_CTRL_SAVE_CONTEXT 0x20000000U // TAG or Result IV Save
#define AES_CTRL_SVCTXTRDY 0x40000000U // AES TAG/IV Block(s) Ready
#define AES_CTRL_CTXTRDY 0x80000000U // Context Data Registers Ready
//*************************************************************************************************
//
// The following are defines for the bit fields in the AES_SYSCONFIG register
//
//*************************************************************************************************
#define AES_SYSCONFIG_AUTOIDLE 0x1U // autoidle
#define AES_SYSCONFIG_SOFTRESET 0x2U // Soft Reset
#define AES_SYSCONFIG_SIDLE_S 2U
#define AES_SYSCONFIG_SIDLE_M 0xCU // Slave Idle Mode
#define AES_SYSCONFIG_DMA_REQ_DATA_IN_EN 0x20U // DMA Request Data In Enable
#define AES_SYSCONFIG_DMA_REQ_DATA_OUT_EN 0x40U // DMA Request Data Out Enable
#define AES_SYSCONFIG_DMA_REQ_CONTEXT_IN_EN 0x80U // DMA Request Context In Enable
#define AES_SYSCONFIG_DMA_REQ_CONTEXT_OUT_EN 0x100U // DMA Request Context Out Enable
#define AES_SYSCONFIG_MAP_CONTEXT_OUT_ON_DATA_OUT 0x200U // Map Context Out on Data Out Enable
//*************************************************************************************************
//
// The following are defines for the bit fields in the AES_SYSSTATUS register
//
//*************************************************************************************************
#define AES_SYSSTATUS_RESETDONE 0x1U // Reset Done
//*************************************************************************************************
//
// The following are defines for the bit fields in the AES_IRQSTATUS register
//
//*************************************************************************************************
#define AES_IRQSTATUS_CONTEXT_IN 0x1U // Context In Interrupt Status
#define AES_IRQSTATUS_DATA_IN 0x2U // Data In Interrupt Status
#define AES_IRQSTATUS_DATA_OUT 0x4U // Data Out Interrupt Status
#define AES_IRQSTATUS_CONTEXT_OUT 0x8U // Context Output Interrupt Status
//*************************************************************************************************
//
// The following are defines for the bit fields in the AES_IRQENABLE register
//
//*************************************************************************************************
#define AES_IRQENABLE_CONTEXT_IN 0x1U // Context In Interrupt Enable
#define AES_IRQENABLE_DATA_IN 0x2U // Data In Interrupt Enable
#define AES_IRQENABLE_DATA_OUT 0x4U // Data Out Interrupt Enable
#define AES_IRQENABLE_CONTEXT_OUT 0x8U // Context Out Interrupt Enable
//*************************************************************************************************
//
// The following are defines for the bit fields in the AES_DIRTY_BITS register
//
//*************************************************************************************************
#define AES_DIRTY_BITS_S_ACCESS 0x1U // AES Access Bit
#define AES_DIRTY_BITS_S_DIRTY 0x2U // AES Dirty Bit
#endif
@@ -0,0 +1,88 @@
//###########################################################################
//
// FILE: hw_aes_ss.h
//
// TITLE: Definitions for the AES_SS registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_AES_SS_H
#define HW_AES_SS_H
//*************************************************************************************************
//
// The following are defines for the AES_SS register offsets
//
//*************************************************************************************************
#define AES_SS_O_AESDMAINTEN 0x0U // DMA Done Interrupt enable register
#define AES_SS_O_AESDMASTATUS 0x4U // DMA Done Interrupt status register
#define AES_SS_O_AESDMASTATUSCLR 0x8U // DMA Done Interrupt status clear register
//*************************************************************************************************
//
// The following are defines for the bit fields in the AESDMAINTEN register
//
//*************************************************************************************************
#define AES_SS_AESDMAINTEN_DMADONECTXIN 0x1U // Enable bit for DMADONECTXIN
#define AES_SS_AESDMAINTEN_DMADONEDIN 0x2U // Enable bit for DMADONEDIN
#define AES_SS_AESDMAINTEN_DMADONEDOUT 0x4U // Enable bit for DMADONEDOUT
#define AES_SS_AESDMAINTEN_DMADONECTXOUT 0x8U // Enable bit for DMADONECTXOUT
//*************************************************************************************************
//
// The following are defines for the bit fields in the AESDMASTATUS register
//
//*************************************************************************************************
#define AES_SS_AESDMASTATUS_DMADONECTXIN 0x1U // Status bit for DMADONECTXIN
#define AES_SS_AESDMASTATUS_DMADONEDIN 0x2U // Status bit for DMADONEDIN
#define AES_SS_AESDMASTATUS_DMADONEDOUT 0x4U // Status bit for DMADONEDOUT
#define AES_SS_AESDMASTATUS_DMADONECTXOUT 0x8U // Status bit for DMADONECTXOUT
//*************************************************************************************************
//
// The following are defines for the bit fields in the AESDMASTATUSCLR register
//
//*************************************************************************************************
#define AES_SS_AESDMASTATUSCLR_DMADONECTXIN 0x1U // Clear bit for AESDMASTSTAUS.DMADONECTXIN
#define AES_SS_AESDMASTATUSCLR_DMADONEDIN 0x2U // Clear bit for AESDMASTSTAUS.DMADONEDIN
#define AES_SS_AESDMASTATUSCLR_DMADONEDOUT 0x4U // Clear bit for AESDMASTSTAUS.DMADONEDOUT
#define AES_SS_AESDMASTATUSCLR_DMADONECTXOUT 0x8U // Clear bit for AESDMASTSTAUS.DMADONECTXOUT
#endif
@@ -0,0 +1,519 @@
//###########################################################################
//
// FILE: hw_can.h
//
// TITLE: Definitions for the CAN registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_CAN_H
#define HW_CAN_H
//*************************************************************************************************
//
// The following are defines for the CAN register offsets
//
//*************************************************************************************************
#define CAN_O_CTL 0x0U // CAN Control Register
#define CAN_O_ES 0x4U // Error and Status Register
#define CAN_O_ERRC 0x8U // Error Counter Register
#define CAN_O_BTR 0xCU // Bit Timing Register
#define CAN_O_INT 0x10U // Interrupt Register
#define CAN_O_TEST 0x14U // Test Register
#define CAN_O_PERR 0x1CU // CAN Parity Error Code Register
#define CAN_O_RAM_INIT 0x40U // CAN RAM Initialization Register
#define CAN_O_GLB_INT_EN 0x50U // CAN Global Interrupt Enable Register
#define CAN_O_GLB_INT_FLG 0x54U // CAN Global Interrupt Flag Register
#define CAN_O_GLB_INT_CLR 0x58U // CAN Global Interrupt Clear Register
#define CAN_O_ABOTR 0x80U // Auto-Bus-On Time Register
#define CAN_O_TXRQ_X 0x84U // CAN Transmission Request Register
#define CAN_O_TXRQ_21 0x88U // CAN Transmission Request 2_1 Register
#define CAN_O_NDAT_X 0x98U // CAN New Data Register
#define CAN_O_NDAT_21 0x9CU // CAN New Data 2_1 Register
#define CAN_O_IPEN_X 0xACU // CAN Interrupt Pending Register
#define CAN_O_IPEN_21 0xB0U // CAN Interrupt Pending 2_1 Register
#define CAN_O_MVAL_X 0xC0U // CAN Message Valid Register
#define CAN_O_MVAL_21 0xC4U // CAN Message Valid 2_1 Register
#define CAN_O_IP_MUX21 0xD8U // CAN Interrupt Multiplexer 2_1 Register
#define CAN_O_IF1CMD 0x100U // IF1 Command Register
#define CAN_O_IF1MSK 0x104U // IF1 Mask Register
#define CAN_O_IF1ARB 0x108U // IF1 Arbitration Register
#define CAN_O_IF1MCTL 0x10CU // IF1 Message Control Register
#define CAN_O_IF1DATA 0x110U // IF1 Data A Register
#define CAN_O_IF1DATB 0x114U // IF1 Data B Register
#define CAN_O_IF2CMD 0x120U // IF2 Command Register
#define CAN_O_IF2MSK 0x124U // IF2 Mask Register
#define CAN_O_IF2ARB 0x128U // IF2 Arbitration Register
#define CAN_O_IF2MCTL 0x12CU // IF2 Message Control Register
#define CAN_O_IF2DATA 0x130U // IF2 Data A Register
#define CAN_O_IF2DATB 0x134U // IF2 Data B Register
#define CAN_O_IF3OBS 0x140U // IF3 Observation Register
#define CAN_O_IF3MSK 0x144U // IF3 Mask Register
#define CAN_O_IF3ARB 0x148U // IF3 Arbitration Register
#define CAN_O_IF3MCTL 0x14CU // IF3 Message Control Register
#define CAN_O_IF3DATA 0x150U // IF3 Data A Register
#define CAN_O_IF3DATB 0x154U // IF3 Data B Register
#define CAN_O_IF3UPD 0x160U // IF3 Update Enable Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_CTL register
//
//*************************************************************************************************
#define CAN_CTL_INIT 0x1U // Initialization
#define CAN_CTL_IE0 0x2U // Interrupt line 0 Enable
#define CAN_CTL_SIE 0x4U // Status Change Interrupt Enable
#define CAN_CTL_EIE 0x8U // Error Interrupt Enable
#define CAN_CTL_DAR 0x20U // Disable Automatic Retransmission
#define CAN_CTL_CCE 0x40U // Configuration Change Enable
#define CAN_CTL_TEST 0x80U // Test Mode Enable
#define CAN_CTL_IDS 0x100U // Interruption Debug Support Enable
#define CAN_CTL_ABO 0x200U // Auto-Bus-On Enable
#define CAN_CTL_PMD_S 10U
#define CAN_CTL_PMD_M 0x3C00U // Parity on/off
#define CAN_CTL_SWR 0x8000U // SW Reset Enable
#define CAN_CTL_INITDBG 0x10000U // Debug Mode Status
#define CAN_CTL_IE1 0x20000U // Interrupt line 1 Enable Disabled
#define CAN_CTL_DE1 0x40000U // Enable DMA request line
#define CAN_CTL_DE2 0x80000U // Enable DMA request line
#define CAN_CTL_DE3 0x100000U // Enable DMA request line
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_ES register
//
//*************************************************************************************************
#define CAN_ES_LEC_S 0U
#define CAN_ES_LEC_M 0x7U // Last Error Code
#define CAN_ES_TXOK 0x8U // Transmission status
#define CAN_ES_RXOK 0x10U // Reception status
#define CAN_ES_EPASS 0x20U // Error Passive State
#define CAN_ES_EWARN 0x40U // Warning State
#define CAN_ES_BOFF 0x80U // Bus-Off State
#define CAN_ES_PER 0x100U // Parity Error Detected
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_ERRC register
//
//*************************************************************************************************
#define CAN_ERRC_TEC_S 0U
#define CAN_ERRC_TEC_M 0xFFU // Transmit Error Counter
#define CAN_ERRC_REC_S 8U
#define CAN_ERRC_REC_M 0x7F00U // Receive Error Counter
#define CAN_ERRC_RP 0x8000U // Receive Error Passive
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_BTR register
//
//*************************************************************************************************
#define CAN_BTR_BRP_S 0U
#define CAN_BTR_BRP_M 0x3FU // Baud Rate Prescaler
#define CAN_BTR_SJW_S 6U
#define CAN_BTR_SJW_M 0xC0U // Synchronization Jump Width
#define CAN_BTR_TSEG1_S 8U
#define CAN_BTR_TSEG1_M 0xF00U // Time segment
#define CAN_BTR_TSEG2_S 12U
#define CAN_BTR_TSEG2_M 0x7000U // Time segment
#define CAN_BTR_BRPE_S 16U
#define CAN_BTR_BRPE_M 0xF0000U // Baud Rate Prescaler Extension
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_INT register
//
//*************************************************************************************************
#define CAN_INT_INT0ID_S 0U
#define CAN_INT_INT0ID_M 0xFFFFU // Interrupt Identifier
#define CAN_INT_INT1ID_S 16U
#define CAN_INT_INT1ID_M 0xFF0000U // Interrupt 1 Identifier
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_TEST register
//
//*************************************************************************************************
#define CAN_TEST_SILENT 0x8U // Silent Mode
#define CAN_TEST_LBACK 0x10U // Loopback Mode
#define CAN_TEST_TX_S 5U
#define CAN_TEST_TX_M 0x60U // CANTX Pin Control
#define CAN_TEST_RX 0x80U // CANRX Pin Status
#define CAN_TEST_EXL 0x100U // External Loopback Mode
#define CAN_TEST_RDA 0x200U // RAM Direct Access Enable:
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_PERR register
//
//*************************************************************************************************
#define CAN_PERR_MSG_NUM_S 0U
#define CAN_PERR_MSG_NUM_M 0xFFU // Message Number
#define CAN_PERR_WORD_NUM_S 8U
#define CAN_PERR_WORD_NUM_M 0x700U // Word Number
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_RAM_INIT register
//
//*************************************************************************************************
#define CAN_RAM_INIT_KEY0 0x1U // KEY0
#define CAN_RAM_INIT_KEY1 0x2U // KEY1
#define CAN_RAM_INIT_KEY2 0x4U // KEY2
#define CAN_RAM_INIT_KEY3 0x8U // KEY3
#define CAN_RAM_INIT_CAN_RAM_INIT 0x10U // Initialize CAN Mailbox RAM
#define CAN_RAM_INIT_RAM_INIT_DONE 0x20U // CAN RAM initialization complete
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_GLB_INT_EN register
//
//*************************************************************************************************
#define CAN_GLB_INT_EN_GLBINT0_EN 0x1U // Global Interrupt Enable for CANINT0
#define CAN_GLB_INT_EN_GLBINT1_EN 0x2U // Global Interrupt Enable for CANINT1
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_GLB_INT_FLG register
//
//*************************************************************************************************
#define CAN_GLB_INT_FLG_INT0_FLG 0x1U // Global Interrupt Flag for CANINT0
#define CAN_GLB_INT_FLG_INT1_FLG 0x2U // Global Interrupt Flag for CANINT1
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_GLB_INT_CLR register
//
//*************************************************************************************************
#define CAN_GLB_INT_CLR_INT0_FLG_CLR 0x1U // Global Interrupt flag clear for CANINT0
#define CAN_GLB_INT_CLR_INT1_FLG_CLR 0x2U // Global Interrupt flag clear for CANINT1
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_TXRQ_X register
//
//*************************************************************************************************
#define CAN_TXRQ_X_TXRQSTREG1_S 0U
#define CAN_TXRQ_X_TXRQSTREG1_M 0x3U // Transmit Request Register 1
#define CAN_TXRQ_X_TXRQSTREG2_S 2U
#define CAN_TXRQ_X_TXRQSTREG2_M 0xCU // Transmit Request Register 2
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_NDAT_X register
//
//*************************************************************************************************
#define CAN_NDAT_X_NEWDATREG1_S 0U
#define CAN_NDAT_X_NEWDATREG1_M 0x3U // New Data Register 1
#define CAN_NDAT_X_NEWDATREG2_S 2U
#define CAN_NDAT_X_NEWDATREG2_M 0xCU // New Data Register 2
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IPEN_X register
//
//*************************************************************************************************
#define CAN_IPEN_X_INTPNDREG1_S 0U
#define CAN_IPEN_X_INTPNDREG1_M 0x3U // Interrupt Pending Register 1
#define CAN_IPEN_X_INTPNDREG2_S 2U
#define CAN_IPEN_X_INTPNDREG2_M 0xCU // Interrupt Pending Register 2
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_MVAL_X register
//
//*************************************************************************************************
#define CAN_MVAL_X_MSGVALREG1_S 0U
#define CAN_MVAL_X_MSGVALREG1_M 0x3U // Message Valid Register 1
#define CAN_MVAL_X_MSGVALREG2_S 2U
#define CAN_MVAL_X_MSGVALREG2_M 0xCU // Message Valid Register 2
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF1CMD register
//
//*************************************************************************************************
#define CAN_IF1CMD_MSG_NUM_S 0U
#define CAN_IF1CMD_MSG_NUM_M 0xFFU // Message Number
#define CAN_IF1CMD_DMAACTIVE 0x4000U // DMA Status
#define CAN_IF1CMD_BUSY 0x8000U // Busy Flag
#define CAN_IF1CMD_DATA_B 0x10000U // Access Data Bytes 4-7
#define CAN_IF1CMD_DATA_A 0x20000U // Access Data Bytes 0-3
#define CAN_IF1CMD_TXRQST 0x40000U // Access Transmission Request Bit
#define CAN_IF1CMD_CLRINTPND 0x80000U // Clear Interrupt Pending Bit
#define CAN_IF1CMD_CONTROL 0x100000U // Access Control Bits
#define CAN_IF1CMD_ARB 0x200000U // Access Arbitration Bits
#define CAN_IF1CMD_MASK 0x400000U // Access Mask Bits
#define CAN_IF1CMD_DIR 0x800000U // Write/Read Direction
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF1MSK register
//
//*************************************************************************************************
#define CAN_IF1MSK_MSK_S 0U
#define CAN_IF1MSK_MSK_M 0x1FFFFFFFU // Identifier Mask
#define CAN_IF1MSK_MDIR 0x40000000U // Mask Message Direction
#define CAN_IF1MSK_MXTD 0x80000000U // Mask Extended Identifier
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF1ARB register
//
//*************************************************************************************************
#define CAN_IF1ARB_ID_S 0U
#define CAN_IF1ARB_ID_M 0x1FFFFFFFU // `
#define CAN_IF1ARB_DIR 0x20000000U // Message Direction
#define CAN_IF1ARB_XTD 0x40000000U // Extended Identifier
#define CAN_IF1ARB_MSGVAL 0x80000000U // Message Valid
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF1MCTL register
//
//*************************************************************************************************
#define CAN_IF1MCTL_DLC_S 0U
#define CAN_IF1MCTL_DLC_M 0xFU // Data length code
#define CAN_IF1MCTL_EOB 0x80U // End of Block
#define CAN_IF1MCTL_TXRQST 0x100U // Transmit Request
#define CAN_IF1MCTL_RMTEN 0x200U // Remote Enable
#define CAN_IF1MCTL_RXIE 0x400U // Receive Interrupt Enable
#define CAN_IF1MCTL_TXIE 0x800U // Transmit Interrupt Enable
#define CAN_IF1MCTL_UMASK 0x1000U // Use Acceptance Mask
#define CAN_IF1MCTL_INTPND 0x2000U // Interrupt Pending
#define CAN_IF1MCTL_MSGLST 0x4000U // Message Lost
#define CAN_IF1MCTL_NEWDAT 0x8000U // New Data
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF1DATA register
//
//*************************************************************************************************
#define CAN_IF1DATA_DATA_0_S 0U
#define CAN_IF1DATA_DATA_0_M 0xFFU // Data Byte 0
#define CAN_IF1DATA_DATA_1_S 8U
#define CAN_IF1DATA_DATA_1_M 0xFF00U // Data Byte 1
#define CAN_IF1DATA_DATA_2_S 16U
#define CAN_IF1DATA_DATA_2_M 0xFF0000U // Data Byte 2
#define CAN_IF1DATA_DATA_3_S 24U
#define CAN_IF1DATA_DATA_3_M 0xFF000000U // Data Byte 3
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF1DATB register
//
//*************************************************************************************************
#define CAN_IF1DATB_DATA_4_S 0U
#define CAN_IF1DATB_DATA_4_M 0xFFU // Data Byte 4
#define CAN_IF1DATB_DATA_5_S 8U
#define CAN_IF1DATB_DATA_5_M 0xFF00U // Data Byte 5
#define CAN_IF1DATB_DATA_6_S 16U
#define CAN_IF1DATB_DATA_6_M 0xFF0000U // Data Byte 6
#define CAN_IF1DATB_DATA_7_S 24U
#define CAN_IF1DATB_DATA_7_M 0xFF000000U // Data Byte 7
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF2CMD register
//
//*************************************************************************************************
#define CAN_IF2CMD_MSG_NUM_S 0U
#define CAN_IF2CMD_MSG_NUM_M 0xFFU // Message Number
#define CAN_IF2CMD_DMAACTIVE 0x4000U // DMA Status
#define CAN_IF2CMD_BUSY 0x8000U // Busy Flag
#define CAN_IF2CMD_DATA_B 0x10000U // Access Data Bytes 4-7
#define CAN_IF2CMD_DATA_A 0x20000U // Access Data Bytes 0-3
#define CAN_IF2CMD_TXRQST 0x40000U // Access Transmission Request Bit
#define CAN_IF2CMD_CLRINTPND 0x80000U // Clear Interrupt Pending Bit
#define CAN_IF2CMD_CONTROL 0x100000U // Access Control Bits
#define CAN_IF2CMD_ARB 0x200000U // Access Arbitration Bits
#define CAN_IF2CMD_MASK 0x400000U // Access Mask Bits
#define CAN_IF2CMD_DIR 0x800000U // Write/Read Direction
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF2MSK register
//
//*************************************************************************************************
#define CAN_IF2MSK_MSK_S 0U
#define CAN_IF2MSK_MSK_M 0x1FFFFFFFU // Identifier Mask
#define CAN_IF2MSK_MDIR 0x40000000U // Mask Message Direction
#define CAN_IF2MSK_MXTD 0x80000000U // Mask Extended Identifier
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF2ARB register
//
//*************************************************************************************************
#define CAN_IF2ARB_ID_S 0U
#define CAN_IF2ARB_ID_M 0x1FFFFFFFU // Message Identifier
#define CAN_IF2ARB_DIR 0x20000000U // Message Direction
#define CAN_IF2ARB_XTD 0x40000000U // Extended Identifier
#define CAN_IF2ARB_MSGVAL 0x80000000U // Message Valid
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF2MCTL register
//
//*************************************************************************************************
#define CAN_IF2MCTL_DLC_S 0U
#define CAN_IF2MCTL_DLC_M 0xFU // Data length code
#define CAN_IF2MCTL_EOB 0x80U // End of Block
#define CAN_IF2MCTL_TXRQST 0x100U // Transmit Request
#define CAN_IF2MCTL_RMTEN 0x200U // Remote Enable
#define CAN_IF2MCTL_RXIE 0x400U // Receive Interrupt Enable
#define CAN_IF2MCTL_TXIE 0x800U // Transmit Interrupt Enable
#define CAN_IF2MCTL_UMASK 0x1000U // Use Acceptance Mask
#define CAN_IF2MCTL_INTPND 0x2000U // Interrupt Pending
#define CAN_IF2MCTL_MSGLST 0x4000U // Message Lost
#define CAN_IF2MCTL_NEWDAT 0x8000U // New Data
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF2DATA register
//
//*************************************************************************************************
#define CAN_IF2DATA_DATA_0_S 0U
#define CAN_IF2DATA_DATA_0_M 0xFFU // Data Byte 0
#define CAN_IF2DATA_DATA_1_S 8U
#define CAN_IF2DATA_DATA_1_M 0xFF00U // Data Byte 1
#define CAN_IF2DATA_DATA_2_S 16U
#define CAN_IF2DATA_DATA_2_M 0xFF0000U // Data Byte 2
#define CAN_IF2DATA_DATA_3_S 24U
#define CAN_IF2DATA_DATA_3_M 0xFF000000U // Data Byte 3
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF2DATB register
//
//*************************************************************************************************
#define CAN_IF2DATB_DATA_4_S 0U
#define CAN_IF2DATB_DATA_4_M 0xFFU // Data Byte 4
#define CAN_IF2DATB_DATA_5_S 8U
#define CAN_IF2DATB_DATA_5_M 0xFF00U // Data Byte 5
#define CAN_IF2DATB_DATA_6_S 16U
#define CAN_IF2DATB_DATA_6_M 0xFF0000U // Data Byte 6
#define CAN_IF2DATB_DATA_7_S 24U
#define CAN_IF2DATB_DATA_7_M 0xFF000000U // Data Byte 7
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF3OBS register
//
//*************************************************************************************************
#define CAN_IF3OBS_MASK 0x1U // Mask data read observation
#define CAN_IF3OBS_ARB 0x2U // Arbitration data read observation
#define CAN_IF3OBS_CTRL 0x4U // Ctrl read observation
#define CAN_IF3OBS_DATA_A 0x8U // Data A read observation
#define CAN_IF3OBS_DATA_B 0x10U // Data B read observation
#define CAN_IF3OBS_IF3SM 0x100U // IF3 Status of Mask data read access
#define CAN_IF3OBS_IF3SA 0x200U // IF3 Status of Arbitration data read access
#define CAN_IF3OBS_IF3SC 0x400U // IF3 Status of Control bits read access
#define CAN_IF3OBS_IF3SDA 0x800U // IF3 Status of Data A read access
#define CAN_IF3OBS_IF3SDB 0x1000U // IF3 Status of Data B read access
#define CAN_IF3OBS_IF3UPD 0x8000U // IF3 Update Data
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF3MSK register
//
//*************************************************************************************************
#define CAN_IF3MSK_MSK_S 0U
#define CAN_IF3MSK_MSK_M 0x1FFFFFFFU // Mask
#define CAN_IF3MSK_MDIR 0x40000000U // Mask Message Direction
#define CAN_IF3MSK_MXTD 0x80000000U // Mask Extended Identifier
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF3ARB register
//
//*************************************************************************************************
#define CAN_IF3ARB_ID_S 0U
#define CAN_IF3ARB_ID_M 0x1FFFFFFFU // Message Identifier
#define CAN_IF3ARB_DIR 0x20000000U // Message Direction
#define CAN_IF3ARB_XTD 0x40000000U // Extended Identifier
#define CAN_IF3ARB_MSGVAL 0x80000000U // Message Valid
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF3MCTL register
//
//*************************************************************************************************
#define CAN_IF3MCTL_DLC_S 0U
#define CAN_IF3MCTL_DLC_M 0xFU // Data length code
#define CAN_IF3MCTL_EOB 0x80U // End of Block
#define CAN_IF3MCTL_TXRQST 0x100U // Transmit Request
#define CAN_IF3MCTL_RMTEN 0x200U // Remote Enable
#define CAN_IF3MCTL_RXIE 0x400U // Receive Interrupt Enable
#define CAN_IF3MCTL_TXIE 0x800U // Transmit Interrupt Enable
#define CAN_IF3MCTL_UMASK 0x1000U // Use Acceptance Mask
#define CAN_IF3MCTL_INTPND 0x2000U // Interrupt Pending
#define CAN_IF3MCTL_MSGLST 0x4000U // Message Lost
#define CAN_IF3MCTL_NEWDAT 0x8000U // New Data
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF3DATA register
//
//*************************************************************************************************
#define CAN_IF3DATA_DATA_0_S 0U
#define CAN_IF3DATA_DATA_0_M 0xFFU // Data Byte 0
#define CAN_IF3DATA_DATA_1_S 8U
#define CAN_IF3DATA_DATA_1_M 0xFF00U // Data Byte 1
#define CAN_IF3DATA_DATA_2_S 16U
#define CAN_IF3DATA_DATA_2_M 0xFF0000U // Data Byte 2
#define CAN_IF3DATA_DATA_3_S 24U
#define CAN_IF3DATA_DATA_3_M 0xFF000000U // Data Byte 3
//*************************************************************************************************
//
// The following are defines for the bit fields in the CAN_IF3DATB register
//
//*************************************************************************************************
#define CAN_IF3DATB_DATA_4_S 0U
#define CAN_IF3DATB_DATA_4_M 0xFFU // Data Byte 4
#define CAN_IF3DATB_DATA_5_S 8U
#define CAN_IF3DATB_DATA_5_M 0xFF00U // Data Byte 5
#define CAN_IF3DATB_DATA_6_S 16U
#define CAN_IF3DATB_DATA_6_M 0xFF0000U // Data Byte 6
#define CAN_IF3DATB_DATA_7_S 24U
#define CAN_IF3DATB_DATA_7_M 0xFF000000U // Data Byte 7
#endif
@@ -0,0 +1,281 @@
//###########################################################################
//
// FILE: hw_cmmpu.h
//
// TITLE: Definitions for the CMMPU registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_CMMPU_H
#define HW_CMMPU_H
//*************************************************************************************************
//
// The following are defines for the CMMPU register offsets
//
//*************************************************************************************************
#define CMMPU_O_MPU_CONTROL_REG 0x0U // MPU control regster
#define CMMPU_O_ACC_VIO_INTEN 0x20U // Access violation interrupt enable
#define CMMPU_O_ACC_VIO_FLAGS 0x24U // Access violation flag register
#define CMMPU_O_ACC_VIO_FLAGS_SET 0x28U // Acesss violation set register
#define CMMPU_O_ACC_VIO_FLAGS_CLR 0x2CU // Access violation clear register
#define CMMPU_O_ACC_VIO_ADDR_REG 0x30U // Access violation address register
#define CMMPU_O_REGION0_STARTADDRESSS 0x40U // Region 0 start address register
#define CMMPU_O_REGION0_CONFIG 0x44U // Region 0 configuration register
#define CMMPU_O_REGION1_STARTADDRESSS 0x48U // Region 1 start address register
#define CMMPU_O_REGION1_CONFIG 0x4CU // Region 1 configuration register
#define CMMPU_O_REGION2_STARTADDRESSS 0x50U // Region 2 start address register
#define CMMPU_O_REGION2_CONFIG 0x54U // Region 2 configuration register
#define CMMPU_O_REGION3_STARTADDRESSS 0x58U // Region 3 start address register
#define CMMPU_O_REGION3_CONFIG 0x5CU // Region 3 configuration register
#define CMMPU_O_REGION4_STARTADDRESSS 0x60U // Region 4 start address register
#define CMMPU_O_REGION4_CONFIG 0x64U // Region 4 configuration register
#define CMMPU_O_REGION5_STARTADDRESSS 0x68U // Region 5 start address register
#define CMMPU_O_REGION5_CONFIG 0x6CU // Region 5 configuration register
#define CMMPU_O_REGION6_STARTADDRESSS 0x70U // Region 6 start address register
#define CMMPU_O_REGION6_CONFIG 0x74U // Region 6 configuration register
#define CMMPU_O_REGION7_STARTADDRESSS 0x78U // Region 7 start address register
#define CMMPU_O_REGION7_CONFIG 0x7CU // Region 7 configuration register
//*************************************************************************************************
//
// The following are defines for the bit fields in the MPU_CONTROL_REG register
//
//*************************************************************************************************
#define CMMPU_MPU_CONTROL_REG_ENABLE 0x1U // Global Enable register
//*************************************************************************************************
//
// The following are defines for the bit fields in the ACC_VIO_INTEN register
//
//*************************************************************************************************
#define CMMPU_ACC_VIO_INTEN_INTEN 0x1U // Interrupt enable register
#define CMMPU_ACC_VIO_INTEN_KEY_S 16U
#define CMMPU_ACC_VIO_INTEN_KEY_M 0xFFFF0000U // KEY to allow write access
//*************************************************************************************************
//
// The following are defines for the bit fields in the ACC_VIO_FLAGS register
//
//*************************************************************************************************
#define CMMPU_ACC_VIO_FLAGS_RD 0x1U // Read access violation flag
#define CMMPU_ACC_VIO_FLAGS_WR 0x2U // Write access violation flag
//*************************************************************************************************
//
// The following are defines for the bit fields in the ACC_VIO_FLAGS_SET register
//
//*************************************************************************************************
#define CMMPU_ACC_VIO_FLAGS_SET_RD 0x1U // Read access violation flag set
#define CMMPU_ACC_VIO_FLAGS_SET_WR 0x2U // Write access violation flag set
#define CMMPU_ACC_VIO_FLAGS_SET_KEY_S 16U
#define CMMPU_ACC_VIO_FLAGS_SET_KEY_M 0xFFFF0000U // KEY to allow write access
//*************************************************************************************************
//
// The following are defines for the bit fields in the ACC_VIO_FLAGS_CLR register
//
//*************************************************************************************************
#define CMMPU_ACC_VIO_FLAGS_CLR_RD 0x1U // Read access violation flag clear
#define CMMPU_ACC_VIO_FLAGS_CLR_WR 0x2U // Write access violation flag clear
#define CMMPU_ACC_VIO_FLAGS_CLR_KEY_S 16U
#define CMMPU_ACC_VIO_FLAGS_CLR_KEY_M 0xFFFF0000U // KEY to allow write access
//*************************************************************************************************
//
// The following are defines for the bit fields in the REGION0_CONFIG register
//
//*************************************************************************************************
#define CMMPU_REGION0_CONFIG_ENABLE 0x1U // Region Enable bit
#define CMMPU_REGION0_CONFIG_PROT_TYPE_S 4U
#define CMMPU_REGION0_CONFIG_PROT_TYPE_M 0x30U // Access permission configuration
// bits
#define CMMPU_REGION0_CONFIG_SIZE_S 8U
#define CMMPU_REGION0_CONFIG_SIZE_M 0x1F00U // Size of the region 0
#define CMMPU_REGION0_CONFIG_SUBREGION0_DISABLE 0x10000U // Sub region 0 disable bit
#define CMMPU_REGION0_CONFIG_SUBREGION1_DISABLE 0x20000U // Sub region 1 disable bit
#define CMMPU_REGION0_CONFIG_SUBREGION2_DISABLE 0x40000U // Sub region 2 disable bit
#define CMMPU_REGION0_CONFIG_SUBREGION3_DISABLE 0x80000U // Sub region 3 disable bit
#define CMMPU_REGION0_CONFIG_SUBREGION4_DISABLE 0x100000U // Sub region 4 disable bit
#define CMMPU_REGION0_CONFIG_SUBREGION5_DISABLE 0x200000U // Sub region 5 disable bit
#define CMMPU_REGION0_CONFIG_SUBREGION6_DISABLE 0x400000U // Sub region 6 disable bit
#define CMMPU_REGION0_CONFIG_SUBREGION7_DISABLE 0x800000U // Sub region 7 disable bit
//*************************************************************************************************
//
// The following are defines for the bit fields in the REGION1_CONFIG register
//
//*************************************************************************************************
#define CMMPU_REGION1_CONFIG_ENABLE 0x1U // Region Enable bit
#define CMMPU_REGION1_CONFIG_PROT_TYPE_S 4U
#define CMMPU_REGION1_CONFIG_PROT_TYPE_M 0x30U // Access permission configuration
// bits
#define CMMPU_REGION1_CONFIG_SIZE_S 8U
#define CMMPU_REGION1_CONFIG_SIZE_M 0x1F00U // Size of the region 1
#define CMMPU_REGION1_CONFIG_SUBREGION0_DISABLE 0x10000U // Sub region 0 disable bit
#define CMMPU_REGION1_CONFIG_SUBREGION1_DISABLE 0x20000U // Sub region 1 disable bit
#define CMMPU_REGION1_CONFIG_SUBREGION2_DISABLE 0x40000U // Sub region 2 disable bit
#define CMMPU_REGION1_CONFIG_SUBREGION3_DISABLE 0x80000U // Sub region 3 disable bit
#define CMMPU_REGION1_CONFIG_SUBREGION4_DISABLE 0x100000U // Sub region 4 disable bit
#define CMMPU_REGION1_CONFIG_SUBREGION5_DISABLE 0x200000U // Sub region 5 disable bit
#define CMMPU_REGION1_CONFIG_SUBREGION6_DISABLE 0x400000U // Sub region 6 disable bit
#define CMMPU_REGION1_CONFIG_SUBREGION7_DISABLE 0x800000U // Sub region 7 disable bit
//*************************************************************************************************
//
// The following are defines for the bit fields in the REGION2_CONFIG register
//
//*************************************************************************************************
#define CMMPU_REGION2_CONFIG_ENABLE 0x1U // Region Enable bit
#define CMMPU_REGION2_CONFIG_PROT_TYPE_S 4U
#define CMMPU_REGION2_CONFIG_PROT_TYPE_M 0x30U // Access permission configuration
// bits
#define CMMPU_REGION2_CONFIG_SIZE_S 8U
#define CMMPU_REGION2_CONFIG_SIZE_M 0x1F00U // Size of the region 2
#define CMMPU_REGION2_CONFIG_SUBREGION0_DISABLE 0x10000U // Sub region 0 disable bit
#define CMMPU_REGION2_CONFIG_SUBREGION1_DISABLE 0x20000U // Sub region 1 disable bit
#define CMMPU_REGION2_CONFIG_SUBREGION2_DISABLE 0x40000U // Sub region 2 disable bit
#define CMMPU_REGION2_CONFIG_SUBREGION3_DISABLE 0x80000U // Sub region 3 disable bit
#define CMMPU_REGION2_CONFIG_SUBREGION4_DISABLE 0x100000U // Sub region 4 disable bit
#define CMMPU_REGION2_CONFIG_SUBREGION5_DISABLE 0x200000U // Sub region 5 disable bit
#define CMMPU_REGION2_CONFIG_SUBREGION6_DISABLE 0x400000U // Sub region 6 disable bit
#define CMMPU_REGION2_CONFIG_SUBREGION7_DISABLE 0x800000U // Sub region 7 disable bit
//*************************************************************************************************
//
// The following are defines for the bit fields in the REGION3_CONFIG register
//
//*************************************************************************************************
#define CMMPU_REGION3_CONFIG_ENABLE 0x1U // Region Enable bit
#define CMMPU_REGION3_CONFIG_PROT_TYPE_S 4U
#define CMMPU_REGION3_CONFIG_PROT_TYPE_M 0x30U // Access permission configuration
// bits
#define CMMPU_REGION3_CONFIG_SIZE_S 8U
#define CMMPU_REGION3_CONFIG_SIZE_M 0x1F00U // Size of the region 3
#define CMMPU_REGION3_CONFIG_SUBREGION0_DISABLE 0x10000U // Sub region 0 disable bit
#define CMMPU_REGION3_CONFIG_SUBREGION1_DISABLE 0x20000U // Sub region 1 disable bit
#define CMMPU_REGION3_CONFIG_SUBREGION2_DISABLE 0x40000U // Sub region 2 disable bit
#define CMMPU_REGION3_CONFIG_SUBREGION3_DISABLE 0x80000U // Sub region 3 disable bit
#define CMMPU_REGION3_CONFIG_SUBREGION4_DISABLE 0x100000U // Sub region 4 disable bit
#define CMMPU_REGION3_CONFIG_SUBREGION5_DISABLE 0x200000U // Sub region 5 disable bit
#define CMMPU_REGION3_CONFIG_SUBREGION6_DISABLE 0x400000U // Sub region 6 disable bit
#define CMMPU_REGION3_CONFIG_SUBREGION7_DISABLE 0x800000U // Sub region 7 disable bit
//*************************************************************************************************
//
// The following are defines for the bit fields in the REGION4_CONFIG register
//
//*************************************************************************************************
#define CMMPU_REGION4_CONFIG_ENABLE 0x1U // Region Enable bit
#define CMMPU_REGION4_CONFIG_PROT_TYPE_S 4U
#define CMMPU_REGION4_CONFIG_PROT_TYPE_M 0x30U // Access permission configuration
// bits
#define CMMPU_REGION4_CONFIG_SIZE_S 8U
#define CMMPU_REGION4_CONFIG_SIZE_M 0x1F00U // Size of the region 4
#define CMMPU_REGION4_CONFIG_SUBREGION0_DISABLE 0x10000U // Sub region 0 disable bit
#define CMMPU_REGION4_CONFIG_SUBREGION1_DISABLE 0x20000U // Sub region 1 disable bit
#define CMMPU_REGION4_CONFIG_SUBREGION2_DISABLE 0x40000U // Sub region 2 disable bit
#define CMMPU_REGION4_CONFIG_SUBREGION3_DISABLE 0x80000U // Sub region 3 disable bit
#define CMMPU_REGION4_CONFIG_SUBREGION4_DISABLE 0x100000U // Sub region 4 disable bit
#define CMMPU_REGION4_CONFIG_SUBREGION5_DISABLE 0x200000U // Sub region 5 disable bit
#define CMMPU_REGION4_CONFIG_SUBREGION6_DISABLE 0x400000U // Sub region 6 disable bit
#define CMMPU_REGION4_CONFIG_SUBREGION7_DISABLE 0x800000U // Sub region 7 disable bit
//*************************************************************************************************
//
// The following are defines for the bit fields in the REGION5_CONFIG register
//
//*************************************************************************************************
#define CMMPU_REGION5_CONFIG_ENABLE 0x1U // Region Enable bit
#define CMMPU_REGION5_CONFIG_PROT_TYPE_S 4U
#define CMMPU_REGION5_CONFIG_PROT_TYPE_M 0x30U // Access permission configuration
// bits
#define CMMPU_REGION5_CONFIG_SIZE_S 8U
#define CMMPU_REGION5_CONFIG_SIZE_M 0x1F00U // Size of the region 5
#define CMMPU_REGION5_CONFIG_SUBREGION0_DISABLE 0x10000U // Sub region 0 disable bit
#define CMMPU_REGION5_CONFIG_SUBREGION1_DISABLE 0x20000U // Sub region 1 disable bit
#define CMMPU_REGION5_CONFIG_SUBREGION2_DISABLE 0x40000U // Sub region 2 disable bit
#define CMMPU_REGION5_CONFIG_SUBREGION3_DISABLE 0x80000U // Sub region 3 disable bit
#define CMMPU_REGION5_CONFIG_SUBREGION4_DISABLE 0x100000U // Sub region 4 disable bit
#define CMMPU_REGION5_CONFIG_SUBREGION5_DISABLE 0x200000U // Sub region 5 disable bit
#define CMMPU_REGION5_CONFIG_SUBREGION6_DISABLE 0x400000U // Sub region 6 disable bit
#define CMMPU_REGION5_CONFIG_SUBREGION7_DISABLE 0x800000U // Sub region 7 disable bit
//*************************************************************************************************
//
// The following are defines for the bit fields in the REGION6_CONFIG register
//
//*************************************************************************************************
#define CMMPU_REGION6_CONFIG_ENABLE 0x1U // Region Enable bit
#define CMMPU_REGION6_CONFIG_PROT_TYPE_S 4U
#define CMMPU_REGION6_CONFIG_PROT_TYPE_M 0x30U // Access permission configuration
// bits
#define CMMPU_REGION6_CONFIG_SIZE_S 8U
#define CMMPU_REGION6_CONFIG_SIZE_M 0x1F00U // Size of the region 6
#define CMMPU_REGION6_CONFIG_SUBREGION0_DISABLE 0x10000U // Sub region 0 disable bit
#define CMMPU_REGION6_CONFIG_SUBREGION1_DISABLE 0x20000U // Sub region 1 disable bit
#define CMMPU_REGION6_CONFIG_SUBREGION2_DISABLE 0x40000U // Sub region 2 disable bit
#define CMMPU_REGION6_CONFIG_SUBREGION3_DISABLE 0x80000U // Sub region 3 disable bit
#define CMMPU_REGION6_CONFIG_SUBREGION4_DISABLE 0x100000U // Sub region 4 disable bit
#define CMMPU_REGION6_CONFIG_SUBREGION5_DISABLE 0x200000U // Sub region 5 disable bit
#define CMMPU_REGION6_CONFIG_SUBREGION6_DISABLE 0x400000U // Sub region 6 disable bit
#define CMMPU_REGION6_CONFIG_SUBREGION7_DISABLE 0x800000U // Sub region 7 disable bit
//*************************************************************************************************
//
// The following are defines for the bit fields in the REGION7_CONFIG register
//
//*************************************************************************************************
#define CMMPU_REGION7_CONFIG_ENABLE 0x1U // Region Enable bit
#define CMMPU_REGION7_CONFIG_PROT_TYPE_S 4U
#define CMMPU_REGION7_CONFIG_PROT_TYPE_M 0x30U // Access permission configuration
// bits
#define CMMPU_REGION7_CONFIG_SIZE_S 8U
#define CMMPU_REGION7_CONFIG_SIZE_M 0x1F00U // Size of the region 7
#define CMMPU_REGION7_CONFIG_SUBREGION0_DISABLE 0x10000U // Sub region 0 disable bit
#define CMMPU_REGION7_CONFIG_SUBREGION1_DISABLE 0x20000U // Sub region 1 disable bit
#define CMMPU_REGION7_CONFIG_SUBREGION2_DISABLE 0x40000U // Sub region 2 disable bit
#define CMMPU_REGION7_CONFIG_SUBREGION3_DISABLE 0x80000U // Sub region 3 disable bit
#define CMMPU_REGION7_CONFIG_SUBREGION4_DISABLE 0x100000U // Sub region 4 disable bit
#define CMMPU_REGION7_CONFIG_SUBREGION5_DISABLE 0x200000U // Sub region 5 disable bit
#define CMMPU_REGION7_CONFIG_SUBREGION6_DISABLE 0x400000U // Sub region 6 disable bit
#define CMMPU_REGION7_CONFIG_SUBREGION7_DISABLE 0x800000U // Sub region 7 disable bit
#endif
@@ -0,0 +1,85 @@
//###########################################################################
//
// FILE: hw_cputimer.h
//
// TITLE: Definitions for the CPUTIMER registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_CPUTIMER_H
#define HW_CPUTIMER_H
//*************************************************************************************************
//
// The following are defines for the CPUTIMER register offsets
//
//*************************************************************************************************
#define CPUTIMER_O_TIM 0x0U // Timer counter register
#define CPUTIMER_O_PRD 0x4U // Timer period register
#define CPUTIMER_O_TCR 0x8U // Timer control register
#define CPUTIMER_O_TPR 0xCU // Timer prescaler register
//*************************************************************************************************
//
// The following are defines for the bit fields in the TCR register
//
//*************************************************************************************************
#define CPUTIMER_TCR_TSS 0x10U // Timer Stop Status
#define CPUTIMER_TCR_TRB 0x20U // Timer Reload Bit
#define CPUTIMER_TCR_SOFT 0x400U // SOFT stop enable
#define CPUTIMER_TCR_FREE 0x800U // Free run enable
#define CPUTIMER_TCR_TIE 0x4000U // Timer Interrupt Enable
#define CPUTIMER_TCR_TIF 0x8000U // Timer Intrerrupt Flag
//*************************************************************************************************
//
// The following are defines for the bit fields in the TPR register
//
//*************************************************************************************************
#define CPUTIMER_TPR_TDDRL_S 0U
#define CPUTIMER_TPR_TDDRL_M 0xFFU // Timer Divide Down Register Low
#define CPUTIMER_TPR_PSCL_S 8U
#define CPUTIMER_TPR_PSCL_M 0xFF00U // Prescaler Counter low
#define CPUTIMER_TPR_TDDRH_S 16U
#define CPUTIMER_TPR_TDDRH_M 0xFF0000U // Timer Divide Down Register High
#define CPUTIMER_TPR_PSCH_S 24U
#define CPUTIMER_TPR_PSCH_M 0xFF000000U // Prescaler Counter high
#endif
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,149 @@
//###########################################################################
//
// FILE: hw_emac_ss.h
//
// TITLE: Definitions for the ETHERNETSS registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_EMAC_SS_H
#define HW_EMAC_SS_H
//*************************************************************************************************
//
// The following are defines for the ETHERNETSS register offsets
//
//*************************************************************************************************
#define ETHERNETSS_O_IPREVNUM 0x0U // IP Revision Number
#define ETHERNETSS_O_CTRLSTS 0x4U // Control Register
#define ETHERNETSS_O_PTPTSTRIGSEL0 0x8U // PTP Trigger-0 select
#define ETHERNETSS_O_PTPTSTRIGSEL1 0xCU // PTP Trigger-1 select
#define ETHERNETSS_O_PTPTSSWTRIG0 0x10U // PTP SW Trigger-0
#define ETHERNETSS_O_PTPTSSWTRIG1 0x14U // PTP SW Trigger-1
#define ETHERNETSS_O_PTPPPSR0 0x18U // PTP PPS-0 Read
#define ETHERNETSS_O_PTPPPSR1 0x1CU // PTP PPS-1 Read
#define ETHERNETSS_O_PTP_TSRL 0x20U // PTP timestamp read lower 32 bits
#define ETHERNETSS_O_PTP_TSRH 0x24U // PTP timestamp read upper 32 bits
#define ETHERNETSS_O_PTP_TSWL 0x28U // External Timestamp write lower 32 bits
#define ETHERNETSS_O_PTP_TSWH 0x2CU // External Timestamp write upper 32 bits
#define ETHERNETSS_O_REVMII_CTRL 0x30U // RevMII Phy Address controls
//*************************************************************************************************
//
// The following are defines for the bit fields in the ETHERNETSS_IPREVNUM register
//
//*************************************************************************************************
#define ETHERNETSS_IPREVNUM_IP_REV_MINOR_S 0U
#define ETHERNETSS_IPREVNUM_IP_REV_MINOR_M 0xFU // Minor IP Revision Number
#define ETHERNETSS_IPREVNUM_IP_REV_MAJOR_S 4U
#define ETHERNETSS_IPREVNUM_IP_REV_MAJOR_M 0xF0U // Major IP Revision Number
//*************************************************************************************************
//
// The following are defines for the bit fields in the ETHERNETSS_CTRLSTS register
//
//*************************************************************************************************
#define ETHERNETSS_CTRLSTS_PHY_INTF_SEL_S 0U
#define ETHERNETSS_CTRLSTS_PHY_INTF_SEL_M 0x7U // PHY Type Selection
#define ETHERNETSS_CTRLSTS_CLK_LM 0x10U // MII Loop-back mode clock select
#define ETHERNETSS_CTRLSTS_CLK_SRC_SEL 0x80U // Internal Clock Selection
#define ETHERNETSS_CTRLSTS_FLOW_CTRL_EN_S 8U
#define ETHERNETSS_CTRLSTS_FLOW_CTRL_EN_M 0x300U // Back-pressure enable per receive queue.
#define ETHERNETSS_CTRLSTS_WRITE_KEY_S 16U
#define ETHERNETSS_CTRLSTS_WRITE_KEY_M 0xFF0000U // Key to enable writing lock
//*************************************************************************************************
//
// The following are defines for the bit fields in the ETHERNETSS_PTPTSTRIGSEL0 register
//
//*************************************************************************************************
#define ETHERNETSS_PTPTSTRIGSEL0_PTP_AUX_TS_TRIG_SEL0_S 0U
#define ETHERNETSS_PTPTSTRIGSEL0_PTP_AUX_TS_TRIG_SEL0_M 0x1FU // Trigger select for
// Auxillary TS capture - 0
#define ETHERNETSS_PTPTSTRIGSEL0_WRITE_KEY_S 16U
#define ETHERNETSS_PTPTSTRIGSEL0_WRITE_KEY_M 0xFF0000U // Key to enable writing lock
//*************************************************************************************************
//
// The following are defines for the bit fields in the ETHERNETSS_PTPTSTRIGSEL1 register
//
//*************************************************************************************************
#define ETHERNETSS_PTPTSTRIGSEL1_PTP_AUX_TS_TRIG_SEL1_S 0U
#define ETHERNETSS_PTPTSTRIGSEL1_PTP_AUX_TS_TRIG_SEL1_M 0x1FU // Trigger select for
// Auxillary TS capture - 1
#define ETHERNETSS_PTPTSTRIGSEL1_WRITE_KEY_S 16U
#define ETHERNETSS_PTPTSTRIGSEL1_WRITE_KEY_M 0xFF0000U // Key to enable writing lock
//*************************************************************************************************
//
// The following are defines for the bit fields in the ETHERNETSS_PTPTSSWTRIG0 register
//
//*************************************************************************************************
#define ETHERNETSS_PTPTSSWTRIG0_PTP_AUX_TS_SW_TRIG0 0x1U // SW trigger for AUX TS capture for
// trigger-0
//*************************************************************************************************
//
// The following are defines for the bit fields in the ETHERNETSS_PTPTSSWTRIG1 register
//
//*************************************************************************************************
#define ETHERNETSS_PTPTSSWTRIG1_PTP_AUX_TS_SW_TRIG1 0x1U // SW trigger for AUX TS capture for
// trigger-1
//*************************************************************************************************
//
// The following are defines for the bit fields in the ETHERNETSS_PTPPPSR0 register
//
//*************************************************************************************************
#define ETHERNETSS_PTPPPSR0_PTP_PPS_R0 0x1U // Registered value of Pulse Per Second-0
//*************************************************************************************************
//
// The following are defines for the bit fields in the ETHERNETSS_PTPPPSR1 register
//
//*************************************************************************************************
#define ETHERNETSS_PTPPPSR1_PTP_PPS_R1 0x1U // Registered value of Pulse Per Second-1
//*************************************************************************************************
//
// The following are defines for the bit fields in the ETHERNETSS_REVMII_CTRL register
//
//*************************************************************************************************
#define ETHERNETSS_REVMII_CTRL_REVMII_CORE_PHY_ADDR_S 0U
#define ETHERNETSS_REVMII_CTRL_REVMII_CORE_PHY_ADDR_M 0x1FU // RevMII Core Register Space
// offset
#define ETHERNETSS_REVMII_CTRL_REVMII_REMOTE_PHY_ADDR_S 8U
#define ETHERNETSS_REVMII_CTRL_REVMII_REMOTE_PHY_ADDR_M 0x1F00U // RevMII Remote Register
// Space offset
#define ETHERNETSS_REVMII_CTRL_WRITE_KEY_S 16U
#define ETHERNETSS_REVMII_CTRL_WRITE_KEY_M 0xFF0000U // Key to enable writing lock
#endif
@@ -0,0 +1,357 @@
//###########################################################################
//
// FILE: hw_esc_ss.h
//
// TITLE: Definitions for the ESCSS registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_ESC_SS_H
#define HW_ESC_SS_H
//*************************************************************************************************
//
// The following are defines for the ESCSS register offsets
//
//*************************************************************************************************
#define ESCSS_O_IPREVNUM 0x0U // IP Revision Number
#define ESCSS_O_INTR_RIS 0x4U // EtherCATSS Interrupt Raw Status
#define ESCSS_O_INTR_MASK 0x8U // EtherCATSS Interrupt Mask
#define ESCSS_O_INTR_MIS 0xCU // EtherCATSS Masked Interrupt Status
#define ESCSS_O_INTR_CLR 0x10U // EtherCATSS Interrupt Clear
#define ESCSS_O_INTR_SET 0x14U // EtherCATSS Interrupt Set to emulate
#define ESCSS_O_LATCH_SEL 0x18U // Select for Latch0/1 inputs and LATCHIN input
#define ESCSS_O_ACCESS_CTRL 0x1CU // PDI interface access control config.
#define ESCSS_O_GPIN_DAT 0x20U // GPIN data capture for debug & override
#define ESCSS_O_GPIN_PIPE 0x24U // GPIN pipeline select
#define ESCSS_O_GPIN_GRP_CAP_SEL 0x28U // GPIN pipe group capture trigger
#define ESCSS_O_GPOUT_DAT 0x2CU // GPOUT data capture for debug & override
#define ESCSS_O_GPOUT_PIPE 0x30U // GPOUT pipeline select
#define ESCSS_O_GPOUT_GRP_CAP_SEL 0x34U // GPOUT pipe group capture trigger
#define ESCSS_O_MEM_TEST 0x38U // Memory Test Control
#define ESCSS_O_RESET_DEST_CONFIG 0x3CU // ResetOut impact or destination config
#define ESCSS_O_SYNC0_CONFIG 0x40U // SYNC0 Configuration for various triggers
#define ESCSS_O_SYNC1_CONFIG 0x44U // SYNC1 Configuration for various triggers
#define ESCSS_O_CONFIG_LOCK 0x0U // EtherCATSS Configuration Lock
#define ESCSS_O_MISC_IO_CONFIG 0x4U // RESET_IN, EEPROM IO connections select
#define ESCSS_O_PHY_IO_CONFIG 0x8U // Control Register of ESCSS
#define ESCSS_O_SYNC_IO_CONFIG 0xCU // SYNC Signals IO configurations
#define ESCSS_O_LATCH_IO_CONFIG 0x10U // LATCH inputs IO pad select
#define ESCSS_O_GPIN_SEL 0x14U // GPIN Select between IO PAD & tieoff
#define ESCSS_O_GPIN_IOPAD_SEL 0x18U // GPIN IO pad Select
#define ESCSS_O_GPOUT_SEL 0x1CU // GPOUT IO pad connect select
#define ESCSS_O_GPOUT_IOPAD_SEL 0x20U // GPOUT IO pad select
#define ESCSS_O_LED_CONFIG 0x24U // Selection of LED o/p connect to IO pad
#define ESCSS_O_MISC_CONFIG 0x28U // Miscelleneous Configuration
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_IPREVNUM register
//
//*************************************************************************************************
#define ESCSS_IPREVNUM_IP_REV_MINOR_S 0U
#define ESCSS_IPREVNUM_IP_REV_MINOR_M 0xFU // Minor IP Revision Number
#define ESCSS_IPREVNUM_IP_REV_MAJOR_S 4U
#define ESCSS_IPREVNUM_IP_REV_MAJOR_M 0xF0U // Major IP Revision Number
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_INTR_RIS register
//
//*************************************************************************************************
#define ESCSS_INTR_RIS_SYNC0_RIS 0x1U // SYNC0 feature RIS
#define ESCSS_INTR_RIS_SYNC1_RIS 0x2U // SYNC1 feature RIS
#define ESCSS_INTR_RIS_IRQ_RIS 0x4U // EtherCATSS IRQ RIS
#define ESCSS_INTR_RIS_DMA_DONE_RIS 0x8U // DMA Done RIS
#define ESCSS_INTR_RIS_TIMEOUT_ERR_RIS 0x10U // PDI bus Timeout Error RIS
#define ESCSS_INTR_RIS_MASTER_RESET_RIS 0x20U // ECAT RESET RIS
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_INTR_MASK register
//
//*************************************************************************************************
#define ESCSS_INTR_MASK_SYNC0_MASK 0x1U // SYNC0 feature Mask
#define ESCSS_INTR_MASK_SYNC1_MASK 0x2U // SYNC1 feature Mask
#define ESCSS_INTR_MASK_IRQ_MASK 0x4U // EtherCATSS IRQ Mask
#define ESCSS_INTR_MASK_DMA_DONE_MASK 0x8U // DMA Done Mask
#define ESCSS_INTR_MASK_TIMEOUT_ERR_MASK 0x10U // PDI Access Timeout Error Mask
#define ESCSS_INTR_MASK_MASTER_RESET_MASK 0x20U // EtherCAT Master Reset Mask
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_INTR_MIS register
//
//*************************************************************************************************
#define ESCSS_INTR_MIS_SYNC0_MIS 0x1U // SYNC0 feature MIS
#define ESCSS_INTR_MIS_SYNC1_MIS 0x2U // SYNC1 feature MIS
#define ESCSS_INTR_MIS_IRQ_MIS 0x4U // EtherCATSS IRQ MIS
#define ESCSS_INTR_MIS_DMA_DONE_MIS 0x8U // DMA Done MIS
#define ESCSS_INTR_MIS_TIMEOUT_ERR_MIS 0x10U // PDI bus Timeout Error MIS
#define ESCSS_INTR_MIS_MASTER_RESET_MIS 0x20U // EtherCAT Master Reset MIS
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_INTR_CLR register
//
//*************************************************************************************************
#define ESCSS_INTR_CLR_SYNC0_CLR 0x1U // SYNC0 feature Clear
#define ESCSS_INTR_CLR_SYNC1_CLR 0x2U // SYNC1 feature Clear
#define ESCSS_INTR_CLR_IRQ_CLR 0x4U // EtherCATSS IRQ Clear
#define ESCSS_INTR_CLR_DMA_DONE_CLR 0x8U // DMA Done Clear
#define ESCSS_INTR_CLR_TIMEOUT_ERR_CLR 0x10U // PDI Access Timeout Error Clear
#define ESCSS_INTR_CLR_MASTER_RESET_CLR 0x20U // EtherCAT Master Reset Clear
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_INTR_SET register
//
//*************************************************************************************************
#define ESCSS_INTR_SET_SYNC0_SET 0x1U // SYNC0 Set Emulate
#define ESCSS_INTR_SET_SYNC1_SET 0x2U // SYNC1 Set Emulate
#define ESCSS_INTR_SET_IRQ_SET 0x4U // EtherCATSS IRQ Set Emulate
#define ESCSS_INTR_SET_DMA_DONE_SET 0x8U // DMA Done Set Emulate
#define ESCSS_INTR_SET_TIMEOUT_ERR_SET 0x10U // PDI Access Timeout Error Set Emulate
#define ESCSS_INTR_SET_MASTER_RESET_SET 0x20U // EtherCAT Master Reset Emulate
#define ESCSS_INTR_SET_WRITE_KEY_S 8U
#define ESCSS_INTR_SET_WRITE_KEY_M 0xFF00U // Key to enable writing lock
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_LATCH_SEL register
//
//*************************************************************************************************
#define ESCSS_LATCH_SEL_LATCH0_SELECT_S 0U
#define ESCSS_LATCH_SEL_LATCH0_SELECT_M 0x1FU // LATCH0 Inputs mux select
#define ESCSS_LATCH_SEL_LATCH1_SELECT_S 8U
#define ESCSS_LATCH_SEL_LATCH1_SELECT_M 0x1F00U // LATCH1 Inputs mux select
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_ACCESS_CTRL register
//
//*************************************************************************************************
#define ESCSS_ACCESS_CTRL_WAIT_STATES_S 0U
#define ESCSS_ACCESS_CTRL_WAIT_STATES_M 0x7FU // Minimum Wait States for
// VBUS Bridge
#define ESCSS_ACCESS_CTRL_EN_TIMEOUT 0x80U // PDI Timeout enable
#define ESCSS_ACCESS_CTRL_ENABLE_DEBUG_ACCESS 0x200U // Debug access enable
#define ESCSS_ACCESS_CTRL_ENABLE_PARALLEL_PORT_ACCESS 0x400U // Parallel port access enable
#define ESCSS_ACCESS_CTRL_TIMEOUT_COUNT_S 16U
#define ESCSS_ACCESS_CTRL_TIMEOUT_COUNT_M 0xFFF0000U // Max timecount programmed
// and count while enabled.
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_GPIN_GRP_CAP_SEL register
//
//*************************************************************************************************
#define ESCSS_GPIN_GRP_CAP_SEL_GPI_GRP_CAP_SEL0_S 0U
#define ESCSS_GPIN_GRP_CAP_SEL_GPI_GRP_CAP_SEL0_M 0x7U // GPI7-0 capture trigger select
#define ESCSS_GPIN_GRP_CAP_SEL_GPI_GRP_CAP_SEL1_S 4U
#define ESCSS_GPIN_GRP_CAP_SEL_GPI_GRP_CAP_SEL1_M 0x70U // GPI15-8 capture trigger select
#define ESCSS_GPIN_GRP_CAP_SEL_GPI_GRP_CAP_SEL2_S 8U
#define ESCSS_GPIN_GRP_CAP_SEL_GPI_GRP_CAP_SEL2_M 0x700U // GPI23-16 capture trigger select
#define ESCSS_GPIN_GRP_CAP_SEL_GPI_GRP_CAP_SEL3_S 12U
#define ESCSS_GPIN_GRP_CAP_SEL_GPI_GRP_CAP_SEL3_M 0x7000U // GPI31-24 capture trigger select
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_GPOUT_GRP_CAP_SEL register
//
//*************************************************************************************************
#define ESCSS_GPOUT_GRP_CAP_SEL_GPO_GRP_CAP_SEL0_S 0U
#define ESCSS_GPOUT_GRP_CAP_SEL_GPO_GRP_CAP_SEL0_M 0x3U // GPO7-0 capture trigger select
#define ESCSS_GPOUT_GRP_CAP_SEL_GPO_GRP_CAP_SEL1_S 4U
#define ESCSS_GPOUT_GRP_CAP_SEL_GPO_GRP_CAP_SEL1_M 0x30U // GPO15-8 capture trigger select
#define ESCSS_GPOUT_GRP_CAP_SEL_GPO_GRP_CAP_SEL2_S 8U
#define ESCSS_GPOUT_GRP_CAP_SEL_GPO_GRP_CAP_SEL2_M 0x300U // GPO23-16 capture trigger select
#define ESCSS_GPOUT_GRP_CAP_SEL_GPO_GRP_CAP_SEL3_S 12U
#define ESCSS_GPOUT_GRP_CAP_SEL_GPO_GRP_CAP_SEL3_M 0x3000U // GPO31-24 capture trigger select
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_MEM_TEST register
//
//*************************************************************************************************
#define ESCSS_MEM_TEST_INITIATE_MEM_INIT 0x1U // Initialize memory init
#define ESCSS_MEM_TEST_MEM_INIT_DONE 0x2U // Memory Init done status
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_RESET_DEST_CONFIG register
//
//*************************************************************************************************
#define ESCSS_RESET_DEST_CONFIG_CPU_RESET_EN 0x1U // CPU reset enable for ResetOut
#define ESCSS_RESET_DEST_CONFIG_CPU_NMI_EN 0x2U // CPU NMI enable for ResetOut
#define ESCSS_RESET_DEST_CONFIG_CPU_INT_EN 0x4U // CPU Interrupt enable for ResetOut
#define ESCSS_RESET_DEST_CONFIG_DEVICE_RESET_EN 0x80U // Enables RESET_OUT to impact the
// device reset
#define ESCSS_RESET_DEST_CONFIG_WRITE_KEY_S 8U
#define ESCSS_RESET_DEST_CONFIG_WRITE_KEY_M 0xFF00U // Key to enable writing lock
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_SYNC0_CONFIG register
//
//*************************************************************************************************
#define ESCSS_SYNC0_CONFIG_C28X_PIE_EN 0x1U // Connects the SYNC0 to C28x PIE Interrupt
#define ESCSS_SYNC0_CONFIG_CLA_INT_EN 0x2U // Connects the SYNC0 to CLA Interrupt
#define ESCSS_SYNC0_CONFIG_C28X_DMA_EN 0x4U // Connects the SYNC0 to C28x DMA Trigger
#define ESCSS_SYNC0_CONFIG_CM4_NVIC_EN 0x8U // Connects the SYNC0 to CM4 NVIC Interrupt
#define ESCSS_SYNC0_CONFIG_UDMA_TRIG_EN 0x10U // Connects the SYNC0 to uDMA Trigger
#define ESCSS_SYNC0_CONFIG_WRITE_KEY_S 8U
#define ESCSS_SYNC0_CONFIG_WRITE_KEY_M 0xFF00U // Key to enable writing lock
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_SYNC1_CONFIG register
//
//*************************************************************************************************
#define ESCSS_SYNC1_CONFIG_C28X_PIE_EN 0x1U // Connects the SYNC1 to C28x PIE Interrupt
#define ESCSS_SYNC1_CONFIG_CLA_INT_EN 0x2U // Connects the SYNC1 to CLA Interrupt
#define ESCSS_SYNC1_CONFIG_C28X_DMA_EN 0x4U // Connects the SYNC1 to C28x DMA Trigger
#define ESCSS_SYNC1_CONFIG_CM4_NVIC_EN 0x8U // Connects the SYNC1 to CM4 NVIC Interrupt
#define ESCSS_SYNC1_CONFIG_UDMA_TRIG_EN 0x10U // Connects the SYNC1 to uDMA Trigger
#define ESCSS_SYNC1_CONFIG_WRITE_KEY_S 8U
#define ESCSS_SYNC1_CONFIG_WRITE_KEY_M 0xFF00U // Key to enable writing lock
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_CONFIG_LOCK register
//
//*************************************************************************************************
#define ESCSS_CONFIG_LOCK_LOCK_ENABLE 0x1U // Locking writes to ECATSS
#define ESCSS_CONFIG_LOCK_IO_CONFIG_ENABLE 0x10U // Locking the IO Configuration
#define ESCSS_CONFIG_LOCK_WRITE_KEY_S 8U
#define ESCSS_CONFIG_LOCK_WRITE_KEY_M 0xFF00U // Key to enable writing lock
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_MISC_IO_CONFIG register
//
//*************************************************************************************************
#define ESCSS_MISC_IO_CONFIG_RESETIN_GPIO_EN 0x1U // Enabled ResetIN from GPIO
#define ESCSS_MISC_IO_CONFIG_EEPROM_I2C_IO_EN 0x2U // Enables the EEPROM I2C IOPAD
// connection
#define ESCSS_MISC_IO_CONFIG_WRITE_KEY_S 8U
#define ESCSS_MISC_IO_CONFIG_WRITE_KEY_M 0xFF00U // Key to enable writing lock
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_PHY_IO_CONFIG register
//
//*************************************************************************************************
#define ESCSS_PHY_IO_CONFIG_PHY_PORT_CNT_S 2U
#define ESCSS_PHY_IO_CONFIG_PHY_PORT_CNT_M 0xCU // Number of PHY port counts
#define ESCSS_PHY_IO_CONFIG_PHY_INTF_IOPAD_SEL_S 4U
#define ESCSS_PHY_IO_CONFIG_PHY_INTF_IOPAD_SEL_M 0x30U // IO Combination select for PHY
// Interface
#define ESCSS_PHY_IO_CONFIG_TX_CLK_AUTO_COMP 0x40U // Selects TX_CLK IO to do Auto
// compensation
#define ESCSS_PHY_IO_CONFIG_WRITE_KEY_S 8U
#define ESCSS_PHY_IO_CONFIG_WRITE_KEY_M 0xFF00U // Key to enable writing lock
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_SYNC_IO_CONFIG register
//
//*************************************************************************************************
#define ESCSS_SYNC_IO_CONFIG_SYNC0_IOPAD_SEL_S 0U
#define ESCSS_SYNC_IO_CONFIG_SYNC0_IOPAD_SEL_M 0x3U // SYNC0 IO PAD select option
#define ESCSS_SYNC_IO_CONFIG_SYNC0_GPIO_EN 0x8U // SYNC0 connection to OUT pad enabled
#define ESCSS_SYNC_IO_CONFIG_SYNC1_IOPAD_SEL_S 4U
#define ESCSS_SYNC_IO_CONFIG_SYNC1_IOPAD_SEL_M 0x30U // SYNC1 IO PAD select option
#define ESCSS_SYNC_IO_CONFIG_SYNC1_GPIO_EN 0x80U // SYNC1 connection to OUT pad enabled
#define ESCSS_SYNC_IO_CONFIG_WRITE_KEY_S 8U
#define ESCSS_SYNC_IO_CONFIG_WRITE_KEY_M 0xFF00U // Key to enable writing lock
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_LATCH_IO_CONFIG register
//
//*************************************************************************************************
#define ESCSS_LATCH_IO_CONFIG_LATCH0_IOPAD_SEL_S 0U
#define ESCSS_LATCH_IO_CONFIG_LATCH0_IOPAD_SEL_M 0x3U // LATCH0 IO PAD select option
#define ESCSS_LATCH_IO_CONFIG_LATCH0_GPIO_EN 0x8U // LATCH0 connection to IN pad enabled
#define ESCSS_LATCH_IO_CONFIG_LATCH1_IOPAD_SEL_S 4U
#define ESCSS_LATCH_IO_CONFIG_LATCH1_IOPAD_SEL_M 0x30U // LATCH1 IO PAD select option
#define ESCSS_LATCH_IO_CONFIG_LATCH1_GPIO_EN 0x80U // LATCH1 connection to IN pad enabled
#define ESCSS_LATCH_IO_CONFIG_WRITE_KEY_S 8U
#define ESCSS_LATCH_IO_CONFIG_WRITE_KEY_M 0xFF00U // Key to enable writing lock
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_LED_CONFIG register
//
//*************************************************************************************************
#define ESCSS_LED_CONFIG_LINKACT0 0x1U // GPIO enable for LINKACT0 LED
#define ESCSS_LED_CONFIG_LINKACT1 0x2U // GPIO enable for LINKACT1 LED
#define ESCSS_LED_CONFIG_STATE 0x4U // GPIO enable for STATE LED
#define ESCSS_LED_CONFIG_ERR 0x8U // GPIO enable for ERR LED
#define ESCSS_LED_CONFIG_RUN 0x10U // GPIO enable for RUN LED
#define ESCSS_LED_CONFIG_LINKACT0_IOPAD_SEL_S 6U
#define ESCSS_LED_CONFIG_LINKACT0_IOPAD_SEL_M 0xC0U // LINKACT0 LED IO PAD select
#define ESCSS_LED_CONFIG_LINKACT1_IOPAD_SEL_S 8U
#define ESCSS_LED_CONFIG_LINKACT1_IOPAD_SEL_M 0x300U // LINKACT1 LED IO PAD select
#define ESCSS_LED_CONFIG_STATE_IOPAD_SEL_S 10U
#define ESCSS_LED_CONFIG_STATE_IOPAD_SEL_M 0xC00U // STATE LED IO PAD select
#define ESCSS_LED_CONFIG_ERR_IOPAD_SEL_S 12U
#define ESCSS_LED_CONFIG_ERR_IOPAD_SEL_M 0x3000U // ERROR LED IO PAD select
#define ESCSS_LED_CONFIG_RUN_IOPAD_SEL_S 14U
#define ESCSS_LED_CONFIG_RUN_IOPAD_SEL_M 0xC000U // RUN LED IO PAD select
//*************************************************************************************************
//
// The following are defines for the bit fields in the ESCSS_MISC_CONFIG register
//
//*************************************************************************************************
#define ESCSS_MISC_CONFIG_TX0_SHIFT_CONFIG_S 0U
#define ESCSS_MISC_CONFIG_TX0_SHIFT_CONFIG_M 0x3U // TX Shift configuration for Port0
#define ESCSS_MISC_CONFIG_TX1_SHIFT_CONFIG_S 2U
#define ESCSS_MISC_CONFIG_TX1_SHIFT_CONFIG_M 0xCU // TX Shift configuration for Port1
#define ESCSS_MISC_CONFIG_EEPROM_SIZE 0x10U // EEPROM Size bound select
#define ESCSS_MISC_CONFIG_PDI_EMULATION 0x20U // PDI Emulation enable
#define ESCSS_MISC_CONFIG_PHY_ADDR_S 6U
#define ESCSS_MISC_CONFIG_PHY_ADDR_M 0x7C0U // PHY Address Offset
#endif
@@ -0,0 +1,275 @@
//###########################################################################
//
// FILE: hw_flash.h
//
// TITLE: Definitions for the FLASH registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_FLASH_H
#define HW_FLASH_H
//*************************************************************************************************
//
// The following are defines for the FLASH register offsets
//
//*************************************************************************************************
#define FLASH_O_FRDCNTL 0x0U // Flash Read Control Register
#define FLASH_O_FBAC 0x3CU // Flash Bank Access Control Register
#define FLASH_O_FBFALLBACK 0x40U // Flash Bank Fallback Power Register
#define FLASH_O_FBPRDY 0x44U // Flash Bank Pump Ready Register
#define FLASH_O_FPAC1 0x48U // Flash Pump Access Control Register 1
#define FLASH_O_FMSTAT 0x54U // Flash Module Status Register
#define FLASH_O_FRD_INTF_CTRL_LOCK 0x2FCU // Lock register for FLASH_CTRL_REGS (Not including
// FRD_INTF_CTRL_LOCK ).
#define FLASH_O_FRD_INTF_CTRL 0x300U // Flash Read Interface Control Register
#define FLASH_O_ECC_ENABLE 0x0U // ECC Enable
#define FLASH_O_SINGLE_ERR_ADDR_LOW 0x4U // Single Error Address Low
#define FLASH_O_SINGLE_ERR_ADDR_HIGH 0x8U // Single Error Address High
#define FLASH_O_UNC_ERR_ADDR_LOW 0xCU // Uncorrectable Error Address Low
#define FLASH_O_UNC_ERR_ADDR_HIGH 0x10U // Uncorrectable Error Address High
#define FLASH_O_ERR_STATUS 0x14U // Error Status
#define FLASH_O_ERR_POS 0x18U // Error Position
#define FLASH_O_ERR_STATUS_CLR 0x1CU // Error Status Clear
#define FLASH_O_ERR_CNT 0x20U // Error Control
#define FLASH_O_ERR_THRESHOLD 0x24U // Error Threshold
#define FLASH_O_ERR_INTFLG 0x28U // Error Interrupt Flag
#define FLASH_O_ERR_INTCLR 0x2CU // Error Interrupt Flag Clear
#define FLASH_O_FDATAH_TEST 0x30U // Data High Test
#define FLASH_O_FDATAL_TEST 0x34U // Data Low Test
#define FLASH_O_FADDR_TEST 0x38U // ECC Test Address
#define FLASH_O_FECC_TEST 0x3CU // ECC Test Address
#define FLASH_O_FECC_CTRL 0x40U // ECC Control
#define FLASH_O_FOUTH_TEST 0x44U // Test Data Out High
#define FLASH_O_FOUTL_TEST 0x48U // Test Data Out Low
#define FLASH_O_FECC_STATUS 0x4CU // ECC Status
#define FLASH_O_ECC_REGS_LOCK 0x7CU // Lock register for FLASH_ECC_REGS (Not including
// FLASH_ECC_REGS_LOCK ).
//*************************************************************************************************
//
// The following are defines for the bit fields in the FRDCNTL register
//
//*************************************************************************************************
#define FLASH_FRDCNTL_RWAIT_S 8U
#define FLASH_FRDCNTL_RWAIT_M 0xF00U // Random Read Waitstate
//*************************************************************************************************
//
// The following are defines for the bit fields in the FBAC register
//
//*************************************************************************************************
#define FLASH_FBAC_BAGP_S 8U
#define FLASH_FBAC_BAGP_M 0xFF00U // Bank Active Grace Period
//*************************************************************************************************
//
// The following are defines for the bit fields in the FBFALLBACK register
//
//*************************************************************************************************
#define FLASH_FBFALLBACK_BNKPWR0_S 0U
#define FLASH_FBFALLBACK_BNKPWR0_M 0x3U // Bank Power Mode of BANK0
//*************************************************************************************************
//
// The following are defines for the bit fields in the FBPRDY register
//
//*************************************************************************************************
#define FLASH_FBPRDY_BANKRDY 0x1U // Flash Bank Active Power State
#define FLASH_FBPRDY_PUMPRDY 0x8000U // Flash Pump Active Power Mode
//*************************************************************************************************
//
// The following are defines for the bit fields in the FPAC1 register
//
//*************************************************************************************************
#define FLASH_FPAC1_PMPPWR 0x1U // Charge Pump Fallback Power Mode
#define FLASH_FPAC1_PSLEEP_S 16U
#define FLASH_FPAC1_PSLEEP_M 0xFFF0000U // Pump Sleep Down Count
//*************************************************************************************************
//
// The following are defines for the bit fields in the FMSTAT register
//
//*************************************************************************************************
#define FLASH_FMSTAT_PSUSP 0x2U // Program Suspend.
#define FLASH_FMSTAT_ESUSP 0x4U // Erase Suspend.
#define FLASH_FMSTAT_VOLTSTAT 0x8U // Core Voltage Status.
#define FLASH_FMSTAT_CSTAT 0x10U // Command Status.
#define FLASH_FMSTAT_INVDAT 0x20U // Invalid Data.
#define FLASH_FMSTAT_PGM 0x40U // Program Active.
#define FLASH_FMSTAT_ERS 0x80U // Erase Active.
#define FLASH_FMSTAT_BUSY 0x100U // Busy Bit.
#define FLASH_FMSTAT_EV 0x400U // Erase verify
#define FLASH_FMSTAT_PGV 0x1000U // Program verify
//*************************************************************************************************
//
// The following are defines for the bit fields in the FRD_INTF_CTRL register
//
//*************************************************************************************************
#define FLASH_FRD_INTF_CTRL_PROG_CACHE_EN 0x1U // Program Cache Enable
#define FLASH_FRD_INTF_CTRL_DATA_CACHE_EN 0x2U // Data Cache Enable
//*************************************************************************************************
//
// The following are defines for the bit fields in the ECC_ENABLE register
//
//*************************************************************************************************
#define FLASH_ECC_ENABLE_ENABLE_S 0U
#define FLASH_ECC_ENABLE_ENABLE_M 0xFU // Enable ECC
//*************************************************************************************************
//
// The following are defines for the bit fields in the ERR_STATUS register
//
//*************************************************************************************************
#define FLASH_ERR_STATUS_FAIL_0_L 0x1U // Lower 64bits Single Bit Error Corrected Value 0
#define FLASH_ERR_STATUS_FAIL_1_L 0x2U // Lower 64bits Single Bit Error Corrected Value 1
#define FLASH_ERR_STATUS_UNC_ERR_L 0x4U // Lower 64 bits Uncorrectable error occurred
#define FLASH_ERR_STATUS_FAIL_0_H 0x10000U // Upper 64bits Single Bit Error Corrected Value 0
#define FLASH_ERR_STATUS_FAIL_1_H 0x20000U // Upper 64bits Single Bit Error Corrected Value 1
#define FLASH_ERR_STATUS_UNC_ERR_H 0x40000U // Upper 64 bits Uncorrectable error occurred
//*************************************************************************************************
//
// The following are defines for the bit fields in the ERR_POS register
//
//*************************************************************************************************
#define FLASH_ERR_POS_ERR_POS_L_S 0U
#define FLASH_ERR_POS_ERR_POS_L_M 0x3FU // Bit Position of Single bit Error in lower 64
// bits
#define FLASH_ERR_POS_ERR_TYPE_L 0x100U // Error Type in lower 64 bits
#define FLASH_ERR_POS_ERR_POS_H_S 16U
#define FLASH_ERR_POS_ERR_POS_H_M 0x3F0000U // Bit Position of Single bit Error in upper 64
// bits
#define FLASH_ERR_POS_ERR_TYPE_H 0x1000000U // Error Type in upper 64 bits
//*************************************************************************************************
//
// The following are defines for the bit fields in the ERR_STATUS_CLR register
//
//*************************************************************************************************
#define FLASH_ERR_STATUS_CLR_FAIL_0_L_CLR 0x1U // Lower 64bits Single Bit Error Corrected
// Value 0 Clear
#define FLASH_ERR_STATUS_CLR_FAIL_1_L_CLR 0x2U // Lower 64bits Single Bit Error Corrected
// Value 1 Clear
#define FLASH_ERR_STATUS_CLR_UNC_ERR_L_CLR 0x4U // Lower 64 bits Uncorrectable error
// occurred Clear
#define FLASH_ERR_STATUS_CLR_FAIL_0_H_CLR 0x10000U // Upper 64bits Single Bit Error Corrected
// Value 0 Clear
#define FLASH_ERR_STATUS_CLR_FAIL_1_H_CLR 0x20000U // Upper 64bits Single Bit Error Corrected
// Value 1 Clear
#define FLASH_ERR_STATUS_CLR_UNC_ERR_H_CLR 0x40000U // Upper 64 bits Uncorrectable error
// occurred Clear
//*************************************************************************************************
//
// The following are defines for the bit fields in the ERR_CNT register
//
//*************************************************************************************************
#define FLASH_ERR_CNT_ERR_CNT_S 0U
#define FLASH_ERR_CNT_ERR_CNT_M 0xFFFFU // Error counter
//*************************************************************************************************
//
// The following are defines for the bit fields in the ERR_THRESHOLD register
//
//*************************************************************************************************
#define FLASH_ERR_THRESHOLD_ERR_THRESHOLD_S 0U
#define FLASH_ERR_THRESHOLD_ERR_THRESHOLD_M 0xFFFFU // Error Threshold
//*************************************************************************************************
//
// The following are defines for the bit fields in the ERR_INTFLG register
//
//*************************************************************************************************
#define FLASH_ERR_INTFLG_SINGLE_ERR_INTFLG 0x1U // Single Error Interrupt Flag
#define FLASH_ERR_INTFLG_UNC_ERR_INTFLG 0x2U // Uncorrectable Interrupt Flag
//*************************************************************************************************
//
// The following are defines for the bit fields in the ERR_INTCLR register
//
//*************************************************************************************************
#define FLASH_ERR_INTCLR_SINGLE_ERR_INTCLR 0x1U // Single Error Interrupt Flag Clear
#define FLASH_ERR_INTCLR_UNC_ERR_INTCLR 0x2U // Uncorrectable Interrupt Flag Clear
//*************************************************************************************************
//
// The following are defines for the bit fields in the FADDR_TEST register
//
//*************************************************************************************************
#define FLASH_FADDR_TEST_ADDRL_S 3U
#define FLASH_FADDR_TEST_ADDRL_M 0xFFF8U // ECC Address Low
#define FLASH_FADDR_TEST_ADDRH_S 16U
#define FLASH_FADDR_TEST_ADDRH_M 0x3F0000U // ECC Address High
//*************************************************************************************************
//
// The following are defines for the bit fields in the FECC_TEST register
//
//*************************************************************************************************
#define FLASH_FECC_TEST_ECC_S 0U
#define FLASH_FECC_TEST_ECC_M 0xFFU // ECC Control Bits
//*************************************************************************************************
//
// The following are defines for the bit fields in the FECC_CTRL register
//
//*************************************************************************************************
#define FLASH_FECC_CTRL_ECC_TEST_EN 0x1U // Enable ECC Test Logic
#define FLASH_FECC_CTRL_ECC_SELECT 0x2U // ECC Bit Select
#define FLASH_FECC_CTRL_DO_ECC_CALC 0x4U // Enable ECC Calculation
//*************************************************************************************************
//
// The following are defines for the bit fields in the FECC_STATUS register
//
//*************************************************************************************************
#define FLASH_FECC_STATUS_SINGLE_ERR 0x1U // Test Result is Single Bit Error
#define FLASH_FECC_STATUS_UNC_ERR 0x2U // Test Result is Uncorrectable Error
#define FLASH_FECC_STATUS_DATA_ERR_POS_S 2U
#define FLASH_FECC_STATUS_DATA_ERR_POS_M 0xFCU // Holds Bit Position of Error
#define FLASH_FECC_STATUS_ERR_TYPE 0x100U // Holds Bit Position of 8 Check Bits of Error
#endif
@@ -0,0 +1,83 @@
//###########################################################################
//
// FILE: hw_gcrc.h
//
// TITLE: Definitions for the GCRC registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_GCRC_H
#define HW_GCRC_H
//*************************************************************************************************
//
// The following are defines for the GCRC register offsets
//
//*************************************************************************************************
#define GCRC_O_CRCCTRL 0x0U // CRC Control Register
#define GCRC_O_CRCPOLY 0x4U // CRC Polynomial Register
#define GCRC_O_CRCDATAMASK 0x8U // CRC Data Mask Register
#define GCRC_O_CRCDATAIN 0xCU // CRC Data Input Register
#define GCRC_O_CRCDATAOUT 0x10U // CRC Data Output Register
#define GCRC_O_CRCDATATRANS 0x14U // CRC Transformed Data Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the CRCCTRL register
//
//*************************************************************************************************
#define GCRC_CRCCTRL_POLYSIZE_S 0U
#define GCRC_CRCCTRL_POLYSIZE_M 0x3FU // CRC polynomial order
#define GCRC_CRCCTRL_ENDIANNESS 0x40U // Defines the endianness of the data stream.
#define GCRC_CRCCTRL_BITREVERSE 0x80U // Enables the DATAIN bus to the CRC engine to be bit
// reversed.
#define GCRC_CRCCTRL_DATATYPE_S 8U
#define GCRC_CRCCTRL_DATATYPE_M 0x300U // Defines the DATATYPE of the element of the data
// array.
//*************************************************************************************************
//
// The following are defines for the bit fields in the CRCDATAMASK register
//
//*************************************************************************************************
#define GCRC_CRCDATAMASK_DATAMASK_S 0U
#define GCRC_CRCDATAMASK_DATAMASK_M 0x1FU // Number of bits to be masked
#endif
@@ -0,0 +1,909 @@
//###########################################################################
//
// FILE: hw_gpio.h
//
// TITLE: Definitions for the GPIO registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_GPIO_H
#define HW_GPIO_H
//*************************************************************************************************
//
// The following are defines for the GPIO register offsets
//
//*************************************************************************************************
#define GPIO_O_GPADAT 0x0U // GPIO A Data Register (GPIO0 to 31)
#define GPIO_O_GPASET 0x4U // GPIO A Data Set Register (GPIO0 to 31)
#define GPIO_O_GPACLEAR 0x8U // GPIO A Data Clear Register (GPIO0 to 31)
#define GPIO_O_GPATOGGLE 0xCU // GPIO A Data Toggle Register (GPIO0 to 31)
#define GPIO_O_GPBDAT 0x10U // GPIO B Data Register (GPIO32 to 63)
#define GPIO_O_GPBSET 0x14U // GPIO B Data Set Register (GPIO32 to 63)
#define GPIO_O_GPBCLEAR 0x18U // GPIO B Data Clear Register (GPIO32 to 63)
#define GPIO_O_GPBTOGGLE 0x1CU // GPIO B Data Toggle Register (GPIO32 to 63)
#define GPIO_O_GPCDAT 0x20U // GPIO C Data Register (GPIO64 to 95)
#define GPIO_O_GPCSET 0x24U // GPIO C Data Set Register (GPIO64 to 95)
#define GPIO_O_GPCCLEAR 0x28U // GPIO C Data Clear Register (GPIO64 to 95)
#define GPIO_O_GPCTOGGLE 0x2CU // GPIO C Data Toggle Register (GPIO64 to 95)
#define GPIO_O_GPDDAT 0x30U // GPIO D Data Register (GPIO96 to 127)
#define GPIO_O_GPDSET 0x34U // GPIO D Data Set Register (GPIO96 to 127)
#define GPIO_O_GPDCLEAR 0x38U // GPIO D Data Clear Register (GPIO96 to 127)
#define GPIO_O_GPDTOGGLE 0x3CU // GPIO D Data Toggle Register (GPIO96 to 127)
#define GPIO_O_GPEDAT 0x40U // GPIO E Data Register (GPIO128 to 159)
#define GPIO_O_GPESET 0x44U // GPIO E Data Set Register (GPIO128 to 159)
#define GPIO_O_GPECLEAR 0x48U // GPIO E Data Clear Register (GPIO128 to 159)
#define GPIO_O_GPETOGGLE 0x4CU // GPIO E Data Toggle Register (GPIO128 to 159)
#define GPIO_O_GPFDAT 0x50U // GPIO F Data Register (GPIO160 to 191)
#define GPIO_O_GPFSET 0x54U // GPIO F Data Set Register (GPIO160 to 191)
#define GPIO_O_GPFCLEAR 0x58U // GPIO F Data Clear Register (GPIO160 to 191)
#define GPIO_O_GPFTOGGLE 0x5CU // GPIO F Data Toggle Register (GPIO160 to 191)
#define GPIO_O_GPADAT_R 0x0U // GPIO A Data Read Register
#define GPIO_O_GPBDAT_R 0x4U // GPIO B Data Read Register
#define GPIO_O_GPCDAT_R 0x8U // GPIO C Data Read Register
#define GPIO_O_GPDDAT_R 0xCU // GPIO D Data Read Register
#define GPIO_O_GPEDAT_R 0x10U // GPIO E Data Read Register
#define GPIO_O_GPFDAT_R 0x14U // GPIO F Data Read Register
#define GPIO_O_GPGDAT_R 0x18U // GPIO G Data Read Register
#define GPIO_O_GPHDAT_R 0x1CU // GPIO H Data Read Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPADAT register
//
//*************************************************************************************************
#define GPIO_GPADAT_GPIO0 0x1U // Data Register for this pin
#define GPIO_GPADAT_GPIO1 0x2U // Data Register for this pin
#define GPIO_GPADAT_GPIO2 0x4U // Data Register for this pin
#define GPIO_GPADAT_GPIO3 0x8U // Data Register for this pin
#define GPIO_GPADAT_GPIO4 0x10U // Data Register for this pin
#define GPIO_GPADAT_GPIO5 0x20U // Data Register for this pin
#define GPIO_GPADAT_GPIO6 0x40U // Data Register for this pin
#define GPIO_GPADAT_GPIO7 0x80U // Data Register for this pin
#define GPIO_GPADAT_GPIO8 0x100U // Data Register for this pin
#define GPIO_GPADAT_GPIO9 0x200U // Data Register for this pin
#define GPIO_GPADAT_GPIO10 0x400U // Data Register for this pin
#define GPIO_GPADAT_GPIO11 0x800U // Data Register for this pin
#define GPIO_GPADAT_GPIO12 0x1000U // Data Register for this pin
#define GPIO_GPADAT_GPIO13 0x2000U // Data Register for this pin
#define GPIO_GPADAT_GPIO14 0x4000U // Data Register for this pin
#define GPIO_GPADAT_GPIO15 0x8000U // Data Register for this pin
#define GPIO_GPADAT_GPIO16 0x10000U // Data Register for this pin
#define GPIO_GPADAT_GPIO17 0x20000U // Data Register for this pin
#define GPIO_GPADAT_GPIO18 0x40000U // Data Register for this pin
#define GPIO_GPADAT_GPIO19 0x80000U // Data Register for this pin
#define GPIO_GPADAT_GPIO20 0x100000U // Data Register for this pin
#define GPIO_GPADAT_GPIO21 0x200000U // Data Register for this pin
#define GPIO_GPADAT_GPIO22 0x400000U // Data Register for this pin
#define GPIO_GPADAT_GPIO23 0x800000U // Data Register for this pin
#define GPIO_GPADAT_GPIO24 0x1000000U // Data Register for this pin
#define GPIO_GPADAT_GPIO25 0x2000000U // Data Register for this pin
#define GPIO_GPADAT_GPIO26 0x4000000U // Data Register for this pin
#define GPIO_GPADAT_GPIO27 0x8000000U // Data Register for this pin
#define GPIO_GPADAT_GPIO28 0x10000000U // Data Register for this pin
#define GPIO_GPADAT_GPIO29 0x20000000U // Data Register for this pin
#define GPIO_GPADAT_GPIO30 0x40000000U // Data Register for this pin
#define GPIO_GPADAT_GPIO31 0x80000000U // Data Register for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPASET register
//
//*************************************************************************************************
#define GPIO_GPASET_GPIO0 0x1U // Output Set bit for this pin
#define GPIO_GPASET_GPIO1 0x2U // Output Set bit for this pin
#define GPIO_GPASET_GPIO2 0x4U // Output Set bit for this pin
#define GPIO_GPASET_GPIO3 0x8U // Output Set bit for this pin
#define GPIO_GPASET_GPIO4 0x10U // Output Set bit for this pin
#define GPIO_GPASET_GPIO5 0x20U // Output Set bit for this pin
#define GPIO_GPASET_GPIO6 0x40U // Output Set bit for this pin
#define GPIO_GPASET_GPIO7 0x80U // Output Set bit for this pin
#define GPIO_GPASET_GPIO8 0x100U // Output Set bit for this pin
#define GPIO_GPASET_GPIO9 0x200U // Output Set bit for this pin
#define GPIO_GPASET_GPIO10 0x400U // Output Set bit for this pin
#define GPIO_GPASET_GPIO11 0x800U // Output Set bit for this pin
#define GPIO_GPASET_GPIO12 0x1000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO13 0x2000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO14 0x4000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO15 0x8000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO16 0x10000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO17 0x20000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO18 0x40000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO19 0x80000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO20 0x100000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO21 0x200000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO22 0x400000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO23 0x800000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO24 0x1000000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO25 0x2000000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO26 0x4000000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO27 0x8000000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO28 0x10000000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO29 0x20000000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO30 0x40000000U // Output Set bit for this pin
#define GPIO_GPASET_GPIO31 0x80000000U // Output Set bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPACLEAR register
//
//*************************************************************************************************
#define GPIO_GPACLEAR_GPIO0 0x1U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO1 0x2U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO2 0x4U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO3 0x8U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO4 0x10U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO5 0x20U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO6 0x40U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO7 0x80U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO8 0x100U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO9 0x200U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO10 0x400U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO11 0x800U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO12 0x1000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO13 0x2000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO14 0x4000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO15 0x8000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO16 0x10000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO17 0x20000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO18 0x40000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO19 0x80000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO20 0x100000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO21 0x200000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO22 0x400000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO23 0x800000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO24 0x1000000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO25 0x2000000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO26 0x4000000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO27 0x8000000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO28 0x10000000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO29 0x20000000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO30 0x40000000U // Output Clear bit for this pin
#define GPIO_GPACLEAR_GPIO31 0x80000000U // Output Clear bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPATOGGLE register
//
//*************************************************************************************************
#define GPIO_GPATOGGLE_GPIO0 0x1U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO1 0x2U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO2 0x4U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO3 0x8U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO4 0x10U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO5 0x20U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO6 0x40U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO7 0x80U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO8 0x100U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO9 0x200U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO10 0x400U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO11 0x800U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO12 0x1000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO13 0x2000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO14 0x4000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO15 0x8000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO16 0x10000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO17 0x20000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO18 0x40000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO19 0x80000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO20 0x100000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO21 0x200000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO22 0x400000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO23 0x800000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO24 0x1000000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO25 0x2000000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO26 0x4000000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO27 0x8000000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO28 0x10000000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO29 0x20000000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO30 0x40000000U // Output Toggle bit for this pin
#define GPIO_GPATOGGLE_GPIO31 0x80000000U // Output Toggle bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPBDAT register
//
//*************************************************************************************************
#define GPIO_GPBDAT_GPIO32 0x1U // Data Register for this pin
#define GPIO_GPBDAT_GPIO33 0x2U // Data Register for this pin
#define GPIO_GPBDAT_GPIO34 0x4U // Data Register for this pin
#define GPIO_GPBDAT_GPIO35 0x8U // Data Register for this pin
#define GPIO_GPBDAT_GPIO36 0x10U // Data Register for this pin
#define GPIO_GPBDAT_GPIO37 0x20U // Data Register for this pin
#define GPIO_GPBDAT_GPIO38 0x40U // Data Register for this pin
#define GPIO_GPBDAT_GPIO39 0x80U // Data Register for this pin
#define GPIO_GPBDAT_GPIO40 0x100U // Data Register for this pin
#define GPIO_GPBDAT_GPIO41 0x200U // Data Register for this pin
#define GPIO_GPBDAT_GPIO42 0x400U // Data Register for this pin
#define GPIO_GPBDAT_GPIO43 0x800U // Data Register for this pin
#define GPIO_GPBDAT_GPIO44 0x1000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO45 0x2000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO46 0x4000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO47 0x8000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO48 0x10000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO49 0x20000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO50 0x40000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO51 0x80000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO52 0x100000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO53 0x200000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO54 0x400000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO55 0x800000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO56 0x1000000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO57 0x2000000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO58 0x4000000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO59 0x8000000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO60 0x10000000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO61 0x20000000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO62 0x40000000U // Data Register for this pin
#define GPIO_GPBDAT_GPIO63 0x80000000U // Data Register for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPBSET register
//
//*************************************************************************************************
#define GPIO_GPBSET_GPIO32 0x1U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO33 0x2U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO34 0x4U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO35 0x8U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO36 0x10U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO37 0x20U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO38 0x40U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO39 0x80U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO40 0x100U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO41 0x200U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO42 0x400U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO43 0x800U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO44 0x1000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO45 0x2000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO46 0x4000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO47 0x8000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO48 0x10000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO49 0x20000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO50 0x40000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO51 0x80000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO52 0x100000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO53 0x200000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO54 0x400000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO55 0x800000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO56 0x1000000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO57 0x2000000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO58 0x4000000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO59 0x8000000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO60 0x10000000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO61 0x20000000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO62 0x40000000U // Output Set bit for this pin
#define GPIO_GPBSET_GPIO63 0x80000000U // Output Set bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPBCLEAR register
//
//*************************************************************************************************
#define GPIO_GPBCLEAR_GPIO32 0x1U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO33 0x2U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO34 0x4U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO35 0x8U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO36 0x10U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO37 0x20U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO38 0x40U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO39 0x80U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO40 0x100U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO41 0x200U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO42 0x400U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO43 0x800U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO44 0x1000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO45 0x2000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO46 0x4000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO47 0x8000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO48 0x10000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO49 0x20000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO50 0x40000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO51 0x80000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO52 0x100000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO53 0x200000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO54 0x400000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO55 0x800000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO56 0x1000000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO57 0x2000000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO58 0x4000000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO59 0x8000000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO60 0x10000000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO61 0x20000000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO62 0x40000000U // Output Clear bit for this pin
#define GPIO_GPBCLEAR_GPIO63 0x80000000U // Output Clear bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPBTOGGLE register
//
//*************************************************************************************************
#define GPIO_GPBTOGGLE_GPIO32 0x1U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO33 0x2U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO34 0x4U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO35 0x8U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO36 0x10U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO37 0x20U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO38 0x40U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO39 0x80U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO40 0x100U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO41 0x200U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO42 0x400U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO43 0x800U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO44 0x1000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO45 0x2000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO46 0x4000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO47 0x8000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO48 0x10000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO49 0x20000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO50 0x40000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO51 0x80000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO52 0x100000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO53 0x200000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO54 0x400000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO55 0x800000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO56 0x1000000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO57 0x2000000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO58 0x4000000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO59 0x8000000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO60 0x10000000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO61 0x20000000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO62 0x40000000U // Output Toggle bit for this pin
#define GPIO_GPBTOGGLE_GPIO63 0x80000000U // Output Toggle bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPCDAT register
//
//*************************************************************************************************
#define GPIO_GPCDAT_GPIO64 0x1U // Data Register for this pin
#define GPIO_GPCDAT_GPIO65 0x2U // Data Register for this pin
#define GPIO_GPCDAT_GPIO66 0x4U // Data Register for this pin
#define GPIO_GPCDAT_GPIO67 0x8U // Data Register for this pin
#define GPIO_GPCDAT_GPIO68 0x10U // Data Register for this pin
#define GPIO_GPCDAT_GPIO69 0x20U // Data Register for this pin
#define GPIO_GPCDAT_GPIO70 0x40U // Data Register for this pin
#define GPIO_GPCDAT_GPIO71 0x80U // Data Register for this pin
#define GPIO_GPCDAT_GPIO72 0x100U // Data Register for this pin
#define GPIO_GPCDAT_GPIO73 0x200U // Data Register for this pin
#define GPIO_GPCDAT_GPIO74 0x400U // Data Register for this pin
#define GPIO_GPCDAT_GPIO75 0x800U // Data Register for this pin
#define GPIO_GPCDAT_GPIO76 0x1000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO77 0x2000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO78 0x4000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO79 0x8000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO80 0x10000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO81 0x20000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO82 0x40000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO83 0x80000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO84 0x100000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO85 0x200000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO86 0x400000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO87 0x800000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO88 0x1000000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO89 0x2000000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO90 0x4000000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO91 0x8000000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO92 0x10000000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO93 0x20000000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO94 0x40000000U // Data Register for this pin
#define GPIO_GPCDAT_GPIO95 0x80000000U // Data Register for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPCSET register
//
//*************************************************************************************************
#define GPIO_GPCSET_GPIO64 0x1U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO65 0x2U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO66 0x4U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO67 0x8U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO68 0x10U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO69 0x20U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO70 0x40U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO71 0x80U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO72 0x100U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO73 0x200U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO74 0x400U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO75 0x800U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO76 0x1000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO77 0x2000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO78 0x4000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO79 0x8000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO80 0x10000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO81 0x20000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO82 0x40000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO83 0x80000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO84 0x100000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO85 0x200000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO86 0x400000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO87 0x800000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO88 0x1000000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO89 0x2000000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO90 0x4000000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO91 0x8000000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO92 0x10000000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO93 0x20000000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO94 0x40000000U // Output Set bit for this pin
#define GPIO_GPCSET_GPIO95 0x80000000U // Output Set bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPCCLEAR register
//
//*************************************************************************************************
#define GPIO_GPCCLEAR_GPIO64 0x1U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO65 0x2U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO66 0x4U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO67 0x8U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO68 0x10U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO69 0x20U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO70 0x40U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO71 0x80U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO72 0x100U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO73 0x200U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO74 0x400U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO75 0x800U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO76 0x1000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO77 0x2000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO78 0x4000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO79 0x8000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO80 0x10000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO81 0x20000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO82 0x40000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO83 0x80000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO84 0x100000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO85 0x200000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO86 0x400000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO87 0x800000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO88 0x1000000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO89 0x2000000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO90 0x4000000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO91 0x8000000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO92 0x10000000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO93 0x20000000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO94 0x40000000U // Output Clear bit for this pin
#define GPIO_GPCCLEAR_GPIO95 0x80000000U // Output Clear bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPCTOGGLE register
//
//*************************************************************************************************
#define GPIO_GPCTOGGLE_GPIO64 0x1U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO65 0x2U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO66 0x4U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO67 0x8U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO68 0x10U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO69 0x20U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO70 0x40U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO71 0x80U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO72 0x100U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO73 0x200U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO74 0x400U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO75 0x800U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO76 0x1000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO77 0x2000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO78 0x4000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO79 0x8000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO80 0x10000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO81 0x20000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO82 0x40000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO83 0x80000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO84 0x100000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO85 0x200000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO86 0x400000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO87 0x800000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO88 0x1000000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO89 0x2000000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO90 0x4000000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO91 0x8000000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO92 0x10000000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO93 0x20000000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO94 0x40000000U // Output Toggle bit for this pin
#define GPIO_GPCTOGGLE_GPIO95 0x80000000U // Output Toggle bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPDDAT register
//
//*************************************************************************************************
#define GPIO_GPDDAT_GPIO96 0x1U // Data Register for this pin
#define GPIO_GPDDAT_GPIO97 0x2U // Data Register for this pin
#define GPIO_GPDDAT_GPIO98 0x4U // Data Register for this pin
#define GPIO_GPDDAT_GPIO99 0x8U // Data Register for this pin
#define GPIO_GPDDAT_GPIO100 0x10U // Data Register for this pin
#define GPIO_GPDDAT_GPIO101 0x20U // Data Register for this pin
#define GPIO_GPDDAT_GPIO102 0x40U // Data Register for this pin
#define GPIO_GPDDAT_GPIO103 0x80U // Data Register for this pin
#define GPIO_GPDDAT_GPIO104 0x100U // Data Register for this pin
#define GPIO_GPDDAT_GPIO105 0x200U // Data Register for this pin
#define GPIO_GPDDAT_GPIO106 0x400U // Data Register for this pin
#define GPIO_GPDDAT_GPIO107 0x800U // Data Register for this pin
#define GPIO_GPDDAT_GPIO108 0x1000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO109 0x2000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO110 0x4000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO111 0x8000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO112 0x10000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO113 0x20000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO114 0x40000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO115 0x80000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO116 0x100000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO117 0x200000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO118 0x400000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO119 0x800000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO120 0x1000000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO121 0x2000000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO122 0x4000000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO123 0x8000000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO124 0x10000000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO125 0x20000000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO126 0x40000000U // Data Register for this pin
#define GPIO_GPDDAT_GPIO127 0x80000000U // Data Register for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPDSET register
//
//*************************************************************************************************
#define GPIO_GPDSET_GPIO96 0x1U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO97 0x2U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO98 0x4U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO99 0x8U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO100 0x10U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO101 0x20U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO102 0x40U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO103 0x80U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO104 0x100U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO105 0x200U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO106 0x400U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO107 0x800U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO108 0x1000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO109 0x2000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO110 0x4000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO111 0x8000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO112 0x10000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO113 0x20000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO114 0x40000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO115 0x80000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO116 0x100000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO117 0x200000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO118 0x400000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO119 0x800000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO120 0x1000000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO121 0x2000000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO122 0x4000000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO123 0x8000000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO124 0x10000000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO125 0x20000000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO126 0x40000000U // Output Set bit for this pin
#define GPIO_GPDSET_GPIO127 0x80000000U // Output Set bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPDCLEAR register
//
//*************************************************************************************************
#define GPIO_GPDCLEAR_GPIO96 0x1U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO97 0x2U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO98 0x4U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO99 0x8U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO100 0x10U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO101 0x20U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO102 0x40U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO103 0x80U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO104 0x100U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO105 0x200U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO106 0x400U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO107 0x800U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO108 0x1000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO109 0x2000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO110 0x4000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO111 0x8000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO112 0x10000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO113 0x20000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO114 0x40000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO115 0x80000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO116 0x100000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO117 0x200000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO118 0x400000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO119 0x800000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO120 0x1000000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO121 0x2000000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO122 0x4000000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO123 0x8000000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO124 0x10000000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO125 0x20000000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO126 0x40000000U // Output Clear bit for this pin
#define GPIO_GPDCLEAR_GPIO127 0x80000000U // Output Clear bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPDTOGGLE register
//
//*************************************************************************************************
#define GPIO_GPDTOGGLE_GPIO96 0x1U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO97 0x2U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO98 0x4U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO99 0x8U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO100 0x10U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO101 0x20U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO102 0x40U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO103 0x80U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO104 0x100U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO105 0x200U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO106 0x400U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO107 0x800U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO108 0x1000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO109 0x2000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO110 0x4000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO111 0x8000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO112 0x10000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO113 0x20000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO114 0x40000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO115 0x80000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO116 0x100000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO117 0x200000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO118 0x400000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO119 0x800000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO120 0x1000000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO121 0x2000000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO122 0x4000000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO123 0x8000000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO124 0x10000000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO125 0x20000000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO126 0x40000000U // Output Toggle bit for this pin
#define GPIO_GPDTOGGLE_GPIO127 0x80000000U // Output Toggle bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPEDAT register
//
//*************************************************************************************************
#define GPIO_GPEDAT_GPIO128 0x1U // Data Register for this pin
#define GPIO_GPEDAT_GPIO129 0x2U // Data Register for this pin
#define GPIO_GPEDAT_GPIO130 0x4U // Data Register for this pin
#define GPIO_GPEDAT_GPIO131 0x8U // Data Register for this pin
#define GPIO_GPEDAT_GPIO132 0x10U // Data Register for this pin
#define GPIO_GPEDAT_GPIO133 0x20U // Data Register for this pin
#define GPIO_GPEDAT_GPIO134 0x40U // Data Register for this pin
#define GPIO_GPEDAT_GPIO135 0x80U // Data Register for this pin
#define GPIO_GPEDAT_GPIO136 0x100U // Data Register for this pin
#define GPIO_GPEDAT_GPIO137 0x200U // Data Register for this pin
#define GPIO_GPEDAT_GPIO138 0x400U // Data Register for this pin
#define GPIO_GPEDAT_GPIO139 0x800U // Data Register for this pin
#define GPIO_GPEDAT_GPIO140 0x1000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO141 0x2000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO142 0x4000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO143 0x8000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO144 0x10000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO145 0x20000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO146 0x40000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO147 0x80000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO148 0x100000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO149 0x200000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO150 0x400000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO151 0x800000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO152 0x1000000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO153 0x2000000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO154 0x4000000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO155 0x8000000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO156 0x10000000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO157 0x20000000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO158 0x40000000U // Data Register for this pin
#define GPIO_GPEDAT_GPIO159 0x80000000U // Data Register for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPESET register
//
//*************************************************************************************************
#define GPIO_GPESET_GPIO128 0x1U // Output Set bit for this pin
#define GPIO_GPESET_GPIO129 0x2U // Output Set bit for this pin
#define GPIO_GPESET_GPIO130 0x4U // Output Set bit for this pin
#define GPIO_GPESET_GPIO131 0x8U // Output Set bit for this pin
#define GPIO_GPESET_GPIO132 0x10U // Output Set bit for this pin
#define GPIO_GPESET_GPIO133 0x20U // Output Set bit for this pin
#define GPIO_GPESET_GPIO134 0x40U // Output Set bit for this pin
#define GPIO_GPESET_GPIO135 0x80U // Output Set bit for this pin
#define GPIO_GPESET_GPIO136 0x100U // Output Set bit for this pin
#define GPIO_GPESET_GPIO137 0x200U // Output Set bit for this pin
#define GPIO_GPESET_GPIO138 0x400U // Output Set bit for this pin
#define GPIO_GPESET_GPIO139 0x800U // Output Set bit for this pin
#define GPIO_GPESET_GPIO140 0x1000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO141 0x2000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO142 0x4000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO143 0x8000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO144 0x10000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO145 0x20000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO146 0x40000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO147 0x80000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO148 0x100000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO149 0x200000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO150 0x400000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO151 0x800000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO152 0x1000000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO153 0x2000000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO154 0x4000000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO155 0x8000000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO156 0x10000000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO157 0x20000000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO158 0x40000000U // Output Set bit for this pin
#define GPIO_GPESET_GPIO159 0x80000000U // Output Set bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPECLEAR register
//
//*************************************************************************************************
#define GPIO_GPECLEAR_GPIO128 0x1U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO129 0x2U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO130 0x4U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO131 0x8U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO132 0x10U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO133 0x20U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO134 0x40U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO135 0x80U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO136 0x100U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO137 0x200U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO138 0x400U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO139 0x800U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO140 0x1000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO141 0x2000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO142 0x4000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO143 0x8000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO144 0x10000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO145 0x20000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO146 0x40000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO147 0x80000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO148 0x100000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO149 0x200000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO150 0x400000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO151 0x800000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO152 0x1000000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO153 0x2000000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO154 0x4000000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO155 0x8000000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO156 0x10000000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO157 0x20000000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO158 0x40000000U // Output Clear bit for this pin
#define GPIO_GPECLEAR_GPIO159 0x80000000U // Output Clear bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPETOGGLE register
//
//*************************************************************************************************
#define GPIO_GPETOGGLE_GPIO128 0x1U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO129 0x2U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO130 0x4U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO131 0x8U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO132 0x10U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO133 0x20U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO134 0x40U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO135 0x80U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO136 0x100U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO137 0x200U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO138 0x400U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO139 0x800U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO140 0x1000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO141 0x2000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO142 0x4000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO143 0x8000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO144 0x10000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO145 0x20000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO146 0x40000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO147 0x80000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO148 0x100000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO149 0x200000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO150 0x400000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO151 0x800000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO152 0x1000000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO153 0x2000000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO154 0x4000000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO155 0x8000000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO156 0x10000000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO157 0x20000000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO158 0x40000000U // Output Toggle bit for this pin
#define GPIO_GPETOGGLE_GPIO159 0x80000000U // Output Toggle bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPFDAT register
//
//*************************************************************************************************
#define GPIO_GPFDAT_GPIO160 0x1U // Data Register for this pin
#define GPIO_GPFDAT_GPIO161 0x2U // Data Register for this pin
#define GPIO_GPFDAT_GPIO162 0x4U // Data Register for this pin
#define GPIO_GPFDAT_GPIO163 0x8U // Data Register for this pin
#define GPIO_GPFDAT_GPIO164 0x10U // Data Register for this pin
#define GPIO_GPFDAT_GPIO165 0x20U // Data Register for this pin
#define GPIO_GPFDAT_GPIO166 0x40U // Data Register for this pin
#define GPIO_GPFDAT_GPIO167 0x80U // Data Register for this pin
#define GPIO_GPFDAT_GPIO168 0x100U // Data Register for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPFSET register
//
//*************************************************************************************************
#define GPIO_GPFSET_GPIO160 0x1U // Output Set bit for this pin
#define GPIO_GPFSET_GPIO161 0x2U // Output Set bit for this pin
#define GPIO_GPFSET_GPIO162 0x4U // Output Set bit for this pin
#define GPIO_GPFSET_GPIO163 0x8U // Output Set bit for this pin
#define GPIO_GPFSET_GPIO164 0x10U // Output Set bit for this pin
#define GPIO_GPFSET_GPIO165 0x20U // Output Set bit for this pin
#define GPIO_GPFSET_GPIO166 0x40U // Output Set bit for this pin
#define GPIO_GPFSET_GPIO167 0x80U // Output Set bit for this pin
#define GPIO_GPFSET_GPIO168 0x100U // Output Set bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPFCLEAR register
//
//*************************************************************************************************
#define GPIO_GPFCLEAR_GPIO160 0x1U // Output Clear bit for this pin
#define GPIO_GPFCLEAR_GPIO161 0x2U // Output Clear bit for this pin
#define GPIO_GPFCLEAR_GPIO162 0x4U // Output Clear bit for this pin
#define GPIO_GPFCLEAR_GPIO163 0x8U // Output Clear bit for this pin
#define GPIO_GPFCLEAR_GPIO164 0x10U // Output Clear bit for this pin
#define GPIO_GPFCLEAR_GPIO165 0x20U // Output Clear bit for this pin
#define GPIO_GPFCLEAR_GPIO166 0x40U // Output Clear bit for this pin
#define GPIO_GPFCLEAR_GPIO167 0x80U // Output Clear bit for this pin
#define GPIO_GPFCLEAR_GPIO168 0x100U // Output Clear bit for this pin
//*************************************************************************************************
//
// The following are defines for the bit fields in the GPFTOGGLE register
//
//*************************************************************************************************
#define GPIO_GPFTOGGLE_GPIO160 0x1U // Output Toggle bit for this pin
#define GPIO_GPFTOGGLE_GPIO161 0x2U // Output Toggle bit for this pin
#define GPIO_GPFTOGGLE_GPIO162 0x4U // Output Toggle bit for this pin
#define GPIO_GPFTOGGLE_GPIO163 0x8U // Output Toggle bit for this pin
#define GPIO_GPFTOGGLE_GPIO164 0x10U // Output Toggle bit for this pin
#define GPIO_GPFTOGGLE_GPIO165 0x20U // Output Toggle bit for this pin
#define GPIO_GPFTOGGLE_GPIO166 0x40U // Output Toggle bit for this pin
#define GPIO_GPFTOGGLE_GPIO167 0x80U // Output Toggle bit for this pin
#define GPIO_GPFTOGGLE_GPIO168 0x100U // Output Toggle bit for this pin
#endif
@@ -0,0 +1,431 @@
//###########################################################################
//
// FILE: hw_i2c.h
//
// TITLE: Definitions for the I2C registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_I2C_H
#define HW_I2C_H
//*************************************************************************************************
//
// The following are defines for the I2C register offsets
//
//*************************************************************************************************
#define I2C_O_MSA 0x0U // I2C Master Slave Address
#define I2C_O_MCS 0x4U // I2C Master Control/Status
#define I2C_O_MDR 0x8U // I2C Master Data
#define I2C_O_MTPR 0xCU // I2C Master Timer Period
#define I2C_O_MIMR 0x10U // I2C Master Interrupt Mask
#define I2C_O_MRIS 0x14U // I2C Master Raw Interrupt Status
#define I2C_O_MMIS 0x18U // I2C Master Masked Interrupt Status
#define I2C_O_MICR 0x1CU // I2C Master Interrupt Clear
#define I2C_O_MCR 0x20U // I2C Master Configuration
#define I2C_O_MCLKOCNT 0x24U // I2C Master Clock Low Timeout Count
#define I2C_O_MBMON 0x2CU // I2C Master Bus Monitor
#define I2C_O_MBLEN 0x30U // I2C Master Burst Length
#define I2C_O_MBCNT 0x34U // I2C Master Burst Count
#define I2C_O_SOAR 0x800U // I2C Slave Own Address
#define I2C_O_SCSR 0x804U // I2C Slave Control/Status
#define I2C_O_SDR 0x808U // I2C Slave Data
#define I2C_O_SIMR 0x80CU // I2C Slave Interrupt Mask
#define I2C_O_SRIS 0x810U // I2C Slave Raw Interrupt Status
#define I2C_O_SMIS 0x814U // I2C Slave Masked Interrupt Status
#define I2C_O_SICR 0x818U // I2C Slave Interrupt Clear
#define I2C_O_SOAR2 0x81CU // I2C Slave Own Address 2
#define I2C_O_SACKCTL 0x820U // I2C Slave ACK Control
#define I2C_O_FIFODATARX 0xF00U // I2C FIFO Data RX
#define I2C_O_FIFOCTL 0xF04U // I2C FIFO Control
#define I2C_O_FIFOSTATUS 0xF08U // I2C FIFO Status
#define I2C_O_PP 0xFC0U // I2C Peripheral Properties
#define I2C_O_PC 0xFC4U // I2C Peripheral Configuration
#define I2C_O_MCS_WRITE 0x4U // I2C Master Control/Status
#define I2C_O_SCSR_WRITE 0x804U // I2C Slave Control/Status
#define I2C_O_FIFODATATX 0xF00U // I2C FIFO Data TX
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CMSA register
//
//*************************************************************************************************
#define I2C_MSA_RS 0x1U // Receive/Send
#define I2C_MSA_SA_S 1U
#define I2C_MSA_SA_M 0xFEU // I2C Slave Address
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CMCS register
//
//*************************************************************************************************
#define I2C_MCS_BUSY 0x1U // I2C Busy
#define I2C_MCS_ERROR 0x2U // Error
#define I2C_MCS_ADRACK 0x4U // Acknowledge Address
#define I2C_MCS_DATACK 0x8U // Acknowledge Data
#define I2C_MCS_ARBLST 0x10U // Arbitration Lost
#define I2C_MCS_IDLE 0x20U // I2C Idle
#define I2C_MCS_BUSBSY 0x40U // Bus Busy
#define I2C_MCS_CLKTO 0x80U // Clock Timeout Error
#define I2C_MCS_ACTDMATX 0x40000000U // DMA TX Active Status
#define I2C_MCS_ACTDMARX 0x80000000U // DMA RX Active Status
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CMDR register
//
//*************************************************************************************************
#define I2C_MDR_DATA_S 0U
#define I2C_MDR_DATA_M 0xFFU // Data transmitted/received
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CMTPR register
//
//*************************************************************************************************
#define I2C_MTPR_TPR_S 0U
#define I2C_MTPR_TPR_M 0x7FU // Timer Period
#define I2C_MTPR_HS 0x80U // High-Speed Enable
#define I2C_MTPR_PULSEL_S 16U
#define I2C_MTPR_PULSEL_M 0x70000U // Glitch Suppression Pulse Width
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CMIMR register
//
//*************************************************************************************************
#define I2C_MIMR_IM 0x1U // Master Interrupt Mask
#define I2C_MIMR_CLKIM 0x2U // Clock Timeout Interrupt Mask
#define I2C_MIMR_DMARXIM 0x4U // Receive DMA Interrupt Mask
#define I2C_MIMR_DMATXIM 0x8U // Transmit DMA Interrupt Mask
#define I2C_MIMR_NACKIM 0x10U // Address/Data NACK Interrupt Mask
#define I2C_MIMR_STARTIM 0x20U // START Detection Interrupt Mask
#define I2C_MIMR_STOPIM 0x40U // STOP Detection Interrupt Mask
#define I2C_MIMR_ARBLOSTIM 0x80U // Arbitration Lost Interrupt Mask
#define I2C_MIMR_TXIM 0x100U // Transmit FIFO Request Interrupt Mask
#define I2C_MIMR_RXIM 0x200U // Receive FIFO Request Interrupt Mask
#define I2C_MIMR_TXFEIM 0x400U // Transmit FIFO Empty Interrupt Mask
#define I2C_MIMR_RXFFIM 0x800U // Receive FIFO Full Interrupt Mask
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CMRIS register
//
//*************************************************************************************************
#define I2C_MRIS_RIS 0x1U // Master Raw Interrupt Status
#define I2C_MRIS_CLKRIS 0x2U // Clock Timeout Raw Interrupt Status
#define I2C_MRIS_DMARXRIS 0x4U // Receive DMA Raw Interrupt Status
#define I2C_MRIS_DMATXRIS 0x8U // Transmit DMA Raw Interrupt Status
#define I2C_MRIS_NACKRIS 0x10U // Address/Data NACK Raw Interrupt Status
#define I2C_MRIS_STARTRIS 0x20U // START Detection Raw Interrupt Status
#define I2C_MRIS_STOPRIS 0x40U // STOP Detection Raw Interrupt Status
#define I2C_MRIS_ARBLOSTRIS 0x80U // Arbitration Lost Raw Interrupt Status
#define I2C_MRIS_TXRIS 0x100U // Transmit Request Raw Interrupt Status
#define I2C_MRIS_RXRIS 0x200U // Receive FIFO Request Raw Interrupt Status
#define I2C_MRIS_TXFERIS 0x400U // Transmit FIFO Empty Raw Interrupt Status
#define I2C_MRIS_RXFFRIS 0x800U // Receive FIFO Full Raw Interrupt Status
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CMMIS register
//
//*************************************************************************************************
#define I2C_MMIS_MIS 0x1U // Masked Interrupt Status
#define I2C_MMIS_CLKMIS 0x2U // Clock Timeout Masked Interrupt Status
#define I2C_MMIS_DMARXMIS 0x4U // Receive DMA Interrupt Status
#define I2C_MMIS_DMATXMIS 0x8U // Transmit DMA Interrupt Status
#define I2C_MMIS_NACKMIS 0x10U // Address/Data NACK Interrupt Mask
#define I2C_MMIS_STARTMIS 0x20U // START Detection Interrupt Mask
#define I2C_MMIS_STOPMIS 0x40U // STOP Detection Interrupt Mask
#define I2C_MMIS_ARBLOSTMIS 0x80U // Arbitration Lost Interrupt Mask
#define I2C_MMIS_TXMIS 0x100U // Transmit Request Interrupt Mask
#define I2C_MMIS_RXMIS 0x200U // Receive FIFO Request Interrupt Mask
#define I2C_MMIS_TXFEMIS 0x400U // Transmit FIFO Empty Interrupt Mask
#define I2C_MMIS_RXFFMIS 0x800U // Receive FIFO Full Interrupt Mask
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CMICR register
//
//*************************************************************************************************
#define I2C_MICR_IC 0x1U // Master Interrupt Clear
#define I2C_MICR_CLKIC 0x2U // Clock Timeout Interrupt Clear
#define I2C_MICR_DMARXIC 0x4U // Receive DMA Interrupt Clear
#define I2C_MICR_DMATXIC 0x8U // Transmit DMA Interrupt Clear
#define I2C_MICR_NACKIC 0x10U // Address/Data NACK Interrupt Clear
#define I2C_MICR_STARTIC 0x20U // START Detection Interrupt Clear
#define I2C_MICR_STOPIC 0x40U // STOP Detection Interrupt Clear
#define I2C_MICR_ARBLOSTIC 0x80U // Arbitration Lost Interrupt Clear
#define I2C_MICR_TXIC 0x100U // Transmit FIFO Request Interrupt Clear
#define I2C_MICR_RXIC 0x200U // Receive FIFO Request Interrupt Clear
#define I2C_MICR_TXFEIC 0x400U // Transmit FIFO Empty Interrupt Clear
#define I2C_MICR_RXFFIC 0x800U // Receive FIFO Full Interrupt Clear
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CMCR register
//
//*************************************************************************************************
#define I2C_MCR_LPBK 0x1U // I2C Loopback
#define I2C_MCR_MFE 0x10U // I2C Master Function Enable
#define I2C_MCR_SFE 0x20U // I2C Slave Function Enable
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CMCLKOCNT register
//
//*************************************************************************************************
#define I2C_MCLKOCNT_CNTL_S 0U
#define I2C_MCLKOCNT_CNTL_M 0xFFU // I2C Master Count
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CMBMON register
//
//*************************************************************************************************
#define I2C_MBMON_SCL 0x1U // I2C SCL Status
#define I2C_MBMON_SDA 0x2U // I2C SDA Status
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CMBLEN register
//
//*************************************************************************************************
#define I2C_MBLEN_CNTL_S 0U
#define I2C_MBLEN_CNTL_M 0xFFU // I2C Burst Length
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CMBCNT register
//
//*************************************************************************************************
#define I2C_MBCNT_CNTL_S 0U
#define I2C_MBCNT_CNTL_M 0xFFU // I2C Master Burst Count
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CSOAR register
//
//*************************************************************************************************
#define I2C_SOAR_OAR_S 0U
#define I2C_SOAR_OAR_M 0x7FU // I2C Slave Own Address
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CSCSR register
//
//*************************************************************************************************
#define I2C_SCSR_RREQ 0x1U // Receive Request
#define I2C_SCSR_TREQ 0x2U // Transmit Request
#define I2C_SCSR_FBR 0x4U // First Byte Received
#define I2C_SCSR_OAR2SEL 0x8U // OAR2 Address Matched
#define I2C_SCSR_QCMDST 0x10U // Quick Command Status
#define I2C_SCSR_QCMDRW 0x20U // Quick Command Read / Write
#define I2C_SCSR_ACTDMATX 0x40000000U // DMA TX Active Status
#define I2C_SCSR_ACTDMARX 0x80000000U // DMA RX Active Status
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CSDR register
//
//*************************************************************************************************
#define I2C_SDR_DATA_S 0U
#define I2C_SDR_DATA_M 0xFFU // Data for Transfer
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CSIMR register
//
//*************************************************************************************************
#define I2C_SIMR_DATAIM 0x1U // Data Interrupt Mask
#define I2C_SIMR_STARTIM 0x2U // Start Condition Interrupt Mask
#define I2C_SIMR_STOPIM 0x4U // Stop Condition Interrupt Mask
#define I2C_SIMR_DMARXIM 0x8U // Receive DMA Interrupt Mask
#define I2C_SIMR_DMATXIM 0x10U // Transmit DMA Interrupt Mask
#define I2C_SIMR_TXIM 0x20U // Transmit FIFO Request Interrupt Mask
#define I2C_SIMR_RXIM 0x40U // Receive FIFO Request Interrupt Mask
#define I2C_SIMR_TXFEIM 0x80U // Transmit FIFO Empty Interrupt Mask
#define I2C_SIMR_RXFFIM 0x100U // Receive FIFO Full Interrupt Mask
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CSRIS register
//
//*************************************************************************************************
#define I2C_SRIS_DATARIS 0x1U // Data Raw Interrupt Status
#define I2C_SRIS_STARTRIS 0x2U // Start Condition Raw Interrupt Status
#define I2C_SRIS_STOPRIS 0x4U // Stop Condition Raw Interrupt Status
#define I2C_SRIS_DMARXRIS 0x8U // Receive DMA Raw Interrupt Status
#define I2C_SRIS_DMATXRIS 0x10U // Transmit DMA Raw Interrupt Status
#define I2C_SRIS_TXRIS 0x20U // Transmit Request Raw Interrupt Status
#define I2C_SRIS_RXRIS 0x40U // Receive FIFO Request Raw Interrupt Status
#define I2C_SRIS_TXFERIS 0x80U // Transmit FIFO Empty Raw Interrupt Status
#define I2C_SRIS_RXFFRIS 0x100U // Receive FIFO Full Raw Interrupt Status
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CSMIS register
//
//*************************************************************************************************
#define I2C_SMIS_DATAMIS 0x1U // Data Masked Interrupt Status
#define I2C_SMIS_STARTMIS 0x2U // Start Condition Masked Interrupt Status
#define I2C_SMIS_STOPMIS 0x4U // Stop Condition Masked Interrupt Status
#define I2C_SMIS_DMARXMIS 0x8U // Receive DMA Masked Interrupt Status
#define I2C_SMIS_DMATXMIS 0x10U // Transmit DMA Masked Interrupt Status
#define I2C_SMIS_TXMIS 0x20U // Transmit FIFO Request Interrupt Mask
#define I2C_SMIS_RXMIS 0x40U // Receive FIFO Request Interrupt Mask
#define I2C_SMIS_TXFEMIS 0x80U // Transmit FIFO Empty Interrupt Mask
#define I2C_SMIS_RXFFMIS 0x100U // Receive FIFO Full Interrupt Mask
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CSICR register
//
//*************************************************************************************************
#define I2C_SICR_DATAIC 0x1U // Data Interrupt Clear
#define I2C_SICR_STARTIC 0x2U // Start Condition Interrupt Clear
#define I2C_SICR_STOPIC 0x4U // Stop Condition Interrupt Clear
#define I2C_SICR_DMARXIC 0x8U // Receive DMA Interrupt Clear
#define I2C_SICR_DMATXIC 0x10U // Transmit DMA Interrupt Clear
#define I2C_SICR_TXIC 0x20U // Transmit Request Interrupt Mask
#define I2C_SICR_RXIC 0x40U // Receive Request Interrupt Mask
#define I2C_SICR_TXFEIC 0x80U // Transmit FIFO Empty Interrupt Mask
#define I2C_SICR_RXFFIC 0x100U // Receive FIFO Full Interrupt Mask
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CSOAR2 register
//
//*************************************************************************************************
#define I2C_SOAR2_OAR2_S 0U
#define I2C_SOAR2_OAR2_M 0x7FU // I2C Slave Own Address 2
#define I2C_SOAR2_OAR2EN 0x80U // I2C Slave Own Address 2 Enable
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CSACKCTL register
//
//*************************************************************************************************
#define I2C_SACKCTL_ACKOEN 0x1U // I2C Slave ACK Override Enable
#define I2C_SACKCTL_ACKOVAL 0x2U // I2C Slave ACK Override Value
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CFIFODATARX register
//
//*************************************************************************************************
#define I2C_FIFODATARX_DATA_S 0U
#define I2C_FIFODATARX_DATA_M 0xFFU // I2C RX FIFO Read Data Byte
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CFIFOCTL register
//
//*************************************************************************************************
#define I2C_FIFOCTL_TXTRIG_S 0U
#define I2C_FIFOCTL_TXTRIG_M 0x7U // TX FIFO Trigger
#define I2C_FIFOCTL_DMATXENA 0x2000U // DMA TX Channel Enable
#define I2C_FIFOCTL_TXFLUSH 0x4000U // TX FIFO Flush
#define I2C_FIFOCTL_TXASGNMT 0x8000U // TX Control Assignment
#define I2C_FIFOCTL_RXTRIG_S 16U
#define I2C_FIFOCTL_RXTRIG_M 0x70000U // RX FIFO Trigger
#define I2C_FIFOCTL_DMARXENA 0x20000000U // DMA RX Channel Enable
#define I2C_FIFOCTL_RXFLUSH 0x40000000U // RX FIFO Flush
#define I2C_FIFOCTL_RXASGNMT 0x80000000U // RX Control Assignment
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CFIFOSTATUS register
//
//*************************************************************************************************
#define I2C_FIFOSTATUS_TXFE 0x1U // TX FIFO Empty
#define I2C_FIFOSTATUS_TXFF 0x2U // TX FIFO Full
#define I2C_FIFOSTATUS_TXBLWTRIG 0x4U // TX FIFO Below Trigger Level
#define I2C_FIFOSTATUS_RXFE 0x10000U // RX FIFO Empty
#define I2C_FIFOSTATUS_RXFF 0x20000U // RX FIFO Full
#define I2C_FIFOSTATUS_RXABVTRIG 0x40000U // RX FIFO Above Trigger Level
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CPP register
//
//*************************************************************************************************
#define I2C_PP_HS 0x1U // High-Speed Capable
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CPC register
//
//*************************************************************************************************
#define I2C_PC_HS 0x1U // High-Speed Capable
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CMCS_WRITE register
//
//*************************************************************************************************
#define I2C_MCS_WRITE_RUN 0x1U // I2C Master Enable
#define I2C_MCS_WRITE_START 0x2U // Generate START
#define I2C_MCS_WRITE_STOP 0x4U // Generate STOP
#define I2C_MCS_WRITE_ACK 0x8U // Data Acknowledge Enable
#define I2C_MCS_WRITE_HS 0x10U // High-Speed Enable
#define I2C_MCS_WRITE_QCMD 0x20U // Quick Command
#define I2C_MCS_WRITE_BURST 0x40U // Burst Enable
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CSCSR_WRITE register
//
//*************************************************************************************************
#define I2C_SCSR_WRITE_DA 0x1U // Device Active
#define I2C_SCSR_WRITE_TXFIFO 0x2U // TX FIFO Enable
#define I2C_SCSR_WRITE_RXFIFO 0x4U // RX FIFO Enable
//*************************************************************************************************
//
// The following are defines for the bit fields in the I2CFIFODATATX register
//
//*************************************************************************************************
#define I2C_FIFODATATX_DATA_S 0U
#define I2C_FIFODATATX_DATA_M 0xFFU // I2C TX FIFO Write Data Byte
#endif
@@ -0,0 +1,123 @@
//###########################################################################
//
// FILE: hw_ints.h
//
// TITLE: Macros that define the interrupt assignment.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_INTS_H
#define HW_INTS_H
//*****************************************************************************
// The following are defines for the fault assignments.
//*****************************************************************************
#define FAULT_NMI 2U // NMI
#define FAULT_HARD 3U // HardFault
#define FAULT_MPU 4U // MemManage
#define FAULT_BUS 5U // BusFault
#define FAULT_USAGE 6U // UsageFault
#define FAULT_SVCALL 11U // SVCall
#define FAULT_DEBUG 12U // Debug Monitor
#define FAULT_PENDSV 14U // PendSV
#define FAULT_SYSTICK 15U // SysTick
//*****************************************************************************
// The following are defines for the interrupt assignments.
//*****************************************************************************
#define INT_MCANSS_0 16U // MCANSS_0 Interrupt
#define INT_MCANSS_1 17U // MCANSS_1 Interrupt
#define INT_MCANSS_WAKE_AND_TS_PLS 18U // MCANSS_WAKE_AND_TS_PLS Interrupt
#define INT_MCANSS_ECC_CORR_PLS 19U // MCANSS_ECC_CORR_PLS Interrupt
#define INT_ECAT 21U // ECAT Interrupt
#define INT_ECAT_SYNC0 22U // ECAT_SYNC0 Interrupt
#define INT_ECAT_SYNC1 23U // ECAT_SYNC1 Interrupt
#define INT_ECAT_RST 24U // ECAT_RST Interrupt
#define INT_CANA0 25U // CANA0 Interrupt
#define INT_CANA1 26U // CANA1 Interrupt
#define INT_CANB0 27U // CANB0 Interrupt
#define INT_CANB1 28U // CANB1 Interrupt
#define INT_EMAC 29U // EMAC Interrupt
#define INT_EMAC_TX0 30U // EMAC_TX0 Interrupt
#define INT_EMAC_TX1 31U // EMAC_TX1 Interrupt
#define INT_EMAC_RX0 32U // EMAC_RX0 Interrupt
#define INT_EMAC_RX1 33U // EMAC_RX1 Interrupt
#define INT_UART0 34U // UART0 Interrupt
#define INT_SSI0 36U // SSI0 Interrupt
#define INT_I2C0 38U // I2C0 Interrupt
#define INT_USB0 40U // USB Interrupt
#define INT_UDMA_SW 41U // UDMA_SW Interrupt
#define INT_UDMA_ERR 42U // UDMA_ERR Interrupt
#define INT_CPU1TOCMIPC0 45U // CPU1TOCMIPC0 Interrupt
#define INT_CPU1TOCMIPC1 46U // CPU1TOCMIPC1 Interrupt
#define INT_CPU1TOCMIPC2 47U // CPU1TOCMIPC2 Interrupt
#define INT_CPU1TOCMIPC3 48U // CPU1TOCMIPC3 Interrupt
#define INT_CPU1TOCMIPC4 49U // CPU1TOCMIPC4 Interrupt
#define INT_CPU1TOCMIPC5 50U // CPU1TOCMIPC5 Interrupt
#define INT_CPU1TOCMIPC6 51U // CPU1TOCMIPC6 Interrupt
#define INT_CPU1TOCMIPC7 52U // CPU1TOCMIPC7 Interrupt
#define INT_CPU2TOCMIPC0 53U // CPU2TOCMIPC0 Interrupt
#define INT_CPU2TOCMIPC1 54U // CPU2TOCMIPC1 Interrupt
#define INT_CPU2TOCMIPC2 55U // CPU2TOCMIPC2 Interrupt
#define INT_CPU2TOCMIPC3 56U // CPU2TOCMIPC3 Interrupt
#define INT_CPU2TOCMIPC4 57U // CPU2TOCMIPC4 Interrupt
#define INT_CPU2TOCMIPC5 58U // CPU2TOCMIPC5 Interrupt
#define INT_CPU2TOCMIPC6 59U // CPU2TOCMIPC6 Interrupt
#define INT_CPU2TOCMIPC7 60U // CPU2TOCMIPC7 Interrupt
#define INT_FMC 61U // FMC Interrupt
#define INT_FMC_CORR_ERR 62U // FMC_CORR_ERR Interrupt
#define INT_AES 63U // AES Interrupt
#define INT_TIMER0 64U // TIMER0 Interrupt
#define INT_TIMER1 65U // TIMER1 Interrupt
#define INT_TIMER2 66U // TIMER2 Interrupt
#define INT_CMRAM_TESTERROR_LOG 67U // CMRAM_TESTERROR_LOG Interrupt
//*****************************************************************************
// The following are defines for the total number of interrupts.
//*****************************************************************************
#define NUM_INTERRUPTS 80U
//*****************************************************************************
// The following are defines for the total number of priority levels.
//*****************************************************************************
#define NUM_PRIORITY 8U
#define NUM_PRIORITY_BITS 3U
#endif // HW_INTS_H
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,449 @@
//###########################################################################
//
// FILE: hw_memcfg.h
//
// TITLE: Definitions for the MEMCFG registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_MEMCFG_H
#define HW_MEMCFG_H
//*************************************************************************************************
//
// The following are defines for the MEMCFG register offsets
//
//*************************************************************************************************
#define MEMCFG_O_CXLOCK 0x0U // C RAM Config Lock Register
#define MEMCFG_O_CXTEST 0x4U // C RAM TEST Register
#define MEMCFG_O_CXINIT 0x8U // C RAM Init Register
#define MEMCFG_O_CXINITDONE 0xCU // C RAM Initialization Status Register
#define MEMCFG_O_CMMSGXLOCK 0x20U // CM Messae RAM Config Lock Register
#define MEMCFG_O_CMMSGXTEST 0x24U // CM Messae RAM TEST Register
#define MEMCFG_O_CMMSGXINIT 0x28U // CM Messae RAM Init Register
#define MEMCFG_O_CMMSGXINITDONE 0x2CU // CM Messae RAM Initialization Status Register
#define MEMCFG_O_SXGROUP1_LOCK 0x40U // Group1 S and E RAM Config Lock Register
#define MEMCFG_O_SXGROUP1_TEST 0x44U // Group1 S and E RAM TEST Register
#define MEMCFG_O_SXGROUP1_INIT 0x48U // Group1 S and E RAM Init Register
#define MEMCFG_O_SXGROUP1_INITDONE 0x4CU // Group1 S and E RAM Initialization Status
// Register
#define MEMCFG_O_ROM_LOCK 0x80U // ROM Config Lock Register
#define MEMCFG_O_ROM_TEST 0x84U // ROM TEST Register
#define MEMCFG_O_ROM_FORCE_ERROR 0x88U // ROM Force Error register
#define MEMCFG_O_PERI_MEM_TEST_LOCK 0xA0U // Peripheral Memory Test Lock Register
#define MEMCFG_O_PERI_MEM_TEST_CONTROL 0xA4U // Peripheral Memory Test control Register
#define MEMCFG_O_UCERRFLG 0x0U // Uncorrectable Error Flag Register
#define MEMCFG_O_UCERRSET 0x4U // Uncorrectable Error Flag Set Register
#define MEMCFG_O_UCERRCLR 0x8U // Uncorrectable Error Flag Clear Register
#define MEMCFG_O_UCM4EADDR 0xCU // Uncorrectable M4 Error Address
#define MEMCFG_O_UCEMACEADDR 0x10U // Uncorrectable EMAC Error Address
#define MEMCFG_O_UCUDMAEADDR 0x14U // Uncorrectable uDMA Error Address
#define MEMCFG_O_UCETHERCATMEMREADDR 0x18U // Uncorrectable EtherCAT IP RAM Read Error Address
#define MEMCFG_O_UCEMACMEMREADDR 0x1CU // Uncorrectable EMAC IP RAM Read Error Address
#define MEMCFG_O_BUSFAULTFLG 0x50U // BusFault Flag register
#define MEMCFG_O_BUSFAULTCLR 0x54U // BusFault Flag clear register
#define MEMCFG_O_M4BUSFAULTADDR 0x58U // M4 busfault address
#define MEMCFG_O_UDMABUSFAULTADDR 0x5CU // uDMA busfault address
#define MEMCFG_O_EMACBUSFAULTADDR 0x60U // EMAC busfault address
#define MEMCFG_O_CERRFLG 0x80U // Correctable Error Flag Register
#define MEMCFG_O_CERRSET 0x84U // Correctable Error Flag Set Register
#define MEMCFG_O_CERRCLR 0x88U // Correctable Error Flag Clear Register
#define MEMCFG_O_CM4EADDR 0x8CU // Correctable M4 Error Address
#define MEMCFG_O_CEMACEADDR 0x90U // Correctable EMAC Error Address
#define MEMCFG_O_CUDMAEADDR 0x94U // Correctable uDMA Error Address
#define MEMCFG_O_CERRCNT 0xC0U // Correctable Error Count Register
#define MEMCFG_O_CERRTHRES 0xC4U // Correctable Error Threshold Value Register
#define MEMCFG_O_CEINTFLG 0xC8U // Correctable Error Interrupt Flag Status Register
#define MEMCFG_O_CEINTSET 0xCCU // Correctable Error Interrupt Flag Set Register
#define MEMCFG_O_CEINTCLR 0xD0U // Correctable Error Interrupt Flag Clear Register
#define MEMCFG_O_CEINTEN 0xD4U // Correctable Error Interrupt Enable Register
#define MEMCFG_O_DIAGERRFLG 0x0U // Error Flag Register
#define MEMCFG_O_DIAGERRCLR 0x8U // Error Flag Clear Register
#define MEMCFG_O_DIAGERRADDR 0xCU // Read Error Address
//*************************************************************************************************
//
// The following are defines for the bit fields in the CxLOCK register
//
//*************************************************************************************************
#define MEMCFG_CXLOCK_LOCK_C0 0x1U // C0 RAM Lock bits
#define MEMCFG_CXLOCK_LOCK_C1 0x2U // C1 RAM Lock bits
//*************************************************************************************************
//
// The following are defines for the bit fields in the CxTEST register
//
//*************************************************************************************************
#define MEMCFG_CXTEST_TEST_C0_S 0U
#define MEMCFG_CXTEST_TEST_C0_M 0x3U // Selects the different modes for C0 RAM
#define MEMCFG_CXTEST_TEST_C1_S 2U
#define MEMCFG_CXTEST_TEST_C1_M 0xCU // Selects the different modes for C1 RAM
//*************************************************************************************************
//
// The following are defines for the bit fields in the CxINIT register
//
//*************************************************************************************************
#define MEMCFG_CXINIT_INIT_C0 0x1U // RAM Initialization control for C0 RAM.
#define MEMCFG_CXINIT_INIT_C1 0x2U // RAM Initialization control for C1 RAM.
//*************************************************************************************************
//
// The following are defines for the bit fields in the CxINITDONE register
//
//*************************************************************************************************
#define MEMCFG_CXINITDONE_INITDONE_C0 0x1U // RAM Initialization status for C0 RAM.
#define MEMCFG_CXINITDONE_INITDONE_C1 0x2U // RAM Initialization status for C1 RAM.
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMMSGxLOCK register
//
//*************************************************************************************************
#define MEMCFG_CMMSGXLOCK_LOCK_CMTOCPU1MSGRAM0 0x1U // Message RAM CMTOCPU1MSGRAM0 Lock bits
#define MEMCFG_CMMSGXLOCK_LOCK_CMTOCPU1MSGRAM1 0x2U // Message RAM CMTOCPU1MSGRAM1 Lock bits
#define MEMCFG_CMMSGXLOCK_LOCK_CMTOCPU2MSGRAM0 0x4U // Message RAM CMTOCPU2MSGRAM0 Lock bits
#define MEMCFG_CMMSGXLOCK_LOCK_CMTOCPU2MSGRAM1 0x8U // Message RAM CMTOCPU2MSGRAM1 Lock bits
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMMSGxTEST register
//
//*************************************************************************************************
#define MEMCFG_CMMSGXTEST_TEST_CMTOCPU1MSGRAM0_S 0U
#define MEMCFG_CMMSGXTEST_TEST_CMTOCPU1MSGRAM0_M 0x3U // Selects the different modes for
// Message RAM CMTOCPU1MSGRAM0
#define MEMCFG_CMMSGXTEST_TEST_CMTOCPU1MSGRAM1_S 2U
#define MEMCFG_CMMSGXTEST_TEST_CMTOCPU1MSGRAM1_M 0xCU // Selects the different modes for
// Message RAM CMTOCPU1MSGRAM1
#define MEMCFG_CMMSGXTEST_TEST_CMTOCPU2MSGRAM0_S 4U
#define MEMCFG_CMMSGXTEST_TEST_CMTOCPU2MSGRAM0_M 0x30U // Selects the different modes for
// Message RAM CMTOCPU2MSGRAM0
#define MEMCFG_CMMSGXTEST_TEST_CMTOCPU2MSGRAM1_S 6U
#define MEMCFG_CMMSGXTEST_TEST_CMTOCPU2MSGRAM1_M 0xC0U // Selects the different modes for
// Message RAM CMTOCPU2MSGRAM1
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMMSGxINIT register
//
//*************************************************************************************************
#define MEMCFG_CMMSGXINIT_INIT_CMTOCPU1MSGRAM0 0x1U // RAM Initialization control for Message
// RAM CMTOCPU1MSGRAM0
#define MEMCFG_CMMSGXINIT_INIT_CMTOCPU1MSGRAM1 0x2U // RAM Initialization control for Message
// RAM CMTOCPU1MSGRAM1
#define MEMCFG_CMMSGXINIT_INIT_CMTOCPU2MSGRAM0 0x4U // RAM Initialization control for Message
// RAM CMTOCPU2MSGRAM0
#define MEMCFG_CMMSGXINIT_INIT_CMTOCPU2MSGRAM1 0x8U // RAM Initialization control for Message
// RAM CMTOCPU2MSGRAM1
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMMSGxINITDONE register
//
//*************************************************************************************************
#define MEMCFG_CMMSGXINITDONE_INITDONE_CMTOCPU1MSGRAM0 0x1U // RAM Initialization status for
// Message RAM CMTOCPU1MSGRAM0
#define MEMCFG_CMMSGXINITDONE_INITDONE_CMTOCPU1MSGRAM1 0x2U // RAM Initialization status for
// Message RAM CMTOCPU1MSGRAM1
#define MEMCFG_CMMSGXINITDONE_INITDONE_CMTOCPU2MSGRAM0 0x4U // RAM Initialization status for
// Message RAM CMTOCPU2MSGRAM0
#define MEMCFG_CMMSGXINITDONE_INITDONE_CMTOCPU2MSGRAM1 0x8U // RAM Initialization status for
// Message RAM CMTOCPU2MSGRAM1
//*************************************************************************************************
//
// The following are defines for the bit fields in the SxGROUP1_LOCK register
//
//*************************************************************************************************
#define MEMCFG_SXGROUP1_LOCK_LOCK_S0 0x1U // S0 RAM Lock bits
#define MEMCFG_SXGROUP1_LOCK_LOCK_S1 0x2U // S1 RAM Lock bits
#define MEMCFG_SXGROUP1_LOCK_LOCK_S2 0x4U // S2 RAM Lock bits
#define MEMCFG_SXGROUP1_LOCK_LOCK_S3 0x8U // S3 RAM Lock bits
#define MEMCFG_SXGROUP1_LOCK_LOCK_E0 0x10U // E0 RAM Lock bits
//*************************************************************************************************
//
// The following are defines for the bit fields in the SxGROUP1_TEST register
//
//*************************************************************************************************
#define MEMCFG_SXGROUP1_TEST_TEST_S0_S 0U
#define MEMCFG_SXGROUP1_TEST_TEST_S0_M 0x3U // Selects the different modes for S0 RAM
#define MEMCFG_SXGROUP1_TEST_TEST_S1_S 2U
#define MEMCFG_SXGROUP1_TEST_TEST_S1_M 0xCU // Selects the different modes for S1 RAM
#define MEMCFG_SXGROUP1_TEST_TEST_S2_S 4U
#define MEMCFG_SXGROUP1_TEST_TEST_S2_M 0x30U // Selects the different modes for S2 RAM
#define MEMCFG_SXGROUP1_TEST_TEST_S3_S 6U
#define MEMCFG_SXGROUP1_TEST_TEST_S3_M 0xC0U // Selects the different modes for S3 RAM
#define MEMCFG_SXGROUP1_TEST_TEST_E0_S 8U
#define MEMCFG_SXGROUP1_TEST_TEST_E0_M 0x300U // Selects the different modes for E0 RAM
//*************************************************************************************************
//
// The following are defines for the bit fields in the SxGROUP1_INIT register
//
//*************************************************************************************************
#define MEMCFG_SXGROUP1_INIT_INIT_S0 0x1U // RAM Initialization control for S0 RAM.
#define MEMCFG_SXGROUP1_INIT_INIT_S1 0x2U // RAM Initialization control for S1 RAM.
#define MEMCFG_SXGROUP1_INIT_INIT_S2 0x4U // RAM Initialization control for S2 RAM.
#define MEMCFG_SXGROUP1_INIT_INIT_S3 0x8U // RAM Initialization control for S3 RAM.
#define MEMCFG_SXGROUP1_INIT_INIT_E0 0x10U // RAM Initialization control for E0 RAM.
//*************************************************************************************************
//
// The following are defines for the bit fields in the SxGROUP1_INITDONE register
//
//*************************************************************************************************
#define MEMCFG_SXGROUP1_INITDONE_INITDONE_S0 0x1U // RAM Initialization status for S0 RAM.
#define MEMCFG_SXGROUP1_INITDONE_INITDONE_S1 0x2U // RAM Initialization status for S1 RAM.
#define MEMCFG_SXGROUP1_INITDONE_INITDONE_S2 0x4U // RAM Initialization status for S2 RAM.
#define MEMCFG_SXGROUP1_INITDONE_INITDONE_S3 0x8U // RAM Initialization status for S3 RAM.
#define MEMCFG_SXGROUP1_INITDONE_INITDONE_E0 0x10U // RAM Initialization status for E0 RAM.
//*************************************************************************************************
//
// The following are defines for the bit fields in the ROM_LOCK register
//
//*************************************************************************************************
#define MEMCFG_ROM_LOCK_LOCK_BOOTROM 0x1U // BOOTROM Lock bits
//*************************************************************************************************
//
// The following are defines for the bit fields in the ROM_TEST register
//
//*************************************************************************************************
#define MEMCFG_ROM_TEST_TEST_BOOTROM_S 0U
#define MEMCFG_ROM_TEST_TEST_BOOTROM_M 0x3U // Selects the different modes for BOOTROM
//*************************************************************************************************
//
// The following are defines for the bit fields in the ROM_FORCE_ERROR register
//
//*************************************************************************************************
#define MEMCFG_ROM_FORCE_ERROR_FORCE_BOOTROM_ERROR 0x1U // Force Bootrom Parity Error
//*************************************************************************************************
//
// The following are defines for the bit fields in the PERI_MEM_TEST_LOCK register
//
//*************************************************************************************************
#define MEMCFG_PERI_MEM_TEST_LOCK_LOCK_PERI_MEM_TEST_CONTROL 0x1U // PERI_MEM_TEST_CONTROL Lock
// bit
//*************************************************************************************************
//
// The following are defines for the bit fields in the PERI_MEM_TEST_CONTROL register
//
//*************************************************************************************************
#define MEMCFG_PERI_MEM_TEST_CONTROL_EMAC_TEST_ENABLE 0x1U // EMAC Test mode enable
#define MEMCFG_PERI_MEM_TEST_CONTROL_EMAC_MEM_FORCE_ERROR 0x2U // Force Parity Error on
// EMAC RAM
#define MEMCFG_PERI_MEM_TEST_CONTROL_ETHERCAT_TEST_ENABLE 0x10U // EtherCAT Test mode
// enable
#define MEMCFG_PERI_MEM_TEST_CONTROL_ETHERCAT_MEM_FORCE_ERROR 0x20U // Force Parity Error on
// EtherCAT RAM
//*************************************************************************************************
//
// The following are defines for the bit fields in the UCERRFLG register
//
//*************************************************************************************************
#define MEMCFG_UCERRFLG_M4RDERR 0x1U // M4 Uncorrectable Read Error Flag
#define MEMCFG_UCERRFLG_M4WRERR 0x2U // M4 Uncorrectable Write Error Flag
#define MEMCFG_UCERRFLG_EMACRDERR 0x4U // EMAC Uncorrectable Read Error Flag
#define MEMCFG_UCERRFLG_UDMARDERR 0x10U // uDMA Uncorrectable Read Error Flag
#define MEMCFG_UCERRFLG_UDMAWRERR 0x20U // uDMA Uncorrectable Write Error Flag
#define MEMCFG_UCERRFLG_ETHERCATMEMRDERR 0x40U // EtherCAT IP RAM Uncorrectable Read Error Flag
#define MEMCFG_UCERRFLG_EMACMEMRDERR 0x80U // EMAC IP RAM Uncorrectable Read Error Flag
//*************************************************************************************************
//
// The following are defines for the bit fields in the UCERRSET register
//
//*************************************************************************************************
#define MEMCFG_UCERRSET_M4RDERR 0x1U // M4 Uncorrectable Read Error Flag Set
#define MEMCFG_UCERRSET_M4WRERR 0x2U // M4 Uncorrectable Write Error Flag Set
#define MEMCFG_UCERRSET_EMACRDERR 0x4U // EMAC Uncorrectable Read Error Flag Set
#define MEMCFG_UCERRSET_UDMARDERR 0x10U // uDMA Uncorrectable Read Error Flag Set
#define MEMCFG_UCERRSET_UDMAWRERR 0x20U // uDMA Uncorrectable Write Error Flag Set
#define MEMCFG_UCERRSET_ETHERCATMEMRDERR 0x40U // EtherCAT IP RAM Uncorrectable Read
// Error Flag set
#define MEMCFG_UCERRSET_EMACMEMRDERR 0x80U // EMAC IP RAM Uncorrectable Read Error
// Flag set
#define MEMCFG_UCERRSET_KEY_S 16U
#define MEMCFG_UCERRSET_KEY_M 0xFFFF0000U // KEY to allow write access
//*************************************************************************************************
//
// The following are defines for the bit fields in the UCERRCLR register
//
//*************************************************************************************************
#define MEMCFG_UCERRCLR_M4RDERR 0x1U // M4 Uncorrectable Read Error Flag Clear
#define MEMCFG_UCERRCLR_M4WRERR 0x2U // M4 Uncorrectable Write Error Flag Clear
#define MEMCFG_UCERRCLR_EMACRDERR 0x4U // EMAC Uncorrectable Read Error Flag
// Clear
#define MEMCFG_UCERRCLR_UDMARDERR 0x10U // uDMA Uncorrectable Read Error Flag
// Clear
#define MEMCFG_UCERRCLR_UDMAWRERR 0x20U // uDMA Uncorrectable Write Error Flag
// Clear
#define MEMCFG_UCERRCLR_ETHERCATMEMRDERR 0x40U // EtherCAT IP RAM Uncorrectable Read
// Error Flag Clear
#define MEMCFG_UCERRCLR_EMACMEMRDERR 0x80U // EMAC IP RAM Uncorrectable Read Error
// Flag Clear
#define MEMCFG_UCERRCLR_KEY_S 16U
#define MEMCFG_UCERRCLR_KEY_M 0xFFFF0000U // KEY to allow write access
//*************************************************************************************************
//
// The following are defines for the bit fields in the BUSFAULTFLG register
//
//*************************************************************************************************
#define MEMCFG_BUSFAULTFLG_M4BUSFAULT 0x1U // M4 busfault Flag
#define MEMCFG_BUSFAULTFLG_UDMABUSFAULT 0x2U // UDMA busfault Flag
#define MEMCFG_BUSFAULTFLG_EMACBUSFAULT 0x4U // EMAC busfault Flag
//*************************************************************************************************
//
// The following are defines for the bit fields in the BUSFAULTCLR register
//
//*************************************************************************************************
#define MEMCFG_BUSFAULTCLR_M4BUSFAULT 0x1U // M4 busfault Flag Clear
#define MEMCFG_BUSFAULTCLR_UDMABUSFAULT 0x2U // UDMA busfault Flag Clear
#define MEMCFG_BUSFAULTCLR_EMACBUSFAULT 0x4U // EMAC busfault Flag Clear
#define MEMCFG_BUSFAULTCLR_KEY_S 16U
#define MEMCFG_BUSFAULTCLR_KEY_M 0xFFFF0000U // KEY to allow write access
//*************************************************************************************************
//
// The following are defines for the bit fields in the CERRFLG register
//
//*************************************************************************************************
#define MEMCFG_CERRFLG_M4RDERR 0x1U // M4 Correctable Read Error Flag
#define MEMCFG_CERRFLG_M4WRERR 0x2U // M4 Correctable Write Error Flag
#define MEMCFG_CERRFLG_EMACRDERR 0x4U // EMAC Correctable Read Error Flag
#define MEMCFG_CERRFLG_UDMARDERR 0x10U // uDMA Correctable Read Error Flag
#define MEMCFG_CERRFLG_UDMAWRERR 0x20U // uDMA Correctable Write Error Flag
//*************************************************************************************************
//
// The following are defines for the bit fields in the CERRSET register
//
//*************************************************************************************************
#define MEMCFG_CERRSET_M4RDERR 0x1U // M4 Correctable Read Error Flag Set
#define MEMCFG_CERRSET_M4WRERR 0x2U // M4 Correctable Write Error Flag Set
#define MEMCFG_CERRSET_EMACRDERR 0x4U // EMAC Correctable Read Error Flag Set
#define MEMCFG_CERRSET_UDMARDERR 0x10U // uDMA Correctable Read Error Flag Set
#define MEMCFG_CERRSET_UDMAWRERR 0x20U // uDMA Correctable Write Error Flag Set
#define MEMCFG_CERRSET_KEY_S 16U
#define MEMCFG_CERRSET_KEY_M 0xFFFF0000U // KEY to allow write access
//*************************************************************************************************
//
// The following are defines for the bit fields in the CERRCLR register
//
//*************************************************************************************************
#define MEMCFG_CERRCLR_M4RDERR 0x1U // M4 Correctable Read Error Flag Clear
#define MEMCFG_CERRCLR_M4WRERR 0x2U // M4 Correctable Write Error Flag Clear
#define MEMCFG_CERRCLR_EMACRDERR 0x4U // EMAC Correctable Read Error Flag Clear
#define MEMCFG_CERRCLR_UDMARDERR 0x10U // uDMA Correctable Read Error Flag Clear
#define MEMCFG_CERRCLR_UDMAWRERR 0x20U // uDMA Correctable Write Error Flag Clear
#define MEMCFG_CERRCLR_KEY_S 16U
#define MEMCFG_CERRCLR_KEY_M 0xFFFF0000U // KEY to allow write access
//*************************************************************************************************
//
// The following are defines for the bit fields in the CEINTFLG register
//
//*************************************************************************************************
#define MEMCFG_CEINTFLG_CEINTFLAG 0x1U // Total corrected error count exceeded threshold flag.
//*************************************************************************************************
//
// The following are defines for the bit fields in the CEINTSET register
//
//*************************************************************************************************
#define MEMCFG_CEINTSET_CEINTSET 0x1U // Total corrected error count exceeded flag set.
#define MEMCFG_CEINTSET_KEY_S 16U
#define MEMCFG_CEINTSET_KEY_M 0xFFFF0000U // KEY to allow write access
//*************************************************************************************************
//
// The following are defines for the bit fields in the CEINTCLR register
//
//*************************************************************************************************
#define MEMCFG_CEINTCLR_CEINTCLR 0x1U // M4 Corrected Error Threshold Exceeded Error
// Clear.
#define MEMCFG_CEINTCLR_KEY_S 16U
#define MEMCFG_CEINTCLR_KEY_M 0xFFFF0000U // KEY to allow write access
//*************************************************************************************************
//
// The following are defines for the bit fields in the CEINTEN register
//
//*************************************************************************************************
#define MEMCFG_CEINTEN_CEINTEN 0x1U // M4 Correctable Error Interrupt Enable.
#define MEMCFG_CEINTEN_KEY_S 16U
#define MEMCFG_CEINTEN_KEY_M 0xFFFF0000U // KEY to allow write access
//*************************************************************************************************
//
// The following are defines for the bit fields in the DIAGERRFLG register
//
//*************************************************************************************************
#define MEMCFG_DIAGERRFLG_UCRDERROR 0x1U // Diagnostics Uncorrectable Read Error Flag
#define MEMCFG_DIAGERRFLG_UCWRERROR 0x2U // Diagnostics Uncorrectable Write Error Flag
#define MEMCFG_DIAGERRFLG_CRDERROR 0x4U // Diagnostics Correctable Read Error Flag
#define MEMCFG_DIAGERRFLG_CWRERROR 0x8U // Diagnostics Correctable Write Error Flag
//*************************************************************************************************
//
// The following are defines for the bit fields in the DIAGERRCLR register
//
//*************************************************************************************************
#define MEMCFG_DIAGERRCLR_UCRDERROR 0x1U // Clear diagnostics uncorrectable Read Error Flag
#define MEMCFG_DIAGERRCLR_UCWRERROR 0x2U // Clear diagnostics uncorrectable Write Error Flag
#define MEMCFG_DIAGERRCLR_CRDERROR 0x4U // Clear diagnostics correctable Read Error Flag
#define MEMCFG_DIAGERRCLR_CWRERROR 0x8U // Clear diagnostics correctable Write Error Flag
#endif
@@ -0,0 +1,107 @@
//###########################################################################
//
// FILE: hw_memmap.h
//
// TITLE: Macros defining the memory map of the C28x.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_MEMMAP_H
#define HW_MEMMAP_H
//*****************************************************************************
//
// The following are defines for the base address of the memories and
// peripherals.
//
//*****************************************************************************
#define C1RAM_BASE 0x1FFFC000U
#define C0RAM_BASE 0x1FFFE000U
#define S0RAM_BASE 0x20000000U
#define S1RAM_BASE 0x20004000U
#define S2RAM_BASE 0x20008000U
#define S3RAM_BASE 0x2000C000U
#define E0RAM_BASE 0x20010000U
#define CPU1TOCMMSGRAM0_BASE 0x20080000U
#define CPU1TOCMMSGRAM1_BASE 0x20080800U
#define CMTOCPU1MSGRAM0_BASE 0x20082000U
#define CMTOCPU1MSGRAM1_BASE 0x20082800U
#define CPU2TOCMMSGRAM0_BASE 0x20084000U
#define CPU2TOCMMSGRAM1_BASE 0x20084800U
#define CMTOCPU2MSGRAM0_BASE 0x20086000U
#define CMTOCPU2MSGRAM1_BASE 0x20086800U
#define SSI0_BASE 0x40008000U
#define UART0_BASE 0x4000C000U
#define I2C0_BASE 0x40020000U
#define GCRC_BASE 0x40040000U
#define AES_BASE 0x4004A000U
#define AESW_BASE 0x4004AC00U
#define USB0_BASE 0x40050000U
#define CANA_BASE 0x40070000U
#define CANB_BASE 0x40074000U
#define MCAN0_BASE 0x40078000U
#define MCAN_SS_BASE 0x4007C400U
#define MCAN_BASE 0x4007C600U
#define MCAN_ERROR_BASE 0x4007C800U
#define WD_BASE 0x40080000U
#define NMI_BASE 0x40081000U
#define GPIODATA_BASE 0x40083000U
#define GPIODATAREAD_BASE 0x40083100U
#define CPUTIMER0_BASE 0x40084000U
#define CPUTIMER1_BASE 0x40084010U
#define CPUTIMER2_BASE 0x40084020U
#define DCSM_Z1_BASE 0x40085000U
#define DCSM_Z2_BASE 0x40085100U
#define DCSMCOMMON_BASE 0x40085180U
#define ESC_SS_BASE 0x400AFC00U
#define ESC_SS_CONFIG_BASE 0x400AFE00U
#define EMAC_BASE 0x400C0000U
#define EMAC_SS_BASE 0x400C2000U
#define DMPU_BASE 0x400CC000U
#define EMPU_BASE 0x400CD000U
#define FLASH0CTRL_BASE 0x400FA000U
#define FLASH0ECC_BASE 0x400FA600U
#define CMSYSCTL_BASE 0x400FC000U
#define IPC_CMTOCPU1_BASE 0x400FD000U
#define FLASHPUMPSEMAPHORE_BASE 0x400FD048U
#define IPC_CMTOCPU2_BASE 0x400FD080U
#define CMMEMCFG_BASE 0x400FE000U
#define CMMEMORYERROR_BASE 0x400FE400U
#define CMMEMORYDIAGERROR_BASE 0x400FE800U
#define UDMA_BASE 0x400FF000U
#define NVIC_BASE 0xE000E000U
#endif
@@ -0,0 +1,143 @@
//###########################################################################
//
// FILE: hw_nmi.h
//
// TITLE: Definitions for the NMI registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_NMI_H
#define HW_NMI_H
//*************************************************************************************************
//
// The following are defines for the NMI register offsets
//
//*************************************************************************************************
#define NMI_O_CMNMICFG 0x0U // CM NMI Configuration Register
#define NMI_O_CMNMIFLG 0x4U // CM NMI Flag Register
#define NMI_O_CMNMIFLGCLR 0x8U // CMNMI Flag Clear Register
#define NMI_O_CMNMIFLGFRC 0xCU // CMNMI Flag Force Register
#define NMI_O_CMNMIWDCNT 0x10U // CMNMI Watchdog Counter Register
#define NMI_O_CMNMIWDPRD 0x14U // CMNMI Watchdog Period Register
#define NMI_O_CMNMISHDWFLG 0x18U // CMNMI Shadow Flag Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMNMICFG register
//
//*************************************************************************************************
#define NMI_CMNMICFG_NMIE 0x1U // Global NMI Enable
#define NMI_CMNMICFG_KEY_S 16U
#define NMI_CMNMICFG_KEY_M 0xFFFF0000U // Key protection
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMNMIFLG register
//
//*************************************************************************************************
#define NMI_CMNMIFLG_NMIINT 0x1U // NMI Interrupt Flag
#define NMI_CMNMIFLG_CLOCKFAIL 0x2U // Clock Fail Interrupt Flag
#define NMI_CMNMIFLG_MEMUNCERR 0x4U // RAM, ROM Uncorrectable Error NMI Flag
#define NMI_CMNMIFLG_FLUNCERR 0x8U // Flash Uncorrectable Error NMI Flag
#define NMI_CMNMIFLG_MCANUNCERR 0x10U // MCAN Uncorrectable Error NMI Flag
#define NMI_CMNMIFLG_WWDNMI 0x20U // CM WWD NMI flag
#define NMI_CMNMIFLG_ECATNMI 0x40U // NMI from EtherCAT reset out
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMNMIFLGCLR register
//
//*************************************************************************************************
#define NMI_CMNMIFLGCLR_NMIINT 0x1U // NMIINT Flag Clear
#define NMI_CMNMIFLGCLR_CLOCKFAIL 0x2U // CLOCKFAIL Flag Clear
#define NMI_CMNMIFLGCLR_MEMUNCERR 0x4U // MEMUNCERR Flag Clear
#define NMI_CMNMIFLGCLR_FLUNCERR 0x8U // FLUNCERR Flag Clear
#define NMI_CMNMIFLGCLR_MCANUNCERR 0x10U // MCANUNCERR Flag Clear
#define NMI_CMNMIFLGCLR_WWDNMI 0x20U // WWDNMI Flag Clear
#define NMI_CMNMIFLGCLR_ECATNMI 0x40U // ECATNMI Flag Clear
#define NMI_CMNMIFLGCLR_KEY_S 16U
#define NMI_CMNMIFLGCLR_KEY_M 0xFFFF0000U // Key protection
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMNMIFLGFRC register
//
//*************************************************************************************************
#define NMI_CMNMIFLGFRC_CLOCKFAIL 0x2U // CLOCKFAIL Flag Force
#define NMI_CMNMIFLGFRC_MEMUNCERR 0x4U // MEMUNCERR Flag Force
#define NMI_CMNMIFLGFRC_FLUNCERR 0x8U // FLUNCERR Flag Force
#define NMI_CMNMIFLGFRC_MCANUNCERR 0x10U // MCANUNCERR Flag Force
#define NMI_CMNMIFLGFRC_WWDNMI 0x20U // WWDNMI Flag Force
#define NMI_CMNMIFLGFRC_ECATNMI 0x40U // ECATNMI Flag Force
#define NMI_CMNMIFLGFRC_KEY_S 16U
#define NMI_CMNMIFLGFRC_KEY_M 0xFFFF0000U // Key protection
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMNMIWDCNT register
//
//*************************************************************************************************
#define NMI_CMNMIWDCNT_NMIWDCNT_S 0U
#define NMI_CMNMIWDCNT_NMIWDCNT_M 0xFFFFU // NMI Watchdog Counter
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMNMIWDPRD register
//
//*************************************************************************************************
#define NMI_CMNMIWDPRD_NMIWDPRD_S 0U
#define NMI_CMNMIWDPRD_NMIWDPRD_M 0xFFFFU // NMI Watchdog Period
#define NMI_CMNMIWDPRD_KEY_S 16U
#define NMI_CMNMIWDPRD_KEY_M 0xFFFF0000U // Key protection
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMNMISHDWFLG register
//
//*************************************************************************************************
#define NMI_CMNMISHDWFLG_CLOCKFAIL 0x2U // CLOCKFAIL Shadow flag
#define NMI_CMNMISHDWFLG_MEMUNCERR 0x4U // MEMUNCERR Shadow flag
#define NMI_CMNMISHDWFLG_FLUNCERR 0x8U // FLUNCERR Shadow flag
#define NMI_CMNMISHDWFLG_MCANUNCERR 0x10U // MCANUNCERR Shadow flag
#define NMI_CMNMISHDWFLG_WWDNMI 0x20U // WWDNMI Shadow flag
#define NMI_CMNMISHDWFLG_ECATNMI 0x40U // ECATNMI Shadow flag
#endif
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,63 @@
//###########################################################################
//
// FILE: hw_otp.h
//
// TITLE: Definitions for the OTP registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_OTP_H
#define HW_OTP_H
//*************************************************************************************************
//
// The following are defines for the OTP register offsets
//
//*************************************************************************************************
#define OTP_O_UID_PSRAND0 0x0U // UID Psuedo-random 160 bit number
#define OTP_O_UID_PSRAND1 0x2U // UID Psuedo-random 160 bit number
#define OTP_O_UID_PSRAND2 0x4U // UID Psuedo-random 160 bit number
#define OTP_O_UID_PSRAND3 0x6U // UID Psuedo-random 160 bit number
#define OTP_O_UID_PSRAND4 0x8U // UID Psuedo-random 160 bit number
#define OTP_O_UID_PSRAND5 0xAU // UID Psuedo-random 160 bit number
#define OTP_O_UID_UNIQUE 0xCU // UID UID Unique 32 bit number
#define OTP_O_UID_CHECKSUM 0xEU // UID Checksum
#endif
@@ -0,0 +1,307 @@
//###########################################################################
//
// FILE: hw_ssi.h
//
// TITLE: Definitions for the SSI registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_SSI_H
#define HW_SSI_H
//*************************************************************************************************
//
// The following are defines for the SSI register offsets
//
//*************************************************************************************************
#define SSI_O_CR0 0x0U // SSI Control 0
#define SSI_O_CR1 0x4U // SSI Control 1
#define SSI_O_DR 0x8U // SSI Data
#define SSI_O_SR 0xCU // SSI Status
#define SSI_O_CPSR 0x10U // SSI Clock Prescale
#define SSI_O_IM 0x14U // SSI Interrupt Mask
#define SSI_O_RIS 0x18U // SSI Raw Interrupt Status
#define SSI_O_MIS 0x1CU // SSI Masked Interrupt Status
#define SSI_O_ICR 0x20U // SSI Interrupt Clear
#define SSI_O_DMACTL 0x24U // SSI DMA Control
#define SSI_O_PV 0xFB0U // SSI Peripheral Version
#define SSI_O_PP 0xFC0U // SSI Peripheral Properties
#define SSI_O_PERIPHID4 0xFD0U // SSI Peripheral Identification 4
#define SSI_O_PERIPHID5 0xFD4U // SSI Peripheral Identification 5
#define SSI_O_PERIPHID6 0xFD8U // SSI Peripheral Identification 6
#define SSI_O_PERIPHID7 0xFDCU // SSI Peripheral Identification 7
#define SSI_O_PERIPHID0 0xFE0U // SSI Peripheral Identification 0
#define SSI_O_PERIPHID1 0xFE4U // SSI Peripheral Identification 1
#define SSI_O_PERIPHID2 0xFE8U // SSI Peripheral Identification 2
#define SSI_O_PERIPHID3 0xFECU // SSI Peripheral Identification 3
#define SSI_O_PCELLID0 0xFF0U // SSI PrimeCell Identification 0
#define SSI_O_PCELLID1 0xFF4U // SSI PrimeCell Identification 1
#define SSI_O_PCELLID2 0xFF8U // SSI PrimeCell Identification 2
#define SSI_O_PCELLID3 0xFFCU // SSI PrimeCell Identification 3
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSICR0 register
//
//*************************************************************************************************
#define SSI_CR0_DSS_S 0U
#define SSI_CR0_DSS_M 0xFU // SSI Data Size Select
#define SSI_CR0_FRF_S 4U
#define SSI_CR0_FRF_M 0x30U // SSI FRame Format Select
#define SSI_CR0_SPO 0x40U // SSI Serial clock POlarity
#define SSI_CR0_SPH 0x80U // SSI Serial clock PHase
#define SSI_CR0_SCR_S 8U
#define SSI_CR0_SCR_M 0xFF00U // SSI Serial Clock Rate
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSICR1 register
//
//*************************************************************************************************
#define SSI_CR1_LBM 0x1U // SSI Loopback Mode
#define SSI_CR1_SSE 0x2U // SSI Synchronous Serial Port Enable
#define SSI_CR1_MS 0x4U // SSI Master/Slave Select
#define SSI_CR1_EOT 0x10U // End of Transmission
#define SSI_CR1_DIR 0x100U // SSI Direction of Operation
#define SSI_CR1_HSCLKEN 0x200U // High Speed Clock Enable
#define SSI_CR1_FSSHLDFRM 0x400U // FSS Hold Frame
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIDR register
//
//*************************************************************************************************
#define SSI_DR_DATA_S 0U
#define SSI_DR_DATA_M 0xFFFFU // SSI Receive/Transmit Data
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSISR register
//
//*************************************************************************************************
#define SSI_SR_TFE 0x1U // SSI Transmit FIFO Empty
#define SSI_SR_TNF 0x2U // SSI Transmit FIFO Not Full
#define SSI_SR_RNE 0x4U // SSI Receive FIFO Not Empty
#define SSI_SR_RFF 0x8U // SSI Receive FIFO Full
#define SSI_SR_BSY 0x10U // SSI Busy Bit
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSICPSR register
//
//*************************************************************************************************
#define SSI_CPSR_CPSDVSR_S 0U
#define SSI_CPSR_CPSDVSR_M 0xFFU // SSI Clock Prescale Divisor
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIIM register
//
//*************************************************************************************************
#define SSI_IM_RORIM 0x1U // SSI Receive Overrun Interrupt Mask
#define SSI_IM_RTIM 0x2U // SSI Receive Time-Out Interrupt Mask
#define SSI_IM_RXIM 0x4U // SSI Receive FIFO Interrupt Mask
#define SSI_IM_TXIM 0x8U // SSI Transmit FIFO Interrupt Mask
#define SSI_IM_DMARXIM 0x10U // SSI Receive DMA Interrupt Mask
#define SSI_IM_DMATXIM 0x20U // SSI Transmit DMA Interrupt Mask
#define SSI_IM_EOTIM 0x40U // End of Transmit Interrupt Mask
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIRIS register
//
//*************************************************************************************************
#define SSI_RIS_RORRIS 0x1U // SSI Receive Overrun Raw Interrupt Status
#define SSI_RIS_RTRIS 0x2U // SSI Receive Time-Out Raw Interrupt Status
#define SSI_RIS_RXRIS 0x4U // SSI Receive FIFO Raw Interrupt Status
#define SSI_RIS_TXRIS 0x8U // SSI Transmit FIFO Raw Interrupt Status
#define SSI_RIS_DMARXRIS 0x10U // SSI Receive DMA Raw Interrupt Status
#define SSI_RIS_DMATXRIS 0x20U // SSI Transmit DMA Raw Interrupt Status
#define SSI_RIS_EOTRIS 0x40U // End of Transmit Raw Interrupt Status
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIMIS register
//
//*************************************************************************************************
#define SSI_MIS_RORMIS 0x1U // SSI Receive Overrun Masked Interrupt Status
#define SSI_MIS_RTMIS 0x2U // SSI Receive Time-Out Masked Interrupt Status
#define SSI_MIS_RXMIS 0x4U // SSI Receive FIFO Masked Interrupt Status
#define SSI_MIS_TXMIS 0x8U // SSI Transmit FIFO Masked Interrupt Status
#define SSI_MIS_DMARXMIS 0x10U // SSI Receive DMA Masked Interrupt Status
#define SSI_MIS_DMATXMIS 0x20U // SSI Transmit DMA Masked Interrupt Status
#define SSI_MIS_EOTMIS 0x40U // End of Transmit Masked Interrupt Status
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIICR register
//
//*************************************************************************************************
#define SSI_ICR_RORIC 0x1U // SSI Receive Overrun Interrupt Clear
#define SSI_ICR_RTIC 0x2U // SSI Receive Time-Out Interrupt Clear
#define SSI_ICR_DMARXIC 0x10U // SSI Receive DMA Interrupt Clear
#define SSI_ICR_DMATXIC 0x20U // SSI Transmit DMA Interrupt Clear
#define SSI_ICR_EOTIC 0x40U // End of Transmit Interrupt Clear
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIDMACTL register
//
//*************************************************************************************************
#define SSI_DMACTL_RXDMAE 0x1U // Receive DMA Enable
#define SSI_DMACTL_TXDMAE 0x2U // Transmit DMA Enable
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIPV register
//
//*************************************************************************************************
#define SSI_PV_MINOR_S 0U
#define SSI_PV_MINOR_M 0xFFU // Minor Revision
#define SSI_PV_MAJOR_S 8U
#define SSI_PV_MAJOR_M 0xFF00U // Major Revision
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIPP register
//
//*************************************************************************************************
#define SSI_PP_HSCLK 0x1U // High Speed Capability
#define SSI_PP_MODE_S 1U
#define SSI_PP_MODE_M 0x6U // Mode of Operation
#define SSI_PP_FSSHLDFRM 0x8U // SSInFss Hold Frame Capability
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIPeriphID4 register
//
//*************************************************************************************************
#define SSI_PERIPHID4_PID4_S 0U
#define SSI_PERIPHID4_PID4_M 0xFFU // SSI Peripheral ID Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIPeriphID5 register
//
//*************************************************************************************************
#define SSI_PERIPHID5_PID5_S 0U
#define SSI_PERIPHID5_PID5_M 0xFFU // SSI Peripheral ID Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIPeriphID6 register
//
//*************************************************************************************************
#define SSI_PERIPHID6_PID6_S 0U
#define SSI_PERIPHID6_PID6_M 0xFFU // SSI Peripheral ID Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIPeriphID7 register
//
//*************************************************************************************************
#define SSI_PERIPHID7_PID7_S 0U
#define SSI_PERIPHID7_PID7_M 0xFFU // SSI Peripheral ID Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIPeriphID0 register
//
//*************************************************************************************************
#define SSI_PERIPHID0_PID0_S 0U
#define SSI_PERIPHID0_PID0_M 0xFFU // SSI Peripheral ID Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIPeriphID1 register
//
//*************************************************************************************************
#define SSI_PERIPHID1_PID1_S 0U
#define SSI_PERIPHID1_PID1_M 0xFFU // SSI Peripheral ID Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIPeriphID2 register
//
//*************************************************************************************************
#define SSI_PERIPHID2_PID2_S 0U
#define SSI_PERIPHID2_PID2_M 0xFFU // SSI Peripheral ID Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIPeriphID3 register
//
//*************************************************************************************************
#define SSI_PERIPHID3_PID3_S 0U
#define SSI_PERIPHID3_PID3_M 0xFFU // SSI Peripheral ID Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIPCellID0 register
//
//*************************************************************************************************
#define SSI_PCELLID0_CID0_S 0U
#define SSI_PCELLID0_CID0_M 0xFFU // SSI PrimeCell ID Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIPCellID1 register
//
//*************************************************************************************************
#define SSI_PCELLID1_CID1_S 0U
#define SSI_PCELLID1_CID1_M 0xFFU // SSI PrimeCell ID Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIPCellID2 register
//
//*************************************************************************************************
#define SSI_PCELLID2_CID2_S 0U
#define SSI_PCELLID2_CID2_M 0xFFU // SSI PrimeCell ID Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the SSIPCellID3 register
//
//*************************************************************************************************
#define SSI_PCELLID3_CID3_S 0U
#define SSI_PCELLID3_CID3_M 0xFFU // SSI PrimeCell ID Register
#endif
@@ -0,0 +1,252 @@
//###########################################################################
//
// FILE: hw_sysctl.h
//
// TITLE: Definitions for the SYSCTL registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_SYSCTL_H
#define HW_SYSCTL_H
//*************************************************************************************************
//
// The following are defines for the SYSCTL register offsets
//
//*************************************************************************************************
#define SYSCTL_O_CMPCLKCR0 0x0U // CM Peripheral clock gating register 0.
#define SYSCTL_O_CMPCLKCR1 0x4U // CM Peripheral clock gating register 1.
#define SYSCTL_O_CMPCLKCR2 0x8U // CM Peripheral clock gating register 2.
#define SYSCTL_O_CMSOFTPRESET0 0x20U // CM Software Peripheral Reset register 0
#define SYSCTL_O_CMSOFTPRESET1 0x24U // CM Software Peripheral Reset register 1
#define SYSCTL_O_CMSOFTPRESET2 0x28U // CM Software Peripheral Reset register 2
#define SYSCTL_O_CMCLKSTOPREQ0 0x40U // Peripheral Clock Stop Request Register 0
#define SYSCTL_O_CMCLKSTOPREQ1 0x44U // Peripheral Clock Stop Request Register 1
#define SYSCTL_O_CMCLKSTOPREQ2 0x48U // Peripheral Clock Stop Request Register 2
#define SYSCTL_O_CMCLKSTOPACK1 0x64U // Peripheral Clock Stop Ackonwledge Register 1
#define SYSCTL_O_MCANWAKESTATUS 0xE0U // MCAN Wake Status Register
#define SYSCTL_O_MCANWAKESTATUSCLR 0xE4U // MCAN Wake Status Clear Register
#define SYSCTL_O_PALLOCATESTS 0x1F4U // Status of PALLOCATE register.
#define SYSCTL_O_CMRESCCLR 0x1F8U // CM Reset Cause Status Clear Register
#define SYSCTL_O_CMRESC 0x1FCU // CM Reset Cause Status Register
#define SYSCTL_O_CMSYSCTLLOCK 0x200U // Locks the configuration registers of CM System
// control
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMPCLKCR0 register
//
//*************************************************************************************************
#define SYSCTL_CMPCLKCR0_UART0 0x1U // UART0 Clock gating Bit
#define SYSCTL_CMPCLKCR0_SSI0 0x10U // SSI0 Clock gating Bit
#define SYSCTL_CMPCLKCR0_I2C0 0x100U // I2C0 Clock gating Bit
#define SYSCTL_CMPCLKCR0_USB 0x1000U // USB Clock gating Bit
#define SYSCTL_CMPCLKCR0_KEY_S 16U
#define SYSCTL_CMPCLKCR0_KEY_M 0xFFFF0000U // Key field
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMPCLKCR1 register
//
//*************************************************************************************************
#define SYSCTL_CMPCLKCR1_ETHERNET 0x1U // ETHERNET Clock gating Bit
#define SYSCTL_CMPCLKCR1_ETHERCAT 0x4U // ETHERCAT Clock gating Bit
#define SYSCTL_CMPCLKCR1_CAN_A 0x10U // CAN_A Clock gating Bit
#define SYSCTL_CMPCLKCR1_CAN_B 0x20U // CAN_B Clock gating Bit
#define SYSCTL_CMPCLKCR1_MCAN_A 0x100U // MCAN_A Clock gating Bit
#define SYSCTL_CMPCLKCR1_KEY_S 16U
#define SYSCTL_CMPCLKCR1_KEY_M 0xFFFF0000U // Key field
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMPCLKCR2 register
//
//*************************************************************************************************
#define SYSCTL_CMPCLKCR2_CPUTIMER0 0x1U // CPUTIMER0 Clock gating Bit
#define SYSCTL_CMPCLKCR2_CPUTIMER1 0x2U // CPUTIMER1 Clock gating Bit
#define SYSCTL_CMPCLKCR2_CPUTIMER2 0x4U // CPUTIMER2 Clock gating Bit
#define SYSCTL_CMPCLKCR2_UDMA 0x10U // UDMA Clock gating Bit
#define SYSCTL_CMPCLKCR2_AESIP 0x40U // AESIP Clock gating Bit
#define SYSCTL_CMPCLKCR2_GCRC 0x100U // GCRC Clock gating Bit
#define SYSCTL_CMPCLKCR2_KEY_S 16U
#define SYSCTL_CMPCLKCR2_KEY_M 0xFFFF0000U // Key field
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMSOFTPRESET0 register
//
//*************************************************************************************************
#define SYSCTL_CMSOFTPRESET0_UART0 0x1U // UART0 Soft reset bit
#define SYSCTL_CMSOFTPRESET0_SSI0 0x10U // SSI0 Soft reset bit
#define SYSCTL_CMSOFTPRESET0_I2C0 0x100U // I2C0 Soft reset bit
#define SYSCTL_CMSOFTPRESET0_USB 0x1000U // USB Soft reset bit
#define SYSCTL_CMSOFTPRESET0_KEY_S 16U
#define SYSCTL_CMSOFTPRESET0_KEY_M 0xFFFF0000U // Key field
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMSOFTPRESET1 register
//
//*************************************************************************************************
#define SYSCTL_CMSOFTPRESET1_ETHERNET 0x1U // ETHERNET Soft reset bit
#define SYSCTL_CMSOFTPRESET1_ETHERCAT 0x4U // ETHERCAT Soft reset bit
#define SYSCTL_CMSOFTPRESET1_CAN_A 0x10U // CAN_A Soft reset bit
#define SYSCTL_CMSOFTPRESET1_CAN_B 0x20U // CAN_B Soft reset bit
#define SYSCTL_CMSOFTPRESET1_MCAN_A 0x100U // MCAN_A Soft reset bit
#define SYSCTL_CMSOFTPRESET1_KEY_S 16U
#define SYSCTL_CMSOFTPRESET1_KEY_M 0xFFFF0000U // Key field
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMSOFTPRESET2 register
//
//*************************************************************************************************
#define SYSCTL_CMSOFTPRESET2_AESIP 0x40U // AESIP Soft reset bit
#define SYSCTL_CMSOFTPRESET2_GCRC 0x100U // GCRC Soft reset bit
#define SYSCTL_CMSOFTPRESET2_KEY_S 16U
#define SYSCTL_CMSOFTPRESET2_KEY_M 0xFFFF0000U // Key field
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMCLKSTOPREQ0 register
//
//*************************************************************************************************
#define SYSCTL_CMCLKSTOPREQ0_KEY_S 16U
#define SYSCTL_CMCLKSTOPREQ0_KEY_M 0xFFFF0000U // Key field
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMCLKSTOPREQ1 register
//
//*************************************************************************************************
#define SYSCTL_CMCLKSTOPREQ1_MCAN_A 0x100U // MCAN_A Clock Stop Request Bit
#define SYSCTL_CMCLKSTOPREQ1_KEY_S 16U
#define SYSCTL_CMCLKSTOPREQ1_KEY_M 0xFFFF0000U // Key field
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMCLKSTOPREQ2 register
//
//*************************************************************************************************
#define SYSCTL_CMCLKSTOPREQ2_KEY_S 16U
#define SYSCTL_CMCLKSTOPREQ2_KEY_M 0xFFFF0000U // Key field
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMCLKSTOPACK1 register
//
//*************************************************************************************************
#define SYSCTL_CMCLKSTOPACK1_MCAN_A 0x100U // MCAN_A Clock Stop Ack Bit
//*************************************************************************************************
//
// The following are defines for the bit fields in the MCANWAKESTATUS register
//
//*************************************************************************************************
#define SYSCTL_MCANWAKESTATUS_WAKE 0x1U // MCAN Wake Status
//*************************************************************************************************
//
// The following are defines for the bit fields in the MCANWAKESTATUSCLR register
//
//*************************************************************************************************
#define SYSCTL_MCANWAKESTATUSCLR_WAKE 0x1U // Cear bit for MCANWAKESTATUS.WAKE bit
//*************************************************************************************************
//
// The following are defines for the bit fields in the PALLOCATESTS register
//
//*************************************************************************************************
#define SYSCTL_PALLOCATESTS_USB 0x1U // Status of PALLOCATE.USB bit
#define SYSCTL_PALLOCATESTS_ETHERCAT 0x2U // Status of PALLOCATE.ETHERCAT bit
#define SYSCTL_PALLOCATESTS_CAN_A 0x4U // Status of PALLOCATE.CAN_A bit
#define SYSCTL_PALLOCATESTS_CAN_B 0x8U // Status of PALLOCATE.CAN_B bit
#define SYSCTL_PALLOCATESTS_MCAN_A 0x10U // Status of PALLOCATE.MCAN_A bit
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMRESCCLR register
//
//*************************************************************************************************
#define SYSCTL_CMRESCCLR_PORESETN 0x1U // PORESETn status flag clear
#define SYSCTL_CMRESCCLR_XRSN 0x2U // XRSn status flag clear
#define SYSCTL_CMRESCCLR_CPU1WDRSN 0x4U // CPU1WDRSn status flag clear
#define SYSCTL_CMRESCCLR_CPU1NMIWDRSN 0x8U // CPU1NMIWDRSn status flag clear
#define SYSCTL_CMRESCCLR_CPU1SYSRSN 0x10U // CPU1SYSRSN status flag clear
#define SYSCTL_CMRESCCLR_CPU1SCCRESETN 0x20U // CPU1SCCRESETn status flag clear
#define SYSCTL_CMRESCCLR_ECAT_RESET_OUT 0x40U // ECAT_RESET_OUT status flag clear
#define SYSCTL_CMRESCCLR_CPU1SIMRESET_CPURSN 0x80U // CPU1SIMRESET_CPURSn status flag clear
#define SYSCTL_CMRESCCLR_CMRSTCTLRESETREQ 0x100U // CMRSTCTLRESETREQ status flag clear
#define SYSCTL_CMRESCCLR_CPU1_SIMRESET_XRSN 0x200U // CPU1_SIMRESET_XRSn status flag clear
#define SYSCTL_CMRESCCLR_CMVECTRESETN 0x10000U // CMVECTRESETn status flag clear
#define SYSCTL_CMRESCCLR_CMSYSRESETREQ 0x20000U // CMSYSRESETREQ status flag clear
#define SYSCTL_CMRESCCLR_CMNMIWDRSTN 0x40000U // CMNMIWDRSTn status flag clear
#define SYSCTL_CMRESCCLR_CMEOLRESETN 0x80000U // CMEOLRESETn status flag clear
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMRESC register
//
//*************************************************************************************************
#define SYSCTL_CMRESC_PORESETN 0x1U // PORESETn caused the reset of CM
#define SYSCTL_CMRESC_XRSN 0x2U // XRSn caused the reset of CM
#define SYSCTL_CMRESC_CPU1_WDRSN 0x4U // CPU1_WDRSn caused the reset of CM
#define SYSCTL_CMRESC_CPU1_NMIWDRSN 0x8U // CPU1_NMIWDRSn caused the reset of CM
#define SYSCTL_CMRESC_CPU1_SYSRSN 0x10U // CPU1_SYSRSN caused the reset of CM
#define SYSCTL_CMRESC_CPU1_SCCRESETN 0x20U // CPU1_SCCRESETn caused the reset of CM
#define SYSCTL_CMRESC_ECAT_RESET_OUT 0x40U // ECAT_RESET_OUT caused the reset of CM
#define SYSCTL_CMRESC_CPU1_SIMRESET_CPURSN 0x80U // CPU1_SIMRESET_CPURSn caused the reset of
// CM
#define SYSCTL_CMRESC_CMRSTCTL_RESETREQ 0x100U // CMRSTCTL_RESETREQ caused the reset of CM
#define SYSCTL_CMRESC_CPU1_SIMRESET_XRSN 0x200U // CPU1_SIMRESET_XRSn caused the reset of
// CM
#define SYSCTL_CMRESC_CMVECTRESETN 0x10000U // CMVECTRESETn caused the reset of CM
#define SYSCTL_CMRESC_CMSYSRESETREQ 0x20000U // CMSYSRESETREQ caused the reset of CM
#define SYSCTL_CMRESC_CMNMIWDRSTN 0x40000U // CMNMIWDRSTn caused the reset of CM
#define SYSCTL_CMRESC_CMEOLRESETN 0x80000U // CMEOLRESETn caused the reset of CM
//*************************************************************************************************
//
// The following are defines for the bit fields in the CMSYSCTLLOCK register
//
//*************************************************************************************************
#define SYSCTL_CMSYSCTLLOCK_LOCK 0x1U // Locks the configuration registers of CM System Control
#endif
@@ -0,0 +1,84 @@
//*****************************************************************************
//
// hw_types.h - Common types and macros.
//
// Copyright (c) 2005-2016 Texas Instruments Incorporated. All rights reserved.
// Software License Agreement
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// This is part of revision 2.1.3.156 of the Tiva Firmware Development Package.
//
//*****************************************************************************
#ifndef __HW_TYPES_H__
#define __HW_TYPES_H__
//*****************************************************************************
//
// Macros for hardware access, both direct and via the bit-band region.
//
//*****************************************************************************
#define HWREG(x) \
(*((volatile uint32_t *)(x)))
#define HWREGH(x) \
(*((volatile uint16_t *)(x)))
#define HWREGB(x) \
(*((volatile uint8_t *)(x)))
#define HWREGBITW(x, b) \
HWREG(((uint32_t)(x) & 0xF0000000) | 0x02000000 | \
(((uint32_t)(x) & 0x000FFFFF) << 5) | ((b) << 2))
#define HWREGBITH(x, b) \
HWREGH(((uint32_t)(x) & 0xF0000000) | 0x02000000 | \
(((uint32_t)(x) & 0x000FFFFF) << 5) | ((b) << 2))
#define HWREGBITB(x, b) \
HWREGB(((uint32_t)(x) & 0xF0000000) | 0x02000000 | \
(((uint32_t)(x) & 0x000FFFFF) << 5) | ((b) << 2))
//
// The HWREG_BP Define uses __byte_peripheral_32 intrinsic which can be
// used to access a 32-bit byte peripherals data address, preventing the
// accesses from being broken up. The intrinsic returns a reference to an
// unsigned long and can be used both to read and write data. This is
// applicable for the C28x Driver and is not applicable for CM Driver. Thus
// the define HWREG_BP has been mapped to HWREG.
//
#define HWREG_BP(x) \
HWREG(x)
//****************************************************************************
//
// For checking NULL pointers
//
//****************************************************************************
#ifndef NULL
#define NULL ((void *)0x0)
#endif
#endif // __HW_TYPES_H__
@@ -0,0 +1,690 @@
/**
* \file hw_types.h
*
* \brief This file contains the in-line functions required to read/write
* values from/to the hardware registers. This file also contains field
* manipulation macros to get and set field values.
*
* \copyright Copyright (C) 2013 Texas Instruments Incorporated - www.ti.com
*/
/**
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef HW_TYPES_H_
#define HW_TYPES_H_
/* ========================================================================== */
/* Include Files */
/* ========================================================================== */
#ifdef __cplusplus
extern "C" {
#endif
/* ========================================================================== */
/* Macros & Typedefs */
/* ========================================================================== */
/**
* \brief This macro reads a 32-bit value from a hardware register
* and returns the value.
*
* \param addr Address of the memory mapped hardware register.
*
* \return Unsigned 32-bit value read from a register.
*/
#define HW_RD_REG32(addr) (uint32_t)(HW_RD_REG32_RAW((uint32_t) (addr)))
/**
* \brief This macro writes a 32-bit value to a hardware register.
*
* \param addr Address of the memory mapped hardware register.
* \param value unsigned 32-bit value which has to be written to the
* register.
*/
#define HW_WR_REG32(addr, value) \
(HW_WR_REG32_RAW((uint32_t) (addr), (uint32_t) (value)))
/**
* \brief This macro reads a 16-bit value from a hardware register
* and returns the value.
*
* \param addr Address of the memory mapped hardware register.
*
* \return Unsigned 16-bit value read from a register.
*/
#define HW_RD_REG16(addr) (HW_RD_REG16_RAW((uint32_t) (addr)))
/**
* \brief This macro writes a 16-bit value to a hardware register.
*
* \param addr Address of the memory mapped hardware register.
* \param value unsigned 16-bit value which has to be written to the
* register.
*/
#define HW_WR_REG16(addr, value) \
(HW_WR_REG16_RAW((uint32_t) (addr), (uint16_t) (value)))
/**
* \brief This macro reads a 8-bit value from a hardware register
* and returns the value.
*
* \param addr Address of the memory mapped hardware register.
*
* \return Unsigned 8-bit value read from a register.
*/
#define HW_RD_REG8(addr) (HW_RD_REG8_RAW((uint32_t) (addr)))
/**
* \brief This macro writes a 8-bit value to a hardware
* register.
*
* \param addr Address of the memory mapped hardware register.
* \param value unsigned 8-bit value which has to be written to the
* register.
*/
#define HW_WR_REG8(addr, value) \
(HW_WR_REG8_RAW((uint32_t) (addr), (uint8_t) (value)))
/**
* \brief Macro to extract a field value. This macro extracts the field value
* from a 32-bit variable (which contains the register value).
* This macro does not read from actual register address, and only
* extracts the field from a variable.
*
* \param regVal 32-bit variable containing the register value.
* \param REG_FIELD Peripheral register bit field name, whose value has to
* be extracted.
*/
/*TI_INSPECTED 76 S : MISRAC_2012_R.20.11
* "The places in which order of evaluation has no side effects could be a
waiver. This used in SHIFT and MASK to extract specified field value " */
/*TI_INSPECTED 125 S : MISRAC_2012_R.20.12
* "The places in which order of evaluation has no side effects could be a
waiver. ## operator here used in SHIFT and MASK to extract specified field
value " */
#define HW_GET_FIELD(regVal, REG_FIELD) \
(((regVal) & (uint32_t) REG_FIELD##_MASK) >> (uint32_t) REG_FIELD##_SHIFT)
/**
* \brief Macro to write a specific field value. This macro first clears the
* specified field value and then performs "OR" of the field value which
* is shifted and masked. This will set the field value at its
* desired position.
*
* \param regVal 32-bit variable containing the register value.
* \param REG_FIELD Peripheral register bit field name, to which specified
* value has to be set.
* \param fieldVal Value of the field which has to be set.
*/
/*TI_INSPECTED 76 S : MISRAC_2012_R.20.11
* "The places in which order of evaluation has no side effects could be a
waiver. This used in SHIFT and MASK to extract specified field value " */
/*TI_INSPECTED 125 S : MISRAC_2012_R.20.12
* "The places in which order of evaluation has no side effects could be a
waiver. ## operator here used in SHIFT and MASK to extract specified field
value " */
#define HW_SET_FIELD32(regVal, REG_FIELD, fieldVal) \
((regVal) = ((regVal) & (uint32_t) (~(uint32_t) REG_FIELD##_MASK)) | \
((((uint32_t) (fieldVal)) << (uint32_t) REG_FIELD##_SHIFT) \
& (uint32_t) REG_FIELD##_MASK))
/**
* \brief Macro to write a specific field value. This macro first clears the
* specified field value and then performs "OR" of the field value which
* is shifted and masked. This will set the field value at its
* desired position.
*
* \param regVal 16-bit variable containing the register value.
* \param REG_FIELD Peripheral register bit field name, to which specified
* value has to be set.
* \param fieldVal Value of the field which has to be set.
*/
/*TI_INSPECTED 76 S : MISRAC_2012_R.20.11
* "The places in which order of evaluation has no side effects could be a
waiver. This used in SHIFT and MASK to extract specified field value " */
/*TI_INSPECTED 125 S : MISRAC_2012_R.20.12
* "The places in which order of evaluation has no side effects could be a
waiver. ## operator here used in SHIFT and MASK to extract specified field
value " */
#define HW_SET_FIELD16(regVal, REG_FIELD, fieldVal) \
((regVal) = ((regVal) & (uint16_t) (~(uint16_t) REG_FIELD##_MASK)) | \
((((uint16_t) (fieldVal)) << (uint16_t) REG_FIELD##_SHIFT) \
& (uint16_t) REG_FIELD##_MASK))
/**
* \brief Macro to write a specific field value. This macro first clears the
* specified field value and then performs "OR" of the field value which
* is shifted and masked. This will set the field value at its
* desired position.
*
* \param regVal 8-bit variable containing the register value.
* \param REG_FIELD Peripheral register bit field name, to which specified
* value has to be set.
* \param fieldVal Value of the field which has to be set.
*/
/*TI_INSPECTED 76 S : MISRAC_2012_R.20.11
* "The places in which order of evaluation has no side effects could be a
waiver. This used in SHIFT and MASK to extract specified field value " */
/*TI_INSPECTED 125 S : MISRAC_2012_R.20.12
* "The places in which order of evaluation has no side effects could be a
waiver. ## operator here used in SHIFT and MASK to extract specified field
value " */
#define HW_SET_FIELD8(regVal, REG_FIELD, fieldVal) \
((regVal) = ((regVal) & (uint8_t) (~(uint8_t) REG_FIELD##_MASK)) | \
((((uint8_t) (fieldVal)) << (uint8_t) REG_FIELD##_SHIFT) \
& (uint8_t) REG_FIELD##_MASK))
/**
* \brief This macro calls read-modify-write API for 32 bit register. It also
* frames the mask and shift from register field macro.
*
* \param regAddr Register Address.
* \param REG_FIELD Peripheral register bit field name, to which specified
* value has to be set.
* \param fieldVal Value of the field which has to be set.
*/
/*TI_INSPECTED 76 S : MISRAC_2012_R.20.11
* "The places in which order of evaluation has no side effects could be a
waiver. This used in SHIFT and MASK to extract specified field value " */
/*TI_INSPECTED 125 S : MISRAC_2012_R.20.12
* "The places in which order of evaluation has no side effects could be a
waiver. ## operator here used in SHIFT and MASK to extract specified field
value " */
#define HW_WR_FIELD32(regAddr, REG_FIELD, fieldVal) \
(HW_WR_FIELD32_RAW((uint32_t) (regAddr), (uint32_t) REG_FIELD##_MASK, \
(uint32_t) REG_FIELD##_SHIFT, (uint32_t) (fieldVal)))
/**
* \brief This macro calls read-modify-write API for 16 bit register. It also
* frames the mask and shift from register field macro.
*
* \param regAddr Register Address.
* \param REG_FIELD Peripheral register bit field name, to which specified
* value has to be set.
* \param fieldVal Value of the field which has to be set.
*/
/*TI_INSPECTED 76 S : MISRAC_2012_R.20.11
* "The places in which order of evaluation has no side effects could be a
waiver. This used in SHIFT and MASK to extract specified field value " */
/*TI_INSPECTED 125 S : MISRAC_2012_R.20.12
* "The places in which order of evaluation has no side effects could be a
waiver. ## operator here used in SHIFT and MASK to extract specified field
value " */
#define HW_WR_FIELD16(regAddr, REG_FIELD, fieldVal) \
(HW_WR_FIELD16_RAW((uint32_t) (regAddr), (uint16_t) REG_FIELD##_MASK, \
(uint32_t) REG_FIELD##_SHIFT, (uint16_t) (fieldVal)))
/**
* \brief This macro calls read-modify-write API for 8 bit register. It also
* frames the mask and shift from register field macro.
*
* \param regAddr Register Address.
* \param REG_FIELD Peripheral register bit field name, to which specified
* value has to be set.
* \param fieldVal Value of the field which has to be set.
*/
/*TI_INSPECTED 76 S : MISRAC_2012_R.20.11
* "The places in which order of evaluation has no side effects could be a
waiver. This used in SHIFT and MASK to extract specified field value " */
/*TI_INSPECTED 125 S : MISRAC_2012_R.20.12
* "The places in which order of evaluation has no side effects could be a
waiver. ## operator here used in SHIFT and MASK to extract specified field
value " */
#define HW_WR_FIELD8(regAddr, REG_FIELD, fieldVal) \
(HW_WR_FIELD8_RAW((uint32_t) (regAddr), (uint8_t) REG_FIELD##_MASK, \
(uint32_t) REG_FIELD##_SHIFT, (uint8_t) (fieldVal)))
/**
* \brief This macro calls read field API for 32 bit register. It also
* frames the mask and shift from register field macro.
*
* \param regAddr Register Address.
* \param REG_FIELD Peripheral register bit field name, from which
* specified bit-field value has to be read.
* \return Value of the bit-field
*/
/*TI_INSPECTED 76 S : MISRAC_2012_R.20.11
* "The places in which order of evaluation has no side effects could be a
waiver. This used in SHIFT and MASK to extract specified field value " */
/*TI_INSPECTED 125 S : MISRAC_2012_R.20.12
* "The places in which order of evaluation has no side effects could be a
waiver. ## operator here used in SHIFT and MASK to extract specified field
value " */
#define HW_RD_FIELD32(regAddr, REG_FIELD) \
(HW_RD_FIELD32_RAW((uint32_t) (regAddr), (uint32_t) REG_FIELD##_MASK, \
(uint32_t) REG_FIELD##_SHIFT))
/**
* \brief This macro calls read field API for 16 bit register. It also
* frames the mask and shift from register field macro.
*
* \param regAddr Register Address.
* \param REG_FIELD Peripheral register bit field name, from which
* specified bit-field value has to be read.
* \return Value of the bit-field
*/
/*TI_INSPECTED 76 S : MISRAC_2012_R.20.11
* "The places in which order of evaluation has no side effects could be a
waiver. This used in SHIFT and MASK to extract specified field value " */
/*TI_INSPECTED 125 S : MISRAC_2012_R.20.12
* "The places in which order of evaluation has no side effects could be a
waiver. ## operator here used in SHIFT and MASK to extract specified field
value " */
#define HW_RD_FIELD16(regAddr, REG_FIELD) \
(HW_RD_FIELD16_RAW((uint32_t) (regAddr), (uint16_t) REG_FIELD##_MASK, \
(uint32_t) REG_FIELD##_SHIFT))
/**
* \brief This macro calls read field API for 8 bit register. It also
* frames the mask and shift from register field macro.
*
* \param regAddr Register Address.
* \param REG_FIELD Peripheral register bit field name, from which
* specified bit-field value has to be read.
* \return Value of the bit-field
*/
/*TI_INSPECTED 76 S : MISRAC_2012_R.20.11
* "The places in which order of evaluation has no side effects could be a
waiver. This used in SHIFT and MASK to extract specified field value " */
/*TI_INSPECTED 125 S : MISRAC_2012_R.20.12
* "The places in which order of evaluation has no side effects could be a
waiver. ## operator here used in SHIFT and MASK to extract specified field
value " */
#define HW_RD_FIELD8(regAddr, REG_FIELD) \
(HW_RD_FIELD8_RAW((uint32_t) (regAddr), (uint8_t) REG_FIELD##_MASK, \
(uint32_t) REG_FIELD##_SHIFT))
/* ========================================================================== */
/* Structures and Enums */
/* ========================================================================== */
/* None */
/* ========================================================================== */
/* Global Variables Declarations */
/* ========================================================================== */
/* None */
/* ========================================================================== */
/* Function Declarations */
/* ========================================================================== */
/**
* \brief This function reads a 32-bit value from a hardware register
* and returns the value.
*
* \param addr Address of the memory mapped hardware register.
*
* \return Unsigned 32-bit value read from a register.
*/
static inline uint32_t HW_RD_REG32_RAW(uint32_t addr);
/**
* \brief This function writes a 32-bit value to a hardware register.
*
* \param addr Address of the memory mapped hardware register.
* \param value unsigned 32-bit value which has to be written to the
* register.
*/
static inline void HW_WR_REG32_RAW(uint32_t addr, uint32_t value);
/**
* \brief This function reads a 16-bit value from a hardware register
* and returns the value.
*
* \param addr Address of the memory mapped hardware register.
*
* \return Unsigned 16-bit value read from a register.
*/
static inline uint16_t HW_RD_REG16_RAW(uint32_t addr);
/**
* \brief This function writes a 16-bit value to a hardware register.
*
* \param addr Address of the memory mapped hardware register.
* \param value unsigned 16-bit value which has to be written to the
* register.
*/
static inline void HW_WR_REG16_RAW(uint32_t addr, uint16_t value);
/**
* \brief This function reads a 8-bit value from a hardware register
* and returns the value.
*
* \param addr Address of the memory mapped hardware register.
*
* \return Unsigned 8-bit value read from a register.
*/
static inline uint8_t HW_RD_REG8_RAW(uint32_t addr);
/**
* \brief This function writes a 8-bit value to a hardware
* register.
*
* \param addr Address of the memory mapped hardware register.
* \param value unsigned 8-bit value which has to be written to the
* register.
*/
static inline void HW_WR_REG8_RAW(uint32_t addr, uint8_t value);
/**
* \brief This function reads a 32 bit register, modifies specific set of
* bits and writes back to the register.
*
* \param addr Address of the memory mapped hardware register.
* \param mask Mask for the bit field.
* \param shift Bit field shift from LSB.
* \param value Value to be written to bit-field.
*/
static inline void HW_WR_FIELD32_RAW(uint32_t addr,
uint32_t mask,
uint32_t shift,
uint32_t value);
/**
* \brief This function reads a 16 bit register, modifies specific set of
* bits and writes back to the register.
*
* \param addr Address of the memory mapped hardware register.
* \param mask Mask for the bit field.
* \param shift Bit field shift from LSB.
* \param value Value to be written to bit-field.
*/
static inline void HW_WR_FIELD16_RAW(uint32_t addr,
uint16_t mask,
uint32_t shift,
uint16_t value);
/**
* \brief This function reads a 8 bit register, modifies specific set of
* bits and writes back to the register.
*
* \param addr Address of the memory mapped hardware register.
* \param mask Mask for the bit field.
* \param shift Bit field shift from LSB.
* \param value Value to be written to bit-field.
*/
static inline void HW_WR_FIELD8_RAW(uint32_t addr,
uint8_t mask,
uint32_t shift,
uint8_t value);
/**
* \brief This function reads a 32 bit register, masks specific set of bits
* and the left shifted value.
*
* \param addr Address of the memory mapped hardware register.
* \param mask Mask for the bit field.
* \param shift Bit field shift from LSB.
*
* \return Bit-field value (absolute value - shifted to LSB position)
*/
static inline uint32_t HW_RD_FIELD32_RAW(uint32_t addr,
uint32_t mask,
uint32_t shift);
/**
* \brief This function reads a 16 bit register, masks specific set of bits
* and the left shifted value.
*
* \param addr Address of the memory mapped hardware register.
* \param mask Mask for the bit field.
* \param shift Bit field shift from LSB.
*
* \return Bit-field value (absolute value - shifted to LSB position)
*/
static inline uint16_t HW_RD_FIELD16_RAW(uint32_t addr,
uint16_t mask,
uint32_t shift);
/**
* \brief This function reads a 8 bit register, masks specific set of bits
* and the left shifted value.
*
* \param addr Address of the memory mapped hardware register.
* \param mask Mask for the bit field.
* \param shift Bit field shift from LSB.
*
* \return Bit-field value (absolute value - shifted to LSB position)
*/
static inline uint8_t HW_RD_FIELD8_RAW(uint32_t addr,
uint8_t mask,
uint32_t shift);
/* ========================================================================== */
/* Static Function Definitions */
/* ========================================================================== */
/*TI_INSPECTED 35 S : MISRAC_2012_R.2.1
* "Reason - This function is called using HW_RD_REG32 mcaro " */
/*TI_INSPECTED 101 S : MISRAC_2012_R.10.3
* "Reason - Tool Issue: Not able to understand Inline Function return type " */
/*TI_INSPECTED 102 S : MISRAC_2012_R.8.4
* "Reason - Tool Issue: Not able to understand Inline Function return type " */
static inline uint32_t HW_RD_REG32_RAW(uint32_t addr)
{
/*TI_INSPECTED 440 S : MISRAC_2012_R.11.4
* "Reason - Pointer typecast required here since addr variable holds
* required register value" */
uint32_t regVal = *(volatile uint32_t *) addr;
return (regVal);
}
/*TI_INSPECTED 35 S : MISRAC_2012_R.2.1
* "Reason - This function is called using HW_WR_REG32 mcaro " */
/*TI_INSPECTED 131 S : MISRAC_2012_R.5.3
* "Tool Issue - argument 'value' used here is in same scope " */
/*TI_INSPECTED 14 D 1: MISRAC_2012_R.5.8
* "Tool Issue - Modifying the contents stored at address not the addr itself */
static inline void HW_WR_REG32_RAW(uint32_t addr, uint32_t value)
{
/*TI_INSPECTED 18 D : MISRAC_2012_R.5.3
* "Tool Issue - argument 'value' used here is in same scope " */
*(volatile uint32_t *) addr = value;
return;
}
/*TI_INSPECTED 35 S : MISRAC_2012_R.2.1
* "Reason - This function is called using HW_RD_REG16 mcaro " */
static inline uint16_t HW_RD_REG16_RAW(uint32_t addr)
{
/*TI_INSPECTED 440 S : MISRAC_2012_R.11.4
* "Reason - Pointer typecast required here since addr variable holds
* required register value" */
uint16_t regVal = *(volatile uint16_t *) addr;
return (regVal);
}
/*TI_INSPECTED 35 S : MISRAC_2012_R.2.1
* "Reason - This function is called using HW_WR_REG16 mcaro " */
/*TI_INSPECTED 131 S : MISRAC_2012_R.5.3
* "Tool Issue - argument 'value' used here is in same scope " */
/*TI_INSPECTED 14 D 1: MISRAC_2012_R.5.8
* "Tool Issue - Modifying the contents stored at address not the addr itself */
static inline void HW_WR_REG16_RAW(uint32_t addr, uint16_t value)
{
/*TI_INSPECTED 18 D : MISRAC_2012_R.5.3
* "Tool Issue - argument 'value' used here is in same scope " */
*(volatile uint16_t *) addr = value;
return;
}
/*TI_INSPECTED 35 S : MISRAC_2012_R.2.1
* "Reason - This function is called using HW_RD_REG8 mcaro " */
static inline uint8_t HW_RD_REG8_RAW(uint32_t addr)
{
/*TI_INSPECTED 440 S : MISRAC_2012_R.11.4
* "Reason - Pointer typecast required here since addr variable holds
* required register value" */
uint8_t regVal = *(volatile uint8_t *) addr;
return (regVal);
}
/*TI_INSPECTED 35 S : MISRAC_2012_R.2.1
* "Reason - This function is called using HW_WR_REG8 mcaro " */
/*TI_INSPECTED 131 S : MISRAC_2012_R.5.3
* "Tool Issue - argument 'value' used here is in same scope " */
/*TI_INSPECTED 14 D 1: MISRAC_2012_R.5.8
* "Tool Issue - Modifying the contents stored at address not the addr itself */
static inline void HW_WR_REG8_RAW(uint32_t addr, uint8_t value)
{
/*TI_INSPECTED 18 D : MISRAC_2012_R.5.3
* "Tool Issue - argument 'value' used here is in same scope " */
*(volatile uint8_t *) addr = value;
return;
}
/*TI_INSPECTED 35 S : MISRAC_2012_R.2.1
* "Reason - This function is called using HW_WR_FIELD32 mcaro " */
/*TI_INSPECTED 14 D 1: MISRAC_2012_R.5.8
* "Tool Issue - Modifying the contents stored at address not the addr itself */
static inline void HW_WR_FIELD32_RAW(uint32_t addr,
uint32_t mask,
uint32_t shift,
uint32_t value)
{
/*TI_INSPECTED 440 S : MISRAC_2012_R.11.4
* "Reason - Pointer typecast required here since addr variable holds
* required register value" */
uint32_t regVal = *(volatile uint32_t *) addr;
regVal &= (~mask);
regVal |= (value << shift) & mask;
/*TI_INSPECTED 440 S : MISRAC_2012_R.11.4
* "Reason - Pointer typecast required here since addr variable holds
* required register value" */
*(volatile uint32_t *) addr = regVal;
return;
}
/*TI_INSPECTED 35 S : MISRAC_2012_R.2.1
* "Reason - This function is called using HW_WR_FIELD16 mcaro " */
/*TI_INSPECTED 14 D 1: MISRAC_2012_R.5.8
* "Tool Issue - Modifying the contents stored at address not the addr itself */
static inline void HW_WR_FIELD16_RAW(uint32_t addr,
uint16_t mask,
uint32_t shift,
uint16_t value)
{
uint32_t tempVal;
/*TI_INSPECTED 440 S : MISRAC_2012_R.11.4
* "Reason - Pointer typecast required here since addr variable holds
* required register value" */
uint16_t regVal = *(volatile uint16_t *) addr;
tempVal = ((uint32_t) regVal);
tempVal &= (~((uint32_t) mask));
tempVal |= (((uint32_t) value) << shift) & ((uint32_t) mask);
regVal = (uint16_t) tempVal;
/*TI_INSPECTED 440 S : MISRAC_2012_R.11.4
* "Reason - Pointer typecast required here since addr variable holds
* required register value" */
*(volatile uint16_t *) addr = regVal;
return;
}
/*TI_INSPECTED 35 S : MISRAC_2012_R.2.1
* "Reason - This function is called using HW_WR_FIELD8 mcaro " */
/*TI_INSPECTED 14 D 1: MISRAC_2012_R.5.8
* "Tool Issue - Modifying the contents stored at address not the addr itself */
static inline void HW_WR_FIELD8_RAW(uint32_t addr,
uint8_t mask,
uint32_t shift,
uint8_t value)
{
uint32_t tempVal;
/*TI_INSPECTED 440 S : MISRAC_2012_R.11.4
* "Reason - Pointer typecast required here since addr variable holds
* required register value" */
uint8_t regVal = *(volatile uint8_t *) addr;
tempVal = ((uint32_t) regVal);
tempVal &= (~((uint32_t) mask));
tempVal |= (((uint32_t) value) << shift) & ((uint32_t) mask);
regVal = (uint8_t) tempVal;
/*TI_INSPECTED 440 S : MISRAC_2012_R.11.4
* "Reason - Pointer typecast required here since addr variable holds
* required register value" */
*(volatile uint8_t *) addr = regVal;
return;
}
/*TI_INSPECTED 35 S : MISRAC_2012_R.2.1
* "Reason - This function is called using HW_RD_FIELD32 mcaro " */
static inline uint32_t HW_RD_FIELD32_RAW(uint32_t addr,
uint32_t mask,
uint32_t shift)
{
/*TI_INSPECTED 440 S : MISRAC_2012_R.11.4
* "Reason - Pointer typecast required here since addr variable holds
* required register value" */
uint32_t regVal = *(volatile uint32_t *) addr;
regVal = (regVal & mask) >> shift;
return (regVal);
}
/*TI_INSPECTED 35 S : MISRAC_2012_R.2.1
* "Reason - This function is called using HW_RD_FIELD16 mcaro " */
static inline uint16_t HW_RD_FIELD16_RAW(uint32_t addr,
uint16_t mask,
uint32_t shift)
{
uint32_t tempVal;
/*TI_INSPECTED 440 S : MISRAC_2012_R.11.4
* "Reason - Pointer typecast required here since addr variable holds
* required register value" */
uint16_t regVal = *(volatile uint16_t *) addr;
tempVal = (((uint32_t) regVal & (uint32_t) mask) >> shift);
regVal = (uint16_t) tempVal;
return (regVal);
}
/*TI_INSPECTED 35 S : MISRAC_2012_R.2.1
* "Reason - This function is called using HW_RD_FIELD8 mcaro " */
static inline uint8_t HW_RD_FIELD8_RAW(uint32_t addr,
uint8_t mask,
uint32_t shift)
{
uint32_t tempVal;
/*TI_INSPECTED 440 S : MISRAC_2012_R.11.4
* "Reason - Pointer typecast required here since addr variable holds
* required register value" */
uint8_t regVal = *(volatile uint8_t *) addr;
tempVal = (((uint32_t) regVal & (uint32_t) mask) >> shift);
regVal = (uint8_t) tempVal;
return (regVal);
}
#ifdef __cplusplus
}
#endif
#endif /* #ifndef HW_TYPES_H_ */
@@ -0,0 +1,387 @@
//###########################################################################
//
// FILE: hw_uart.h
//
// TITLE: Definitions for the UART registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_UART_H
#define HW_UART_H
//*************************************************************************************************
//
// The following are defines for the UART register offsets
//
//*************************************************************************************************
#define UART_O_DR 0x0U // UART Data
#define UART_O_RSR 0x4U // UART Receive Status/Error Clear
#define UART_O_FR 0x18U // UART Flag
#define UART_O_ILPR 0x20U // UART IrDA Low-Power Register
#define UART_O_IBRD 0x24U // UART Integer Baud-Rate Divisor
#define UART_O_FBRD 0x28U // UART Fractional Baud-Rate Divisor
#define UART_O_LCRH 0x2CU // UART Line Control
#define UART_O_CTL 0x30U // UART Control
#define UART_O_IFLS 0x34U // UART Interrupt FIFO Level Select
#define UART_O_IM 0x38U // UART Interrupt Mask
#define UART_O_RIS 0x3CU // UART Raw Interrupt Status
#define UART_O_MIS 0x40U // UART Masked Interrupt Status
#define UART_O_ICR 0x44U // UART Interrupt Clear
#define UART_O_DMACTL 0x48U // UART DMA Control
#define UART_O_9BITADDR 0xA4U // UART 9-Bit Self Address
#define UART_O_9BITAMASK 0xA8U // UART 9-Bit Self Address Mask
#define UART_O_PP 0xFC0U // UART Peripheral Properties
#define UART_O_PERIPHID4 0xFD0U // UART Peripheral Identification 4
#define UART_O_PERIPHID5 0xFD4U // UART Peripheral Identification 5
#define UART_O_PERIPHID6 0xFD8U // UART Peripheral Identification 6
#define UART_O_PERIPHID7 0xFDCU // UART Peripheral Identification 7
#define UART_O_PERIPHID0 0xFE0U // UART Peripheral Identification 0
#define UART_O_PERIPHID1 0xFE4U // UART Peripheral Identification 1
#define UART_O_PERIPHID2 0xFE8U // UART Peripheral Identification 2
#define UART_O_PERIPHID3 0xFECU // UART Peripheral Identification 3
#define UART_O_PCELLID0 0xFF0U // UART PrimeCell Identification 0
#define UART_O_PCELLID1 0xFF4U // UART PrimeCell Identification 1
#define UART_O_PCELLID2 0xFF8U // UART PrimeCell Identification 2
#define UART_O_PCELLID3 0xFFCU // UART PrimeCell Identification 3
#define UART_O_ECR 0x4U // UART Error Clear
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTDR register
//
//*************************************************************************************************
#define UART_DR_DATA_S 0U
#define UART_DR_DATA_M 0xFFU // Data Transmitted or Received
#define UART_DR_FE 0x100U // UART Framing Error
#define UART_DR_PE 0x200U // UART Parity Error
#define UART_DR_BE 0x400U // UART Break Error
#define UART_DR_OE 0x800U // UART Overrun Error
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTRSR register
//
//*************************************************************************************************
#define UART_RSR_FE 0x1U // UART Framing Error
#define UART_RSR_PE 0x2U // UART Parity Error
#define UART_RSR_BE 0x4U // UART Break Error
#define UART_RSR_OE 0x8U // UART Overrun Error
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTFR register
//
//*************************************************************************************************
#define UART_FR_BUSY 0x8U // UART Busy
#define UART_FR_RXFE 0x10U // UART Receive FIFO Empty
#define UART_FR_TXFF 0x20U // UART Transmit FIFO Full
#define UART_FR_RXFF 0x40U // UART Receive FIFO Full
#define UART_FR_TXFE 0x80U // UART Transmit FIFO Empty
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTILPR register
//
//*************************************************************************************************
#define UART_ILPR_ILPDVSR_S 0U
#define UART_ILPR_ILPDVSR_M 0xFFU // IrDA Low-Power Divisor
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTIBRD register
//
//*************************************************************************************************
#define UART_IBRD_DIVINT_S 0U
#define UART_IBRD_DIVINT_M 0xFFFFU // Integer Baud-Rate Divisor
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTFBRD register
//
//*************************************************************************************************
#define UART_FBRD_DIVFRAC_S 0U
#define UART_FBRD_DIVFRAC_M 0x3FU // Fractional Baud-Rate Divisor
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTLCRH register
//
//*************************************************************************************************
#define UART_LCRH_BRK 0x1U // UART Send Break
#define UART_LCRH_PEN 0x2U // UART Parity Enable
#define UART_LCRH_EPS 0x4U // UART Even Parity Select
#define UART_LCRH_STP2 0x8U // UART Two Stop Bits Select
#define UART_LCRH_FEN 0x10U // UART Enable FIFOs
#define UART_LCRH_WLEN_S 5U
#define UART_LCRH_WLEN_M 0x60U // UART Word Length
#define UART_LCRH_SPS 0x80U // UART Stick Parity Select
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTCTL register
//
//*************************************************************************************************
#define UART_CTL_UARTEN 0x1U // UART Enable
#define UART_CTL_SIREN 0x2U // UART SIR Enable
#define UART_CTL_SIRLP 0x4U // UART SIR Low-Power Mode
#define UART_CTL_EOT 0x10U // End of Transmission
#define UART_CTL_HSE 0x20U // High-Speed Enable
#define UART_CTL_LBE 0x80U // UART Loop Back Enable
#define UART_CTL_TXE 0x100U // UART Transmit Enable
#define UART_CTL_RXE 0x200U // UART Receive Enable
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTIFLS register
//
//*************************************************************************************************
#define UART_IFLS_TXIFLSEL_S 0U
#define UART_IFLS_TXIFLSEL_M 0x7U // UART Transmit Interrupt FIFO Level Select
#define UART_IFLS_RXIFLSEL_S 3U
#define UART_IFLS_RXIFLSEL_M 0x38U // UART Receive Interrupt FIFO Level Select
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTIM register
//
//*************************************************************************************************
#define UART_IM_RXIM 0x10U // UART Receive Interrupt Mask
#define UART_IM_TXIM 0x20U // UART Transmit Interrupt Mask
#define UART_IM_RTIM 0x40U // UART Receive Time-Out Interrupt Mask
#define UART_IM_FEIM 0x80U // UART Framing Error Interrupt Mask
#define UART_IM_PEIM 0x100U // UART Parity Error Interrupt Mask
#define UART_IM_BEIM 0x200U // UART Break Error Interrupt Mask
#define UART_IM_OEIM 0x400U // UART Overrun Error Interrupt Mask
#define UART_IM_9BITIM 0x1000U // 9-Bit Mode Interrupt Mask
#define UART_IM_DMARXIM 0x10000U // Receive DMA Interrupt Mask
#define UART_IM_DMATXIM 0x20000U // Transmit DMA Interrupt Mask
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTRIS register
//
//*************************************************************************************************
#define UART_RIS_RXRIS 0x10U // UART Receive Raw Interrupt Status
#define UART_RIS_TXRIS 0x20U // UART Transmit Raw Interrupt Status
#define UART_RIS_RTRIS 0x40U // UART Receive Time-Out Raw Interrupt Status
#define UART_RIS_FERIS 0x80U // UART Framing Error Raw Interrupt Status
#define UART_RIS_PERIS 0x100U // UART Parity Error Raw Interrupt Status
#define UART_RIS_BERIS 0x200U // UART Break Error Raw Interrupt Status
#define UART_RIS_OERIS 0x400U // UART Overrun Error Raw Interrupt Status
#define UART_RIS_9BITRIS 0x1000U // 9-Bit Mode Raw Interrupt Status
#define UART_RIS_DMARXRIS 0x10000U // Receive DMA Raw Interrupt Status
#define UART_RIS_DMATXRIS 0x20000U // Transmit DMA Raw Interrupt Status
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTMIS register
//
//*************************************************************************************************
#define UART_MIS_RXMIS 0x10U // UART Receive Masked Interrupt Status
#define UART_MIS_TXMIS 0x20U // UART Transmit Masked Interrupt Status
#define UART_MIS_RTMIS 0x40U // UART Receive Time-Out Masked Interrupt Status
#define UART_MIS_FEMIS 0x80U // UART Framing Error Masked Interrupt Status
#define UART_MIS_PEMIS 0x100U // UART Parity Error Masked Interrupt Status
#define UART_MIS_BEMIS 0x200U // UART Break Error Masked Interrupt Status
#define UART_MIS_OEMIS 0x400U // UART Overrun Error Masked Interrupt Status
#define UART_MIS_9BITMIS 0x1000U // 9-Bit Mode Masked Interrupt Status
#define UART_MIS_DMARXMIS 0x10000U // Receive DMA Masked Interrupt Status
#define UART_MIS_DMATXMIS 0x20000U // Transmit DMA Masked Interrupt Status
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTICR register
//
//*************************************************************************************************
#define UART_ICR_RXIC 0x10U // Receive Interrupt Clear
#define UART_ICR_TXIC 0x20U // Transmit Interrupt Clear
#define UART_ICR_RTIC 0x40U // Receive Time-Out Interrupt Clear
#define UART_ICR_FEIC 0x80U // Framing Error Interrupt Clear
#define UART_ICR_PEIC 0x100U // Parity Error Interrupt Clear
#define UART_ICR_BEIC 0x200U // Break Error Interrupt Clear
#define UART_ICR_OEIC 0x400U // Overrun Error Interrupt Clear
#define UART_ICR_EOTIC 0x800U // End of Transmission Interrupt Clear
#define UART_ICR_9BITIC 0x1000U // 9-Bit Mode Interrupt Clear
#define UART_ICR_DMARXIC 0x10000U // Receive DMA Interrupt Clear
#define UART_ICR_DMATXIC 0x20000U // Transmit DMA Interrupt Clear
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTDMACTL register
//
//*************************************************************************************************
#define UART_DMACTL_RXDMAE 0x1U // Receive DMA Enable
#define UART_DMACTL_TXDMAE 0x2U // Transmit DMA Enable
#define UART_DMACTL_DMAERR 0x4U // DMA on Error
//*************************************************************************************************
//
// The following are defines for the bit fields in the UART9BITADDR register
//
//*************************************************************************************************
#define UART_9BITADDR_ADDR_S 0U
#define UART_9BITADDR_ADDR_M 0xFFU // Self Address for 9-Bit Mode
#define UART_9BITADDR_9BITEN 0x8000U // Enable 9-Bit Mode
//*************************************************************************************************
//
// The following are defines for the bit fields in the UART9BITAMASK register
//
//*************************************************************************************************
#define UART_9BITAMASK_MASK_S 0U
#define UART_9BITAMASK_MASK_M 0xFFU // Self Address Mask for 9-Bit Mode
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTPP register
//
//*************************************************************************************************
#define UART_PP_SC 0x1U // Smart Card Support
#define UART_PP_NB 0x2U // 9-Bit Support
#define UART_PP_MS 0x4U // Modem Support
#define UART_PP_MSE 0x8U // Modem Support Extended
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTPeriphID4 register
//
//*************************************************************************************************
#define UART_PERIPHID4_PID4_S 0U
#define UART_PERIPHID4_PID4_M 0xFFU // UART Peripheral ID Register [7:0]
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTPeriphID5 register
//
//*************************************************************************************************
#define UART_PERIPHID5_PID5_S 0U
#define UART_PERIPHID5_PID5_M 0xFFU // UART Peripheral ID Register [15:8]
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTPeriphID6 register
//
//*************************************************************************************************
#define UART_PERIPHID6_PID6_S 0U
#define UART_PERIPHID6_PID6_M 0xFFU // UART Peripheral ID Register [23:16]
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTPeriphID7 register
//
//*************************************************************************************************
#define UART_PERIPHID7_PID7_S 0U
#define UART_PERIPHID7_PID7_M 0xFFU // UART Peripheral ID Register [31:24]
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTPeriphID0 register
//
//*************************************************************************************************
#define UART_PERIPHID0_PID0_S 0U
#define UART_PERIPHID0_PID0_M 0xFFU // UART Peripheral ID Register [7:0]
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTPeriphID1 register
//
//*************************************************************************************************
#define UART_PERIPHID1_PID1_S 0U
#define UART_PERIPHID1_PID1_M 0xFFU // UART Peripheral ID Register [15:8]
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTPeriphID2 register
//
//*************************************************************************************************
#define UART_PERIPHID2_PID2_S 0U
#define UART_PERIPHID2_PID2_M 0xFFU // UART Peripheral ID Register [23:16]
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTPeriphID3 register
//
//*************************************************************************************************
#define UART_PERIPHID3_PID3_S 0U
#define UART_PERIPHID3_PID3_M 0xFFU // UART Peripheral ID Register [31:24]
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTPCellID0 register
//
//*************************************************************************************************
#define UART_PCELLID0_CID0_S 0U
#define UART_PCELLID0_CID0_M 0xFFU // UART PrimeCell ID Register [7:0]
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTPCellID1 register
//
//*************************************************************************************************
#define UART_PCELLID1_CID1_S 0U
#define UART_PCELLID1_CID1_M 0xFFU // UART PrimeCell ID Register [15:8]
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTPCellID2 register
//
//*************************************************************************************************
#define UART_PCELLID2_CID2_S 0U
#define UART_PCELLID2_CID2_M 0xFFU // UART PrimeCell ID Register [23:16]
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTPCellID3 register
//
//*************************************************************************************************
#define UART_PCELLID3_CID3_S 0U
#define UART_PCELLID3_CID3_M 0xFFU // UART PrimeCell ID Register [31:24]
//*************************************************************************************************
//
// The following are defines for the bit fields in the UARTECR register
//
//*************************************************************************************************
#define UART_ECR_DATA_S 0U
#define UART_ECR_DATA_M 0xFFU // Error Clear
#endif
@@ -0,0 +1,305 @@
//###########################################################################
//
// FILE: hw_udma.h
//
// TITLE: Definitions for the UDMA registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_UDMA_H
#define HW_UDMA_H
//*************************************************************************************************
//
// The following are defines for the UDMA register offsets
//
//*************************************************************************************************
#define UDMA_O_DMASRCENDP 0x0U // DMA Channel Source Address End Pointer
#define UDMA_O_DMADSTENDP 0x4U // DMA Channel Destination Address End Pointer
#define UDMA_O_DMACHCTL 0x8U // DMA Channel Control Word
#define UDMA_O_DMASTAT 0x0U // DMA Status
#define UDMA_O_DMACFG 0x4U // DMA Configuration
#define UDMA_O_DMACTLBASE 0x8U // DMA Channel Control Base Pointer
#define UDMA_O_DMAALTBASE 0xCU // DMA Alternate Channel Control Base Pointer
#define UDMA_O_DMASWREQ 0x14U // DMA Channel Software Request
#define UDMA_O_DMAUSEBURSTSET 0x18U // DMA Channel Useburst Set
#define UDMA_O_DMAUSEBURSTCLR 0x1CU // DMA Channel Useburst Clear
#define UDMA_O_DMAREQMASKSET 0x20U // DMA Channel Request Mask Set
#define UDMA_O_DMAREQMASKCLR 0x24U // DMA Channel Request Mask Clear
#define UDMA_O_DMAENASET 0x28U // DMA Channel Enable Set
#define UDMA_O_DMAENACLR 0x2CU // DMA Channel Enable Clear
#define UDMA_O_DMAALTSET 0x30U // DMA Channel Primary Alternate Set
#define UDMA_O_DMAALTCLR 0x34U // DMA Channel Primary Alternate Clear
#define UDMA_O_DMAPRIOSET 0x38U // DMA Channel Priority Set
#define UDMA_O_DMAPRIOCLR 0x3CU // DMA Channel Priority Clear
#define UDMA_O_DMAERRCLR 0x4CU // DMA Bus Error Clear
#define UDMA_O_DMACHMAP0 0x510U // DMA Channel Map Select 0
#define UDMA_O_DMACHMAP1 0x514U // DMA Channel Map Select 1
#define UDMA_O_DMACHMAP2 0x518U // DMA Channel Map Select 2
#define UDMA_O_DMACHMAP3 0x51CU // DMA Channel Map Select 3
#define UDMA_O_DMAPERIPHID4 0xFD0U // DMA Peripheral Identification 4
#define UDMA_O_DMAPERIPHID0 0xFE0U // DMA Peripheral Identification 0
#define UDMA_O_DMAPERIPHID1 0xFE4U // DMA Peripheral Identification 1
#define UDMA_O_DMAPERIPHID2 0xFE8U // DMA Peripheral Identification 2
#define UDMA_O_DMAPERIPHID3 0xFECU // DMA Peripheral Identification 3
#define UDMA_O_DMAPCELLID0 0xFF0U // DMA PrimeCell Identification 0
#define UDMA_O_DMAPCELLID1 0xFF4U // DMA PrimeCell Identification 1
#define UDMA_O_DMAPCELLID2 0xFF8U // DMA PrimeCell Identification 2
#define UDMA_O_DMAPCELLID3 0xFFCU // DMA PrimeCell Identification 3
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMACHCTL register
//
//*************************************************************************************************
#define UDMA_DMACHCTL_XFERMODE_S 0U
#define UDMA_DMACHCTL_XFERMODE_M 0x7U // DMA Transfer Mode
#define UDMA_DMACHCTL_NXTUSEBURST 0x8U // Next Useburst
#define UDMA_DMACHCTL_XFERSIZE_S 4U
#define UDMA_DMACHCTL_XFERSIZE_M 0x3FF0U // Transfer Size (minus 1)
#define UDMA_DMACHCTL_ARBSIZE_S 14U
#define UDMA_DMACHCTL_ARBSIZE_M 0x3C000U // Arbitration Size
#define UDMA_DMACHCTL_SRCPROT0 0x40000U // Source Privilege Access
#define UDMA_DMACHCTL_DSTPROT0 0x200000U // Destination Privilege Access
#define UDMA_DMACHCTL_SRCSIZE_S 24U
#define UDMA_DMACHCTL_SRCSIZE_M 0x3000000U // Source Data Size
#define UDMA_DMACHCTL_SRCINC_S 26U
#define UDMA_DMACHCTL_SRCINC_M 0xC000000U // Source Address Increment
#define UDMA_DMACHCTL_DSTSIZE_S 28U
#define UDMA_DMACHCTL_DSTSIZE_M 0x30000000U // Destination Data Size
#define UDMA_DMACHCTL_DSTINC_S 30U
#define UDMA_DMACHCTL_DSTINC_M 0xC0000000U // Destination Address Increment
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMASTAT register
//
//*************************************************************************************************
#define UDMA_DMASTAT_MASTEN 0x1U // Master Enable Status
#define UDMA_DMASTAT_STATE_S 4U
#define UDMA_DMASTAT_STATE_M 0xF0U // Control State Machine Status
#define UDMA_DMASTAT_DMACHANS_S 16U
#define UDMA_DMASTAT_DMACHANS_M 0x1F0000U // Available DMA Channels Minus 1
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMACFG register
//
//*************************************************************************************************
#define UDMA_DMACFG_MASTEN 0x1U // Controller Master Enable
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMACTLBASE register
//
//*************************************************************************************************
#define UDMA_DMACTLBASE_ADDR_S 10U
#define UDMA_DMACTLBASE_ADDR_M 0xFFFFFC00U // Channel Control Base Address
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMAERRCLR register
//
//*************************************************************************************************
#define UDMA_DMAERRCLR_ERRCLR 0x1U // DMA Bus Error Status
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMACHMAP0 register
//
//*************************************************************************************************
#define UDMA_DMACHMAP0_CH0SEL_S 0U
#define UDMA_DMACHMAP0_CH0SEL_M 0xFU // DMA Channel 0 Source Select
#define UDMA_DMACHMAP0_CH1SEL_S 4U
#define UDMA_DMACHMAP0_CH1SEL_M 0xF0U // DMA Channel 1 Source Select
#define UDMA_DMACHMAP0_CH2SEL_S 8U
#define UDMA_DMACHMAP0_CH2SEL_M 0xF00U // DMA Channel 2 Source Select
#define UDMA_DMACHMAP0_CH3SEL_S 12U
#define UDMA_DMACHMAP0_CH3SEL_M 0xF000U // DMA Channel 3 Source Select
#define UDMA_DMACHMAP0_CH4SEL_S 16U
#define UDMA_DMACHMAP0_CH4SEL_M 0xF0000U // DMA Channel 4 Source Select
#define UDMA_DMACHMAP0_CH5SEL_S 20U
#define UDMA_DMACHMAP0_CH5SEL_M 0xF00000U // DMA Channel 5 Source Select
#define UDMA_DMACHMAP0_CH6SEL_S 24U
#define UDMA_DMACHMAP0_CH6SEL_M 0xF000000U // DMA Channel 6 Source Select
#define UDMA_DMACHMAP0_CH7SEL_S 28U
#define UDMA_DMACHMAP0_CH7SEL_M 0xF0000000U // DMA Channel 7 Source Select
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMACHMAP1 register
//
//*************************************************************************************************
#define UDMA_DMACHMAP1_CH8SEL_S 0U
#define UDMA_DMACHMAP1_CH8SEL_M 0xFU // DMA Channel 8 Source Select
#define UDMA_DMACHMAP1_CH9SEL_S 4U
#define UDMA_DMACHMAP1_CH9SEL_M 0xF0U // DMA Channel 9 Source Select
#define UDMA_DMACHMAP1_CH10SEL_S 8U
#define UDMA_DMACHMAP1_CH10SEL_M 0xF00U // DMA Channel 10 Source Select
#define UDMA_DMACHMAP1_CH11SEL_S 12U
#define UDMA_DMACHMAP1_CH11SEL_M 0xF000U // DMA Channel 11 Source Select
#define UDMA_DMACHMAP1_CH12SEL_S 16U
#define UDMA_DMACHMAP1_CH12SEL_M 0xF0000U // DMA Channel 12 Source Select
#define UDMA_DMACHMAP1_CH13SEL_S 20U
#define UDMA_DMACHMAP1_CH13SEL_M 0xF00000U // DMA Channel 13 Source Select
#define UDMA_DMACHMAP1_CH14SEL_S 24U
#define UDMA_DMACHMAP1_CH14SEL_M 0xF000000U // DMA Channel 14 Source Select
#define UDMA_DMACHMAP1_CH15SEL_S 28U
#define UDMA_DMACHMAP1_CH15SEL_M 0xF0000000U // DMA Channel 15 Source Select
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMACHMAP2 register
//
//*************************************************************************************************
#define UDMA_DMACHMAP2_CH16SEL_S 0U
#define UDMA_DMACHMAP2_CH16SEL_M 0xFU // DMA Channel 16 Source Select
#define UDMA_DMACHMAP2_CH17SEL_S 4U
#define UDMA_DMACHMAP2_CH17SEL_M 0xF0U // DMA Channel 17 Source Select
#define UDMA_DMACHMAP2_CH18SEL_S 8U
#define UDMA_DMACHMAP2_CH18SEL_M 0xF00U // DMA Channel 18 Source Select
#define UDMA_DMACHMAP2_CH19SEL_S 12U
#define UDMA_DMACHMAP2_CH19SEL_M 0xF000U // DMA Channel 19 Source Select
#define UDMA_DMACHMAP2_CH20SEL_S 16U
#define UDMA_DMACHMAP2_CH20SEL_M 0xF0000U // DMA Channel 20 Source Select
#define UDMA_DMACHMAP2_CH21SEL_S 20U
#define UDMA_DMACHMAP2_CH21SEL_M 0xF00000U // DMA Channel 21 Source Select
#define UDMA_DMACHMAP2_CH22SEL_S 24U
#define UDMA_DMACHMAP2_CH22SEL_M 0xF000000U // DMA Channel 22 Source Select
#define UDMA_DMACHMAP2_CH23SEL_S 28U
#define UDMA_DMACHMAP2_CH23SEL_M 0xF0000000U // DMA Channel 23 Source Select
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMACHMAP3 register
//
//*************************************************************************************************
#define UDMA_DMACHMAP3_CH24SEL_S 0U
#define UDMA_DMACHMAP3_CH24SEL_M 0xFU // DMA Channel 24 Source Select
#define UDMA_DMACHMAP3_CH25SEL_S 4U
#define UDMA_DMACHMAP3_CH25SEL_M 0xF0U // DMA Channel 25 Source Select
#define UDMA_DMACHMAP3_CH26SEL_S 8U
#define UDMA_DMACHMAP3_CH26SEL_M 0xF00U // DMA Channel 26 Source Select
#define UDMA_DMACHMAP3_CH27SEL_S 12U
#define UDMA_DMACHMAP3_CH27SEL_M 0xF000U // DMA Channel 27 Source Select
#define UDMA_DMACHMAP3_CH28SEL_S 16U
#define UDMA_DMACHMAP3_CH28SEL_M 0xF0000U // DMA Channel 28 Source Select
#define UDMA_DMACHMAP3_CH29SEL_S 20U
#define UDMA_DMACHMAP3_CH29SEL_M 0xF00000U // DMA Channel 29 Source Select
#define UDMA_DMACHMAP3_CH30SEL_S 24U
#define UDMA_DMACHMAP3_CH30SEL_M 0xF000000U // DMA Channel 30 Source Select
#define UDMA_DMACHMAP3_CH31SEL_S 28U
#define UDMA_DMACHMAP3_CH31SEL_M 0xF0000000U // DMA Channel 31 Source Select
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMAPeriphID4 register
//
//*************************************************************************************************
#define UDMA_DMAPERIPHID4_PID4_S 0U
#define UDMA_DMAPERIPHID4_PID4_M 0xFFU // DMA Peripheral ID Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMAPeriphID0 register
//
//*************************************************************************************************
#define UDMA_DMAPERIPHID0_PID0_S 0U
#define UDMA_DMAPERIPHID0_PID0_M 0xFFU // DMA Peripheral ID Register [7:0]
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMAPeriphID1 register
//
//*************************************************************************************************
#define UDMA_DMAPERIPHID1_PID1_S 0U
#define UDMA_DMAPERIPHID1_PID1_M 0xFFU // DMA Peripheral ID Register [15:8]
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMAPeriphID2 register
//
//*************************************************************************************************
#define UDMA_DMAPERIPHID2_PID2_S 0U
#define UDMA_DMAPERIPHID2_PID2_M 0xFFU // DMA Peripheral ID Register [23:16]
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMAPeriphID3 register
//
//*************************************************************************************************
#define UDMA_DMAPERIPHID3_PID3_S 0U
#define UDMA_DMAPERIPHID3_PID3_M 0xFFU // DMA Peripheral ID Register [31:24]
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMAPCellID0 register
//
//*************************************************************************************************
#define UDMA_DMAPCELLID0_CID0_S 0U
#define UDMA_DMAPCELLID0_CID0_M 0xFFU // DMA PrimeCell ID Register [7:0]
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMAPCellID1 register
//
//*************************************************************************************************
#define UDMA_DMAPCELLID1_CID1_S 0U
#define UDMA_DMAPCELLID1_CID1_M 0xFFU // DMA PrimeCell ID Register [15:8]
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMAPCellID2 register
//
//*************************************************************************************************
#define UDMA_DMAPCELLID2_CID2_S 0U
#define UDMA_DMAPCELLID2_CID2_M 0xFFU // DMA PrimeCell ID Register [23:16]
//*************************************************************************************************
//
// The following are defines for the bit fields in the DMAPCellID3 register
//
//*************************************************************************************************
#define UDMA_DMAPCELLID3_CID3_S 0U
#define UDMA_DMAPCELLID3_CID3_M 0xFFU // DMA PrimeCell ID Register [31:24]
#endif
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,122 @@
//###########################################################################
//
// FILE: hw_wwd.h
//
// TITLE: Definitions for the WWD registers.
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
#ifndef HW_WWD_H
#define HW_WWD_H
//*************************************************************************************************
//
// The following are defines for the WWD register offsets
//
//*************************************************************************************************
#define WWD_O_SCSR 0x0U // System Control & Status Register
#define WWD_O_WDCNTR 0x4U // Watchdog Counter Register
#define WWD_O_WDKEY 0x8U // Watchdog Reset Key Register
#define WWD_O_WDCR 0xCU // Watchdog Control Register
#define WWD_O_WDWCR 0x10U // Watchdog Windowed Control Register
//*************************************************************************************************
//
// The following are defines for the bit fields in the SCSR register
//
//*************************************************************************************************
#define WWD_SCSR_WDOVERRIDE 0x1U // WD Override for WDDIS bit
#define WWD_SCSR_WDENINT 0x2U // WD Interrupt Enable
#define WWD_SCSR_RSVD_S 3U
#define WWD_SCSR_RSVD_M 0xFFF8U // Reserved
#define WWD_SCSR_KEY_S 16U
#define WWD_SCSR_KEY_M 0xFFFF0000U // KEY field
//*************************************************************************************************
//
// The following are defines for the bit fields in the WDCNTR register
//
//*************************************************************************************************
#define WWD_WDCNTR_WDCNTR_S 0U
#define WWD_WDCNTR_WDCNTR_M 0xFFU // WD Counter
#define WWD_WDCNTR_RSVD_S 8U
#define WWD_WDCNTR_RSVD_M 0xFFFFFF00U // Reserved
//*************************************************************************************************
//
// The following are defines for the bit fields in the WDKEY register
//
//*************************************************************************************************
#define WWD_WDKEY_WDKEY_S 0U
#define WWD_WDKEY_WDKEY_M 0xFFU // WD KEY
#define WWD_WDKEY_RSVD_S 8U
#define WWD_WDKEY_RSVD_M 0xFFFFFF00U // Reserved
//*************************************************************************************************
//
// The following are defines for the bit fields in the WDCR register
//
//*************************************************************************************************
#define WWD_WDCR_WDPS_S 0U
#define WWD_WDCR_WDPS_M 0x7U // WD Clock Prescalar
#define WWD_WDCR_WDCHK_S 3U
#define WWD_WDCR_WDCHK_M 0x38U // WD Check Bits
#define WWD_WDCR_WDDIS 0x40U // WD Disable
#define WWD_WDCR_WDFLG 0x80U // WD Reset Status Flag
#define WWD_WDCR_WDPRECLKDIV_S 8U
#define WWD_WDCR_WDPRECLKDIV_M 0xF00U // WD Pre Clock Divider
#define WWD_WDCR_RSVD_S 12U
#define WWD_WDCR_RSVD_M 0xFFFFF000U // Reserved
//*************************************************************************************************
//
// The following are defines for the bit fields in the WDWCR register
//
//*************************************************************************************************
#define WWD_WDWCR_MIN_S 0U
#define WWD_WDWCR_MIN_M 0xFFU // WD Min Threshold setting for Windowed Watchdog
// functionality
#define WWD_WDWCR_FIRSTKEY 0x100U // First Key Detect Flag
#define WWD_WDWCR_RSVD_S 9U
#define WWD_WDWCR_RSVD_M 0xFE00U // Reserved
#define WWD_WDWCR_KEY_S 16U
#define WWD_WDWCR_KEY_M 0xFFFF0000U // KEY field
#endif
@@ -0,0 +1,96 @@
/* =============================================================================
* Copyright (c) Texas Instruments Incorporated 2012-2015
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* \file stw_dataTypes.h
*
* \brief Starterware header file containing standard data types.
*
*/
#ifndef STW_DATATYPES_H_
#define STW_DATATYPES_H_
/* ========================================================================== */
/* Include Files */
/* ========================================================================== */
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ========================================================================== */
/* Macros & Typedefs */
/* ========================================================================== */
typedef uint16_t Bool; /* In sync with xdc/std.h */
typedef uint32_t UInt32;
typedef int32_t Int32;
typedef uint16_t UInt16;
typedef int16_t Int16;
typedef uint8_t UInt8;
typedef int8_t Int8;
typedef char Char;
typedef void * Ptr;
typedef uint32_t UArg;
typedef double Double;
typedef uint64_t UInt64;
typedef unsigned char tBoolean;
typedef float Float32;
/* To fix Misra-C errors */
#ifndef TRUE
#define TRUE ((Bool) 1)
#endif
#ifndef FALSE
#define FALSE ((Bool) 0)
#endif
/* ========================================================================== */
/* Structure Declarations */
/* ========================================================================== */
/* None */
/* ========================================================================== */
/* Function Declarations */
/* ========================================================================== */
/* None */
#ifdef __cplusplus
}
#endif
#endif /* #ifndef STW_DATATYPES_H_ */
@@ -0,0 +1,111 @@
/* =============================================================================
* Copyright (c) Texas Instruments Incorporated 2014-2015
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* \file stw_types.h
*
* \brief This file contains the data types and macros commonly used in
* Starterware.
*/
#ifndef STW_TYPES_H_
#define STW_TYPES_H_
/* ========================================================================== */
/* Include Files */
/* ========================================================================== */
/* None */
#ifdef __cplusplus
extern "C" {
#endif
/* ========================================================================== */
/* Macros & Typedefs */
/* ========================================================================== */
/**
* \brief This macro defines the Boolean that is used for True.
*/
#define SUCCESS ((uint32_t) 1U)
/**
* \brief This macro defines the Boolean that is used for False.
*/
#define FAIL ((uint32_t) 0U)
#define INVALID_PARAM (-((int32_t) 1))
/*
* =========== Error codes returned by STW functions ===========
*/
#define STW_SOK ((int32_t) 0)
#define STW_EFAIL (-((int32_t) 1))
#define STW_EBADARGS (-((int32_t) 2))
#define STW_EINVALID_PARAMS (-((int32_t) 3))
#define STW_ETIMEOUT (-((int32_t) 4))
#define STW_EOUT_OF_RANGE (-((int32_t) 5))
#define STW_EUNSUPPORTED_CMD (-((int32_t) 6))
#define STW_EUNSUPPORTED_OPS (-((int32_t) 7))
/* ========================================================================== */
/* Structures and Enums */
/* ========================================================================== */
/* None */
/* ========================================================================== */
/* Internal Function Declarations */
/* ========================================================================== */
/* None */
/* ========================================================================== */
/* Global Variables */
/* ========================================================================== */
/* None */
/* ========================================================================== */
/* Function Declarations */
/* ========================================================================== */
/* None */
#ifdef __cplusplus
}
#endif
#endif