Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mchp_rstc_g1.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025-2026 Microchip Technology Inc.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
13
14#ifndef INCLUDE_ZEPHYR_DRIVERS_RESET_MCHP_RSTC_G1_H_
15#define INCLUDE_ZEPHYR_DRIVERS_RESET_MCHP_RSTC_G1_H_
16
24#ifdef CONFIG_SOC_FAMILY_MICROCHIP_PIC32CM_SG_GC
25enum rstc_g1_rcause {
26 RSTC_G1_RCAUSE_POR = 0, /* Power-on Reset */
27 RSTC_G1_RCAUSE_PORCORE = 1, /* Core Power-on Reset */
28 RSTC_G1_RCAUSE_BORVDDREG = 2, /* Brown-Out VDDREG Detector Reset */
29 RSTC_G1_RCAUSE_BORVDDA = 3, /* Brown-Out VDDA Detector Reset */
30 RSTC_G1_RCAUSE_BORVDDIO = 4, /* Brown-Out VDDIO Detector Reset */
31 RSTC_G1_RCAUSE_EXT = 5, /* External Reset */
32 RSTC_G1_RCAUSE_WDT = 6, /* Watchdog Reset */
33 RSTC_G1_RCAUSE_SYST = 7, /* System Reset Request */
34 RSTC_G1_RCAUSE_BACKUP = 8, /* Backup Reset */
35 RSTC_G1_RCAUSE_LOCKUP = 9 /* CPU Lockup Reset */
36};
37
39#define RSTC_G1_RCAUSE_BROWNOUT_MASK \
40 (BIT(RSTC_G1_RCAUSE_PORCORE) | BIT(RSTC_G1_RCAUSE_BORVDDREG) | \
41 BIT(RSTC_G1_RCAUSE_BORVDDA) | BIT(RSTC_G1_RCAUSE_BORVDDIO))
42#else
44 RSTC_G1_RCAUSE_POR = 0, /* Power-on Reset */
45 RSTC_G1_RCAUSE_BOD12 = 1, /* Brown-Out 1.2V Detector Reset */
46 RSTC_G1_RCAUSE_BOD33 = 2, /* Brown-Out 3.3V Detector Reset */
47 RSTC_G1_RCAUSE_NVM = 3, /* NVM Reset */
48 RSTC_G1_RCAUSE_EXT = 4, /* External Reset */
49 RSTC_G1_RCAUSE_WDT = 5, /* Watchdog Reset */
50 RSTC_G1_RCAUSE_SYST = 6, /* System Reset Request */
51 RSTC_G1_RCAUSE_BACKUP = 7 /* Backup Reset */
52};
53
55#define RSTC_G1_RCAUSE_BROWNOUT_MASK (BIT(RSTC_G1_RCAUSE_BOD12) | BIT(RSTC_G1_RCAUSE_BOD33))
56#endif /* CONFIG_SOC_FAMILY_MICROCHIP_PIC32CM_SG_GC */
57
58#ifdef CONFIG_SOC_FAMILY_MICROCHIP_PIC32CM_JH
59/* Reserved reset-cause bits on PIC32CM JH */
60#define RSTC_RESERVED_BIT_3 BIT(3)
61#define RSTC_RESERVED_BIT_7 BIT(7)
62#define RSTC_UNSUPPORTED_RCAUSE ((RSTC_RESERVED_BIT_3) | (RSTC_RESERVED_BIT_7))
63#else
64#define RSTC_UNSUPPORTED_RCAUSE 0U
65#endif /* CONFIG_SOC_FAMILY_MICROCHIP_PIC32CM_JH */
66
67#endif /* INCLUDE_ZEPHYR_DRIVERS_RESET_MCHP_RSTC_G1_H_ */
rstc_g1_rcause
Reset cause flags for Microchip RSTC G1.
Definition mchp_rstc_g1.h:43
@ RSTC_G1_RCAUSE_POR
Definition mchp_rstc_g1.h:44
@ RSTC_G1_RCAUSE_EXT
Definition mchp_rstc_g1.h:48
@ RSTC_G1_RCAUSE_BOD33
Definition mchp_rstc_g1.h:46
@ RSTC_G1_RCAUSE_SYST
Definition mchp_rstc_g1.h:50
@ RSTC_G1_RCAUSE_BOD12
Definition mchp_rstc_g1.h:45
@ RSTC_G1_RCAUSE_NVM
Definition mchp_rstc_g1.h:47
@ RSTC_G1_RCAUSE_BACKUP
Definition mchp_rstc_g1.h:51
@ RSTC_G1_RCAUSE_WDT
Definition mchp_rstc_g1.h:49