Skip to content

Commit ecb9e4c

Browse files
manuarguedecsny
authored andcommitted
s32: mcux: s32k146: enable RTC driver
Enable fsl_rtc.c driver on S32K146 devices. Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
1 parent 1be7718 commit ecb9e4c

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

s32/mcux/devices/S32K146/S32K146_device.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,4 +760,30 @@ typedef struct {
760760
* @}
761761
*/ /* end of group WDOG_Peripheral_Access_Layer */
762762

763+
/* ----------------------------------------------------------------------------
764+
-- RTC Peripheral Access Layer
765+
---------------------------------------------------------------------------- */
766+
767+
/*!
768+
* @addtogroup RTC_Peripheral_Access_Layer RTC Peripheral Access Layer
769+
* @{
770+
*/
771+
772+
/* RTC - Peripheral instance base addresses */
773+
/** Peripheral RTC base address */
774+
#define RTC_BASE IP_RTC_BASE
775+
/** Peripheral RTC base pointer */
776+
#define RTC IP_RTC
777+
/** Array initializer of RTC peripheral base addresses */
778+
#define RTC_BASE_ADDRS IP_RTC_BASE_ADDRS
779+
/** Array initializer of RTC peripheral base pointers */
780+
#define RTC_BASE_PTRS IP_RTC_BASE_PTRS
781+
/** Interrupt vectors for the RTC peripheral type */
782+
#define RTC_IRQS { RTC_IRQn }
783+
#define RTC_SECONDS_IRQS { RTC_Seconds_IRQn }
784+
785+
/*!
786+
* @}
787+
*/ /* end of group RTC_Peripheral_Access_Layer */
788+
763789
#endif /* _S32K146_DEVICE_H_ */

s32/mcux/devices/S32K146/S32K146_features.h

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
#define FSL_FEATURE_SOC_FLEXCAN_COUNT (3)
3030
/* @brief WDOG availability on the SoC. */
3131
#define FSL_FEATURE_SOC_WDOG_COUNT (1)
32+
/* @brief RTC availability on the SoC. */
33+
#define FSL_FEATURE_SOC_RTC_COUNT (1)
3234

3335
/* SYSMPU module features */
3436

@@ -252,4 +254,51 @@
252254
/* @brief WDOG_CNT can be 32-bit written. */
253255
#define FSL_FEATURE_WDOG_HAS_32BIT_ACCESS (1)
254256

257+
/* RTC module features */
258+
259+
/* @brief Has wakeup pin. */
260+
#define FSL_FEATURE_RTC_HAS_WAKEUP_PIN (0)
261+
/* @brief Has wakeup pin selection (bit field CR[WPS]). */
262+
#define FSL_FEATURE_RTC_HAS_WAKEUP_PIN_SELECTION (0)
263+
/* @brief Has low power features (registers MER, MCLR and MCHR). */
264+
#define FSL_FEATURE_RTC_HAS_MONOTONIC (0)
265+
/* @brief Has read/write access control (registers WAR and RAR). */
266+
#define FSL_FEATURE_RTC_HAS_ACCESS_CONTROL (0)
267+
/* @brief Has security features (registers TTSR, MER, MCLR and MCHR). */
268+
#define FSL_FEATURE_RTC_HAS_SECURITY (0)
269+
/* @brief Has RTC_CLKIN available. */
270+
#define FSL_FEATURE_RTC_HAS_RTC_CLKIN (1)
271+
/* @brief Has prescaler adjust for LPO. */
272+
#define FSL_FEATURE_RTC_HAS_LPO_ADJUST (1)
273+
/* @brief Has Clock Pin Enable field. */
274+
#define FSL_FEATURE_RTC_HAS_CPE (1)
275+
/* @brief Has Timer Seconds Interrupt Configuration field. */
276+
#define FSL_FEATURE_RTC_HAS_TSIC (1)
277+
/* @brief Has OSC capacitor setting RTC_CR[SC2P ~ SC16P] */
278+
#define FSL_FEATURE_RTC_HAS_OSC_SCXP (0)
279+
/* @brief Has Tamper Interrupt Register (register TIR). */
280+
#define FSL_FEATURE_RTC_HAS_TIR (0)
281+
/* @brief Has Tamper Pin Interrupt Enable (bitfield TIR[TPIE]). */
282+
#define FSL_FEATURE_RTC_HAS_TIR_TPIE (0)
283+
/* @brief Has Security Interrupt Enable (bitfield TIR[SIE]). */
284+
#define FSL_FEATURE_RTC_HAS_TIR_SIE (0)
285+
/* @brief Has Loss of Clock Interrupt Enable (bitfield TIR[LCIE]). */
286+
#define FSL_FEATURE_RTC_HAS_TIR_LCIE (0)
287+
/* @brief Has Tamper Interrupt Detect Flag (bitfield SR[TIDF]). */
288+
#define FSL_FEATURE_RTC_HAS_SR_TIDF (0)
289+
/* @brief Has Tamper Detect Register (register TDR). */
290+
#define FSL_FEATURE_RTC_HAS_TDR (0)
291+
/* @brief Has Tamper Pin Flag (bitfield TDR[TPF]). */
292+
#define FSL_FEATURE_RTC_HAS_TDR_TPF (0)
293+
/* @brief Has Security Tamper Flag (bitfield TDR[STF]). */
294+
#define FSL_FEATURE_RTC_HAS_TDR_STF (0)
295+
/* @brief Has Loss of Clock Tamper Flag (bitfield TDR[LCTF]). */
296+
#define FSL_FEATURE_RTC_HAS_TDR_LCTF (0)
297+
/* @brief Has Tamper Time Seconds Register (register TTSR). */
298+
#define FSL_FEATURE_RTC_HAS_TTSR (0)
299+
/* @brief Has Pin Configuration Register (register PCR). */
300+
#define FSL_FEATURE_RTC_HAS_PCR (0)
301+
/* @brief Has Oscillator Enable(bitfield CR[OSCE]). */
302+
#define FSL_FEATURE_RTC_HAS_NO_CR_OSCE (1)
303+
255304
#endif /* _S32K146_FEATURES_H_ */

0 commit comments

Comments
 (0)