2 * @brief LPC18xx/43xx Reset Generator Unit driver
\r
5 * Copyright(C) NXP Semiconductors, 2012
\r
6 * All rights reserved.
\r
9 * Software that is described herein is for illustrative purposes only
\r
10 * which provides customers with programming information regarding the
\r
11 * LPC products. This software is supplied "AS IS" without any warranties of
\r
12 * any kind, and NXP Semiconductors and its licensor disclaim any and
\r
13 * all warranties, express or implied, including all implied warranties of
\r
14 * merchantability, fitness for a particular purpose and non-infringement of
\r
15 * intellectual property rights. NXP Semiconductors assumes no responsibility
\r
16 * or liability for the use of the software, conveys no license or rights under any
\r
17 * patent, copyright, mask work right, or any other intellectual property rights in
\r
18 * or to any products. NXP Semiconductors reserves the right to make changes
\r
19 * in the software without notification. NXP Semiconductors also makes no
\r
20 * representation or warranty that such application will be suitable for the
\r
21 * specified use without further testing or modification.
\r
24 * Permission to use, copy, modify, and distribute this software and its
\r
25 * documentation is hereby granted, under NXP Semiconductors' and its
\r
26 * licensor's relevant copyrights in the software, without fee, provided that it
\r
27 * is used in conjunction with NXP Semiconductors microcontrollers. This
\r
28 * copyright, permission, and disclaimer notice must appear in all copies of
\r
32 #ifndef __RGU_18XX_43XX_H_
\r
33 #define __RGU_18XX_43XX_H_
\r
39 /** @defgroup RGU_18XX_43XX CHIP: LPC18xx/43xx Reset Generator Unit (RGU) driver
\r
40 * @ingroup CHIP_18XX_43XX_Drivers
\r
45 * @brief RGU reset enumerations
\r
47 typedef enum CHIP_RGU_RST {
\r
63 RGU_FLASHA_RST = 25,
\r
64 RGU_EEPROM_RST = 27,
\r
67 RGU_TIMER0_RST = 32,
\r
99 * @brief RGU register structure
\r
101 typedef struct { /*!< RGU Structure */
\r
102 __I uint32_t RESERVED0[64];
\r
103 __O uint32_t RESET_CTRL0; /*!< Reset control register 0 */
\r
104 __O uint32_t RESET_CTRL1; /*!< Reset control register 1 */
\r
105 __I uint32_t RESERVED1[2];
\r
106 __IO uint32_t RESET_STATUS0; /*!< Reset status register 0 */
\r
107 __IO uint32_t RESET_STATUS1; /*!< Reset status register 1 */
\r
108 __IO uint32_t RESET_STATUS2; /*!< Reset status register 2 */
\r
109 __IO uint32_t RESET_STATUS3; /*!< Reset status register 3 */
\r
110 __I uint32_t RESERVED2[12];
\r
111 __I uint32_t RESET_ACTIVE_STATUS0; /*!< Reset active status register 0 */
\r
112 __I uint32_t RESET_ACTIVE_STATUS1; /*!< Reset active status register 1 */
\r
113 __I uint32_t RESERVED3[170];
\r
114 __IO uint32_t RESET_EXT_STAT[RGU_LAST_RST + 1];/*!< Reset external status registers */
\r
118 * @brief Trigger a peripheral reset for the selected peripheral
\r
119 * @param ResetNumber : Peripheral reset number to trigger
\r
122 void Chip_RGU_TriggerReset(CHIP_RGU_RST_T ResetNumber);
\r
125 * @brief Checks the reset status of a peripheral
\r
126 * @param ResetNumber : Peripheral reset number to trigger
\r
127 * @return true if the periperal is still being reset
\r
129 bool Chip_RGU_InReset(CHIP_RGU_RST_T ResetNumber);
\r
132 * @brief Clears reset for the selected peripheral
\r
133 * @param ResetNumber : Peripheral reset number to trigger
\r
135 * Almost all peripherals will auto clear the reset bit. Only a few peripherals
\r
136 * like the Cortex M0 Core in LPC43xx will not auto clear the reset and require
\r
137 * this function to clear the reset bit.
\r
139 void Chip_RGU_ClearReset(CHIP_RGU_RST_T ResetNumber);
\r
149 #endif /* __RGU_18XX_43XX_H_ */
\r