Skip to content

Commit 5a7ccb9

Browse files
congnguyenhuummahadevan108
authored andcommitted
s32: soc: s32z2: add PSI5 soc specific code
Code autogenerated with S32 Design Studio for s32ze Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
1 parent 2565a3d commit 5a7ccb9

File tree

3 files changed

+370
-0
lines changed

3 files changed

+370
-0
lines changed

s32/soc/s32z270/include/Psi5_Ip_Cfg.h

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
/*
2+
* Copyright 2021-2025 NXP
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
7+
#ifndef PSI5_IP_CFG_H
8+
#define PSI5_IP_CFG_H
9+
10+
/**
11+
* @file Psi5_Ip_Cfg.h
12+
*
13+
* @addtogroup PSI5_IP PSI5 IPV Driver
14+
* @{
15+
*/
16+
17+
#ifdef __cplusplus
18+
extern "C"{
19+
#endif
20+
/*==================================================================================================
21+
* INCLUDE FILES
22+
* 1) system and project includes
23+
* 2) needed interfaces from external units
24+
* 3) internal and external interfaces from this unit
25+
==================================================================================================*/
26+
#include "Mcal.h"
27+
28+
#include "Psi5_Ip_Init_PBcfg.h"
29+
30+
#include "Psi5_Ip_Types.h"
31+
#include "Psi5_Ip_Cfg_Defines.h"
32+
#if (STD_ON == PSI5_IP_DMA_IS_USED)
33+
#include "CDD_Mcl.h"
34+
#endif
35+
/*==================================================================================================
36+
* SOURCE FILE VERSION INFORMATION
37+
==================================================================================================*/
38+
#define PSI5_IP_CFG_VENDOR_ID 43
39+
#define PSI5_IP_CFG_AR_RELEASE_MAJOR_VERSION 4
40+
#define PSI5_IP_CFG_AR_RELEASE_MINOR_VERSION 7
41+
#define PSI5_IP_CFG_AR_RELEASE_REVISION_VERSION 0
42+
#define PSI5_IP_CFG_SW_MAJOR_VERSION 2
43+
#define PSI5_IP_CFG_SW_MINOR_VERSION 0
44+
#define PSI5_IP_CFG_SW_PATCH_VERSION 1
45+
46+
/*==================================================================================================
47+
* FILE VERSION CHECKS
48+
==================================================================================================*/
49+
/* Check if Psi5_Ip_Cfg.h and Psi5_Ip_Init_PBcfg.h header file are of the same vendor */
50+
#if (PSI5_IP_CFG_VENDOR_ID != PSI5_IP_INIT_PBCFG_VENDOR_ID)
51+
#error "Psi5_Ip_Cfg.h and Psi5_Ip_Init_PBcfg.h have different vendor ids"
52+
#endif
53+
/* Check if Psi5_Ip_Cfg.h and Psi5_Ip_Init_PBcfg.h header file are of the same Autosar version */
54+
#if ((PSI5_IP_CFG_AR_RELEASE_MAJOR_VERSION != PSI5_IP_INIT_PBCFG_AR_RELEASE_MAJOR_VERSION) || \
55+
(PSI5_IP_CFG_AR_RELEASE_MINOR_VERSION != PSI5_IP_INIT_PBCFG_AR_RELEASE_MINOR_VERSION) || \
56+
(PSI5_IP_CFG_AR_RELEASE_REVISION_VERSION != PSI5_IP_INIT_PBCFG_AR_RELEASE_REVISION_VERSION))
57+
#error "AUTOSAR Version Numbers of Psi5_Ip_Cfg.h and Psi5_Ip_Init_PBcfg.h are different"
58+
#endif
59+
/* Check if Psi5_Ip_Cfg.h and Psi5_Ip_Init_PBcfg.h header file are of the same software version */
60+
#if ((PSI5_IP_CFG_SW_MAJOR_VERSION != PSI5_IP_INIT_PBCFG_SW_MAJOR_VERSION) || \
61+
(PSI5_IP_CFG_SW_MINOR_VERSION != PSI5_IP_INIT_PBCFG_SW_MINOR_VERSION) || \
62+
(PSI5_IP_CFG_SW_PATCH_VERSION != PSI5_IP_INIT_PBCFG_SW_PATCH_VERSION))
63+
#error "Software Version Numbers of Psi5_Ip_Cfg.h and Psi5_Ip_Init_PBcfg.h are different"
64+
#endif
65+
66+
/* Checks against Psi5_Ip_Types.h */
67+
#if (PSI5_IP_CFG_VENDOR_ID != PSI5_IP_TYPES_VENDOR_ID)
68+
#error "Psi5_Ip_Cfg.h and Psi5_Ip_Types.h have different vendor ids"
69+
#endif
70+
#if ((PSI5_IP_CFG_AR_RELEASE_MAJOR_VERSION != PSI5_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \
71+
(PSI5_IP_CFG_AR_RELEASE_MINOR_VERSION != PSI5_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \
72+
(PSI5_IP_CFG_AR_RELEASE_REVISION_VERSION != PSI5_IP_TYPES_AR_RELEASE_REVISION_VERSION))
73+
#error "AUTOSAR Version Numbers of Psi5_Ip.h and Psi5_Ip_Types.h are different"
74+
#endif
75+
#if ((PSI5_IP_CFG_SW_MAJOR_VERSION != PSI5_IP_TYPES_SW_MAJOR_VERSION) || \
76+
(PSI5_IP_CFG_SW_MINOR_VERSION != PSI5_IP_TYPES_SW_MINOR_VERSION) || \
77+
(PSI5_IP_CFG_SW_PATCH_VERSION != PSI5_IP_TYPES_SW_PATCH_VERSION))
78+
#error "Software Version Numbers of Psi5_Ip_Cfg.h and Psi5_Ip_Types.h are different"
79+
#endif
80+
81+
/* Checks against Psi5_Ip_Cfg_Defines.h */
82+
#if (PSI5_IP_CFG_VENDOR_ID != PSI5_IP_CFG_DEFINES_VENDOR_ID)
83+
#error "Psi5_Ip_Cfg.h and Psi5_Ip_Cfg_Defines.h have different vendor ids"
84+
#endif
85+
#if ((PSI5_IP_CFG_AR_RELEASE_MAJOR_VERSION != PSI5_IP_CFG_DEFINES_AR_RELEASE_MAJOR_VERSION) || \
86+
(PSI5_IP_CFG_AR_RELEASE_MINOR_VERSION != PSI5_IP_CFG_DEFINES_AR_RELEASE_MINOR_VERSION) || \
87+
(PSI5_IP_CFG_AR_RELEASE_REVISION_VERSION != PSI5_IP_CFG_DEFINES_AR_RELEASE_REVISION_VERSION))
88+
#error "AUTOSAR Version Numbers of Psi5_Ip_Cfg.h and Psi5_Ip_Cfg_Defines.h are different"
89+
#endif
90+
#if ((PSI5_IP_CFG_SW_MAJOR_VERSION != PSI5_IP_CFG_DEFINES_SW_MAJOR_VERSION) || \
91+
(PSI5_IP_CFG_SW_MINOR_VERSION != PSI5_IP_CFG_DEFINES_SW_MINOR_VERSION) || \
92+
(PSI5_IP_CFG_SW_PATCH_VERSION != PSI5_IP_CFG_DEFINES_SW_PATCH_VERSION))
93+
#error "Software Version Numbers of Psi5_Ip_Cfg.h and Psi5_Ip_Cfg_Defines.h are different"
94+
#endif
95+
96+
#if (STD_ON == PSI5_IP_DMA_IS_USED)
97+
/* Check Psi5_Ip_Cfg.h against CDD_Mcl.h file versions */
98+
#ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
99+
#if ((PSI5_IP_CFG_AR_RELEASE_MAJOR_VERSION != CDD_MCL_AR_RELEASE_MAJOR_VERSION) || \
100+
(PSI5_IP_CFG_AR_RELEASE_MINOR_VERSION != CDD_MCL_AR_RELEASE_MINOR_VERSION))
101+
#error "AutoSar Version Numbers of Psi5_Ip_Cfg.h and CDD_Mcl.h are different"
102+
#endif
103+
#endif
104+
#endif
105+
106+
/*==================================================================================================
107+
* DEFINES AND MACROS
108+
==================================================================================================*/
109+
/**
110+
* @brief Collection of all configuration structures declarations.
111+
*/
112+
#define PSI5_IP_CONFIG_EXT
113+
/**
114+
* @brief Switches the Psi5_Ip_Transmit() API ON or OFF.
115+
*
116+
* @api
117+
*
118+
*/
119+
#define PSI5_IP_TRANSMIT_API (STD_ON)
120+
121+
/**
122+
* @brief Switches the Psi5_Ip_GetTransmissionStatus() API ON or OFF.
123+
*
124+
* @api
125+
*
126+
*/
127+
#define PSI5_IP_GET_TRANSMISSION_STATUS_API (STD_ON)
128+
129+
/**
130+
* @brief Switches the Psi5_Ip_GetPsi5Frame() API ON or OFF.
131+
*
132+
* @api
133+
*
134+
*/
135+
#define PSI5_IP_GET_PSI5_FRAME_API (STD_ON)
136+
137+
/**
138+
* @brief Switches the Psi5_Ip_GetSmcFrame() API ON or OFF.
139+
*
140+
* @api
141+
*
142+
*/
143+
#define PSI5_IP_GET_SMC_FRAME_API (STD_ON)
144+
145+
/**
146+
* @brief Switches the Psi5_Ip_SetGlobalSync() API ON or OFF.
147+
*
148+
* @api
149+
*
150+
*/
151+
#define PSI5_IP_SET_GLOBAL_SYNC_API (STD_ON)
152+
153+
/**
154+
* @brief Switches the Psi5_Ip_SetChannelSync() API ON or OFF.
155+
*
156+
* @api
157+
*
158+
*/
159+
#define PSI5_IP_SET_CHANNEL_SYNC_API (STD_ON)
160+
161+
/*==================================================================================================
162+
* ENUMS
163+
==================================================================================================*/
164+
165+
/*==================================================================================================
166+
* STRUCTURES AND OTHER TYPEDEFS
167+
==================================================================================================*/
168+
169+
/*==================================================================================================
170+
* GLOBAL VARIABLE DECLARATIONS
171+
==================================================================================================*/
172+
173+
/*==================================================================================================
174+
* GLOBAL CONSTANTS
175+
==================================================================================================*/
176+
177+
/*==================================================================================================
178+
* FUNCTION PROTOTYPES
179+
==================================================================================================*/
180+
#define PSI5_START_SEC_CODE
181+
#include "Psi5_MemMap.h"
182+
183+
#define PSI5_STOP_SEC_CODE
184+
#include "Psi5_MemMap.h"
185+
186+
#ifdef __cplusplus
187+
}
188+
#endif
189+
190+
/** @} */
191+
192+
#endif /* PSI5_IP_CFG_H */
193+
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*
2+
* Copyright 2021-2025 NXP
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
7+
#ifndef PSI5_IP_CFG_DEFINES_H
8+
#define PSI5_IP_CFG_DEFINES_H
9+
10+
/**
11+
* @file Psi5_Ip_Cfg_Defines.h
12+
*
13+
* @addtogroup PSI5_IP PSI5 IPV Driver
14+
* @{
15+
*/
16+
17+
18+
#ifdef __cplusplus
19+
extern "C"{
20+
#endif
21+
/*==================================================================================================
22+
* INCLUDE FILES
23+
* 1) system and project includes
24+
* 2) needed interfaces from external units
25+
* 3) internal and external interfaces from this unit
26+
==================================================================================================*/
27+
#include "S32Z2_PSI5.h"
28+
/*==================================================================================================
29+
* SOURCE FILE VERSION INFORMATION
30+
==================================================================================================*/
31+
#define PSI5_IP_CFG_DEFINES_VENDOR_ID 43
32+
#define PSI5_IP_CFG_DEFINES_AR_RELEASE_MAJOR_VERSION 4
33+
#define PSI5_IP_CFG_DEFINES_AR_RELEASE_MINOR_VERSION 7
34+
#define PSI5_IP_CFG_DEFINES_AR_RELEASE_REVISION_VERSION 0
35+
#define PSI5_IP_CFG_DEFINES_SW_MAJOR_VERSION 2
36+
#define PSI5_IP_CFG_DEFINES_SW_MINOR_VERSION 0
37+
#define PSI5_IP_CFG_DEFINES_SW_PATCH_VERSION 1
38+
/*==================================================================================================
39+
* FILE VERSION CHECKS
40+
==================================================================================================*/
41+
42+
/*==================================================================================================
43+
* GLOBAL VARIABLE DECLARATIONS
44+
==================================================================================================*/
45+
46+
/*==================================================================================================
47+
* ENUMS
48+
==================================================================================================*/
49+
50+
/*==================================================================================================
51+
* CONSTANTS
52+
==================================================================================================*/
53+
54+
/*==================================================================================================
55+
* DEFINES AND MACROS
56+
==================================================================================================*/
57+
/* @brief Enables / Disables multipartition support */
58+
#define PSI5_IP_MULTIPARTITION_SUPPORT (STD_ON)
59+
60+
#define PSI5_IP_DEV_ERROR_DETECT (STD_OFF)
61+
62+
/* Define for HW channelId of channel Psi5Channel_0 */
63+
#define PSI5_0_CH0 (0U)
64+
#define PSI5_IP_ENABLE_INTERRUPTS_PSI5_0_CH0
65+
66+
67+
#define PSI5_IP_DMA_IS_USED (STD_OFF)
68+
#define PSI5_IP_DMA_PSI5_FRAME_IS_USED (STD_OFF)
69+
#define PSI5_IP_DMA_SMC_FRAME_IS_USED (STD_OFF)
70+
71+
/*==================================================================================================
72+
* STRUCTURES AND OTHER TYPEDEFS
73+
==================================================================================================*/
74+
75+
/*==================================================================================================
76+
* FUNCTION PROTOTYPES
77+
==================================================================================================*/
78+
#ifdef __cplusplus
79+
}
80+
#endif
81+
82+
/** @} */
83+
84+
#endif /* PSI5_IP_CFG_DEFINES_H */
85+
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/*
2+
* Copyright 2021-2025 NXP
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
7+
#ifndef PSI5_IP_INIT_PBCFG_H
8+
#define PSI5_IP_INIT_PBCFG_H
9+
10+
/**
11+
* @file Psi5_Ip_Init_PBcfg.h
12+
*
13+
* @addtogroup PSI5_IP PSI5 IPV Driver
14+
* @{
15+
*/
16+
17+
#ifdef __cplusplus
18+
extern "C"{
19+
#endif
20+
21+
/*==================================================================================================
22+
INCLUDE FILES
23+
1) system and project includes
24+
2) needed interfaces from external units
25+
3) internal and external interfaces from this unit
26+
==================================================================================================*/
27+
#include "Psi5_Ip_Types.h"
28+
29+
/*==================================================================================================
30+
SOURCE FILE VERSION INFORMATION
31+
==================================================================================================*/
32+
#define PSI5_IP_INIT_PBCFG_VENDOR_ID 43
33+
#define PSI5_IP_INIT_PBCFG_AR_RELEASE_MAJOR_VERSION 4
34+
#define PSI5_IP_INIT_PBCFG_AR_RELEASE_MINOR_VERSION 7
35+
#define PSI5_IP_INIT_PBCFG_AR_RELEASE_REVISION_VERSION 0
36+
#define PSI5_IP_INIT_PBCFG_SW_MAJOR_VERSION 2
37+
#define PSI5_IP_INIT_PBCFG_SW_MINOR_VERSION 0
38+
#define PSI5_IP_INIT_PBCFG_SW_PATCH_VERSION 1
39+
40+
/*==================================================================================================
41+
* FILE VERSION CHECKS
42+
==================================================================================================*/
43+
/* Check if current file and Psi5_Ip_Types.h header file are of the same vendor */
44+
#if (PSI5_IP_INIT_PBCFG_VENDOR_ID != PSI5_IP_TYPES_VENDOR_ID)
45+
#error "Psi5_Ip_INIT_PBcfg.h and Psi5_Ip_Types.h have different vendor ids"
46+
#endif
47+
/* Check if current file and Psi5_Ip_Types.h header file are of the same Autosar version */
48+
#if ((PSI5_IP_INIT_PBCFG_AR_RELEASE_MAJOR_VERSION != PSI5_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \
49+
(PSI5_IP_INIT_PBCFG_AR_RELEASE_MINOR_VERSION != PSI5_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \
50+
(PSI5_IP_INIT_PBCFG_AR_RELEASE_REVISION_VERSION != PSI5_IP_TYPES_AR_RELEASE_REVISION_VERSION) \
51+
)
52+
#error "AutoSar Version Numbers of Psi5_Ip_INIT_PBcfg.h and Psi5_Ip_Types.h are different"
53+
#endif
54+
/* Check if current file and Psi5_Ip_Types.h header file are of the same software version */
55+
#if ((PSI5_IP_INIT_PBCFG_SW_MAJOR_VERSION != PSI5_IP_TYPES_SW_MAJOR_VERSION) || \
56+
(PSI5_IP_INIT_PBCFG_SW_MINOR_VERSION != PSI5_IP_TYPES_SW_MINOR_VERSION) || \
57+
(PSI5_IP_INIT_PBCFG_SW_PATCH_VERSION != PSI5_IP_TYPES_SW_PATCH_VERSION) \
58+
)
59+
#error "Software Version Numbers of Psi5_Ip_INIT_PBcfg.h and Psi5_Ip_Types.h are different"
60+
#endif
61+
/*==================================================================================================
62+
* CONSTANTS
63+
==================================================================================================*/
64+
65+
/*==================================================================================================
66+
* DEFINES AND MACROS
67+
==================================================================================================*/
68+
69+
/*==================================================================================================
70+
* ENUMS
71+
==================================================================================================*/
72+
73+
/*==================================================================================================
74+
* STRUCTURES AND OTHER TYPEDEFS
75+
==================================================================================================*/
76+
77+
/*==================================================================================================
78+
* GLOBAL VARIABLE DECLARATIONS
79+
==================================================================================================*/
80+
81+
/*==================================================================================================
82+
* FUNCTION PROTOTYPES
83+
==================================================================================================*/
84+
85+
#ifdef __cplusplus
86+
}
87+
#endif
88+
89+
/**@}*/
90+
91+
#endif /* PSI5_IP_INIT_PBCFG_H */
92+

0 commit comments

Comments
 (0)