Skip to content

Commit 3d4be32

Browse files
committed
s32: mcux: s32k146: enable watchdog driver
Enable fsl_wdog32 driver on S32K146 devices. Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
1 parent d6d43ca commit 3d4be32

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

s32/mcux/devices/S32K146/S32K146_device.h

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 NXP
2+
* Copyright 2023-2024 NXP
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
@@ -733,4 +733,31 @@ typedef struct {
733733
* @}
734734
*/ /* end of group CAN_Peripheral_Access_Layer */
735735

736+
/* ----------------------------------------------------------------------------
737+
-- WDOG Peripheral Access Layer
738+
---------------------------------------------------------------------------- */
739+
740+
/*!
741+
* @addtogroup WDOG_Peripheral_Access_Layer WDOG Peripheral Access Layer
742+
* @{
743+
*/
744+
745+
/* WDOG - Peripheral instance base addresses */
746+
/** Peripheral WDOG base address */
747+
#define WDOG_BASE IP_WDOG_BASE
748+
/** Peripheral WDOG base pointer */
749+
#define WDOG IP_WDOG
750+
/** Array initializer of WDOG peripheral base addresses */
751+
#define WDOG_BASE_ADDRS IP_WDOG_BASE_ADDRS
752+
/** Array initializer of WDOG peripheral base pointers */
753+
#define WDOG_BASE_PTRS IP_WDOG_BASE_PTRS
754+
/** Interrupt vectors for the WDOG peripheral type */
755+
#define WDOG_IRQS { WDOG_EWM_IRQn }
756+
#define WDOG_UPDATE_KEY (0xD928C520U)
757+
#define WDOG_REFRESH_KEY (0xB480A602U)
758+
759+
/*!
760+
* @}
761+
*/ /* end of group WDOG_Peripheral_Access_Layer */
762+
736763
#endif /* _S32K146_DEVICE_H_ */

s32/mcux/devices/S32K146/S32K146_features.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 NXP
2+
* Copyright 2023-2024 NXP
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
@@ -27,6 +27,8 @@
2727
#define FSL_FEATURE_SOC_FTM_COUNT (6)
2828
/* @brief FLEXCAN availability on the SoC. */
2929
#define FSL_FEATURE_SOC_FLEXCAN_COUNT (3)
30+
/* @brief WDOG availability on the SoC. */
31+
#define FSL_FEATURE_SOC_WDOG_COUNT (1)
3032

3133
/* SYSMPU module features */
3234

@@ -243,4 +245,11 @@
243245
/* @brief Does not support Supervisor Mode (bitfield MCR[SUPV]. */
244246
#define FSL_FEATURE_FLEXCAN_HAS_NO_SUPV_SUPPORT (0)
245247

248+
/* WDOG module features */
249+
250+
/* @brief Watchdog is available. */
251+
#define FSL_FEATURE_WDOG_HAS_WATCHDOG (1)
252+
/* @brief WDOG_CNT can be 32-bit written. */
253+
#define FSL_FEATURE_WDOG_HAS_32BIT_ACCESS (1)
254+
246255
#endif /* _S32K146_FEATURES_H_ */

0 commit comments

Comments
 (0)