1 /***************************************************************************** 2 * Copyright (c) 2022, Nations Technologies Inc. 3 * 4 * All rights reserved. 5 * **************************************************************************** 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are met: 9 * 10 * - Redistributions of source code must retain the above copyright notice, 11 * this list of conditions and the disclaimer below. 12 * 13 * Nations' name may not be used to endorse or promote products derived from 14 * this software without specific prior written permission. 15 * 16 * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY NATIONS "AS IS" AND ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 19 * DISCLAIMED. IN NO EVENT SHALL NATIONS BE LIABLE FOR ANY DIRECT, INDIRECT, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 22 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 25 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * ****************************************************************************/ 27 28 /** 29 * @file n32g43x_dbg.h 30 * @author Nations 31 * @version v1.2.0 32 * 33 * @copyright Copyright (c) 2022, Nations Technologies Inc. All rights reserved. 34 */ 35 #ifndef __N32G43x_DBG_H__ 36 #define __N32G43x_DBG_H__ 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 #include "n32g43x.h" 43 44 /** @addtogroup N32G43x_StdPeriph_Driver 45 * @{ 46 */ 47 48 /** @addtogroup DBG 49 * @{ 50 */ 51 52 /** @addtogroup DBGMCU_Exported_Types 53 * @{ 54 */ 55 56 /** 57 * @} 58 */ 59 60 /** @addtogroup DBGMCU_Exported_Constants 61 * @{ 62 */ 63 64 #define DBG_SLEEP ((uint32_t)0x00000001) 65 #define DBG_STOP ((uint32_t)0x00000002) 66 #define DBG_STDBY ((uint32_t)0x00000004) 67 #define DBG_IWDG_STOP ((uint32_t)0x00000100) 68 #define DBG_WWDG_STOP ((uint32_t)0x00000200) 69 #define DBG_TIM1_STOP ((uint32_t)0x00000400) 70 #define DBG_TIM2_STOP ((uint32_t)0x00000800) 71 #define DBG_TIM3_STOP ((uint32_t)0x00001000) 72 #define DBG_TIM4_STOP ((uint32_t)0x00002000) 73 #define DBG_CAN_STOP ((uint32_t)0x00004000) 74 #define DBG_I2C1SMBUS_TIMEOUT ((uint32_t)0x00008000) 75 #define DBG_I2C2SMBUS_TIMEOUT ((uint32_t)0x00010000) 76 #define DBG_TIM8_STOP ((uint32_t)0x00020000) 77 #define DBG_TIM5_STOP ((uint32_t)0x00040000) 78 #define DBG_TIM6_STOP ((uint32_t)0x00080000) 79 #define DBG_TIM7_STOP ((uint32_t)0x00100000) 80 #define DBG_TIM9_STOP ((uint32_t)0x00200000) 81 82 #define IS_DBGMCU_PERIPH(PERIPH) ((((PERIPH)&0xFFC000F8) == 0x00) && ((PERIPH) != 0x00)) 83 /** 84 * @} 85 */ 86 87 /** @addtogroup DBGMCU_Exported_Macros 88 * @{ 89 */ 90 91 /** 92 * @} 93 */ 94 95 /** @addtogroup DBGMCU_Exported_Functions 96 * @{ 97 */ 98 99 void GetUCID(uint8_t *UCIDbuf); 100 void GetUID(uint8_t *UIDbuf); 101 void GetDBGMCU_ID(uint8_t *DBGMCU_IDbuf); 102 uint32_t DBG_GetRevNum(void); 103 uint32_t DBG_GetDevNum(void); 104 void DBG_ConfigPeriph(uint32_t DBG_Periph, FunctionalState Cmd); 105 106 uint32_t DBG_GetFlashSize(void); 107 uint32_t DBG_GetSramSize(void); 108 109 #ifdef __cplusplus 110 } 111 #endif 112 113 #endif /* __N32G43x_DBG_H__ */ 114 /** 115 * @} 116 */ 117 118 /** 119 * @} 120 */ 121 122 /** 123 * @} 124 */ 125