HPM SDK
HPMicro Software Development Kit
hpm_esc_regs.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021-2025 HPMicro
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 
9 #ifndef HPM_ESC_H
10 #define HPM_ESC_H
11 
12 typedef struct {
13  __R uint8_t TYPE; /* 0x0: Type of EtherCAT controller */
14  __R uint8_t REVISION; /* 0x1: Revision of EtherCAT controller */
15  __R uint16_t BUILD; /* 0x2: Build of EtherCAT controller */
16  __R uint8_t FMMU_NUM; /* 0x4: FMMU supported */
17  __R uint8_t SYNCM_NUM; /* 0x5: SyncManagers supported */
18  __R uint8_t RAM_SIZE; /* 0x6: RAM Size */
19  __R uint8_t PORT_DESC; /* 0x7: Port Descriptor */
20  __R uint16_t FEATURE; /* 0x8: ESC Feature supported */
21  __R uint8_t RESERVED0[6]; /* 0xA - 0xF: Reserved */
22  __R uint16_t STATION_ADDR; /* 0x10: Configured Station Address */
23  __RW uint16_t STATION_ALS; /* 0x12: Configured Station Alias */
24  __R uint8_t RESERVED1[12]; /* 0x14 - 0x1F: Reserved */
25  __R uint8_t REG_WEN; /* 0x20: Register Write Enable */
26  __R uint8_t REG_WP; /* 0x21: Register Write Protection */
27  __R uint8_t RESERVED2[14]; /* 0x22 - 0x2F: Reserved */
28  __R uint8_t ESC_WEN; /* 0x30: ESC Write Enable */
29  __R uint8_t ESC_WP; /* 0x31: ESC Write Protection */
30  __R uint8_t RESERVED3[14]; /* 0x32 - 0x3F: Reserved */
31  __R uint8_t ESC_RST_ECAT; /* 0x40: ESC Reset ECAT */
32  __RW uint8_t ESC_RST_PDI; /* 0x41: ESC Reset PDI */
33  __R uint8_t RESERVED4[190]; /* 0x42 - 0xFF: Reserved */
34  __R uint32_t ESC_DL_CTRL; /* 0x100: ESC DL Control */
35  __R uint8_t RESERVED5[4]; /* 0x104 - 0x107: Reserved */
36  __R uint16_t PHYSICAL_RW_OFFSET; /* 0x108: Physical Read/Write Offset */
37  __R uint8_t RESERVED6[6]; /* 0x10A - 0x10F: Reserved */
38  __R uint16_t ESC_DL_STAT; /* 0x110: ESC DL Status */
39  __R uint8_t RESERVED7[14]; /* 0x112 - 0x11F: Reserved */
40  __RW uint16_t AL_CTRL; /* 0x120: AL Control */
41  __R uint8_t RESERVED8[14]; /* 0x122 - 0x12F: Reserved */
42  __RW uint16_t AL_STAT; /* 0x130: AL Status */
43  __R uint8_t RESERVED9[2]; /* 0x132 - 0x133: Reserved */
44  __RW uint16_t AL_STAT_CODE; /* 0x134: AL Status Code */
45  __R uint8_t RESERVED10[2]; /* 0x136 - 0x137: Reserved */
46  __RW uint8_t RUN_LED_OVRD; /* 0x138: RUN LED Override */
47  __RW uint8_t ERR_LED_OVRD; /* 0x139: ERR LED Override */
48  __R uint8_t RESERVED11[6]; /* 0x13A - 0x13F: Reserved */
49  __R uint8_t PDI_CTRL; /* 0x140: PDI Control */
50  __R uint8_t ESC_CFG; /* 0x141: ESC Configuration */
51  __R uint8_t RESERVED12[12]; /* 0x142 - 0x14D: Reserved */
52  __R uint16_t PDI_INFO; /* 0x14E: PDI Information */
53  __R uint8_t PDI_CFG; /* 0x150: PDI Configuration */
54  __R uint8_t PDI_SL_CFG; /* 0x151: PDI Sync/Latch[1:0] Configuration */
55  __RW uint16_t PDI_EXT_CFG; /* 0x152: PDI Extended Configuration */
56  __R uint8_t RESERVED13[172]; /* 0x154 - 0x1FF: Reserved */
57  __R uint16_t ECAT_EVT_MSK; /* 0x200: ECAT Event Mask */
58  __R uint8_t RESERVED14[2]; /* 0x202 - 0x203: Reserved */
59  __RW uint32_t PDI_AL_EVT_MSK; /* 0x204: PDI AL Event Mask */
60  __R uint8_t RESERVED15[8]; /* 0x208 - 0x20F: Reserved */
61  __R uint16_t ECAT_EVT_REQ; /* 0x210: ECAT Event Request */
62  __R uint8_t RESERVED16[14]; /* 0x212 - 0x21F: Reserved */
63  __R uint32_t AL_EVT_REQ; /* 0x220: AL Event Request */
64  __R uint8_t RESERVED17[220]; /* 0x224 - 0x2FF: Reserved */
65  __R uint16_t RX_ERR_CNT[4]; /* 0x300 - 0x306: RX Error Counter */
66  __R uint8_t FWD_RX_ERR_CNT[4]; /* 0x308 - 0x30B: Forwarded RX Error Counter */
67  __R uint8_t ECAT_PU_ERR_CNT; /* 0x30C: ECAT Processing Unit Error Counter */
68  __R uint8_t PDI_ERR_CNT; /* 0x30D: PDI Error Counter */
69  __R uint8_t RESERVED18[2]; /* 0x30E - 0x30F: Reserved */
70  __R uint8_t LOST_LINK_CNT[4]; /* 0x310 - 0x313: Lost Link Counter */
71  __R uint8_t RESERVED19[236]; /* 0x314 - 0x3FF: Reserved */
72  __R uint16_t WDG_DIV; /* 0x400: Watchdog Divider */
73  __R uint8_t RESERVED20[14]; /* 0x402 - 0x40F: Reserved */
74  __R uint16_t WDG_TIME_PDI; /* 0x410: Watchdog Time PDI */
75  __R uint8_t RESERVED21[14]; /* 0x412 - 0x41F: Reserved */
76  __R uint16_t WDG_TIME_PDAT; /* 0x420: Watchdog Time Process Data */
77  __R uint8_t RESERVED22[30]; /* 0x422 - 0x43F: Reserved */
78  __RW uint16_t WDG_STAT_PDAT; /* 0x440: Watchdog Status Process Data */
79  __R uint8_t WDG_CNT_PDAT; /* 0x442: Watchdog Counter Process Data */
80  __R uint8_t WDG_CNT_PDI; /* 0x443: Watchdog Counter PDI */
81  __R uint8_t RESERVED23[188]; /* 0x444 - 0x4FF: Reserved */
82  __R uint8_t EEPROM_CFG; /* 0x500: EEPROM Configuration */
83  __RW uint8_t EEPROM_PDI_ACC_STAT; /* 0x501: EEPROM PDI Access State */
84  __RW uint16_t EEPROM_CTRL_STAT; /* 0x502: EEPROM Control/Status */
85  __RW uint32_t EEPROM_ADDR; /* 0x504: EEPROM Address */
86  __RW uint64_t EEPROM_DATA; /* 0x508: EEPROM Data */
87  __RW uint16_t MII_MNG_CS; /* 0x510: MII Management Control/Status */
88  __RW uint8_t PHY_ADDR; /* 0x512: PHY Address */
89  __RW uint8_t PHY_REG_ADDR; /* 0x513: PHY Register Address */
90  __RW uint16_t PHY_DATA; /* 0x514: PHY Data */
91  __R uint8_t MIIM_ECAT_ACC_STAT; /* 0x516: MII Management ECAT Access State */
92  __RW uint8_t MIIM_PDI_ACC_STAT; /* 0x517: MII Management PDI Access State */
93  __RW uint8_t PHY_STAT[4]; /* 0x518 - 0x51B: PHY Port */
94  __R uint8_t RESERVED24[228]; /* 0x51C - 0x5FF: Reserved */
95  struct {
96  __R uint32_t LOGIC_START_ADDR; /* 0x600: Logical Start Address */
97  __R uint16_t LENGTH; /* 0x604: Length */
98  __R uint8_t LOGIC_START_BIT; /* 0x606: Logical Start Bit */
99  __R uint8_t LOGIC_STOP_BIT; /* 0x607: Logical Stop Bit */
100  __R uint16_t PHYSICAL_START_ADDR; /* 0x608: Physical Start Address */
101  __R uint8_t PHYSICAL_START_BIT; /* 0x60A: Physical Start Bit */
102  __R uint8_t TYPE; /* 0x60B: Type */
103  __R uint8_t ACTIVATE; /* 0x60C: Activate */
104  __R uint8_t RESERVED0[3]; /* 0x60D - 0x60F: Reserved */
105  } FMMU[8];
106  __R uint8_t RESERVED25[384]; /* 0x680 - 0x7FF: Reserved */
107  struct {
108  __R uint16_t PHYSICAL_START_ADDR; /* 0x800: Physical Start Address */
109  __R uint16_t LENGTH; /* 0x802: Length */
110  __R uint8_t CONTROL; /* 0x804: Control */
111  __R uint8_t STATUS; /* 0x805: Status */
112  __RW uint8_t ACTIVATE; /* 0x806: Activate */
113  __RW uint8_t PDI_CTRL; /* 0x807: PDI Control */
114  } SYNCM[8];
115  __R uint8_t RESERVED26[192]; /* 0x840 - 0x8FF: Reserved */
116  __R uint32_t RCV_TIME[4]; /* 0x900 - 0x90C: Receive Time */
117  __RW uint64_t SYS_TIME; /* 0x910: System Time */
118  __R uint64_t RCVT_ECAT_PU; /* 0x918: Receive Time ECAT Processing Unit */
119  __RW uint64_t SYS_TIME_OFFSET; /* 0x920: System Time Offset */
120  __RW uint32_t SYS_TIME_DELAY; /* 0x928: System Time Delay */
121  __R uint32_t SYS_TIME_DIFF; /* 0x92C: System Time Difference */
122  __RW uint16_t SPD_CNT_START; /* 0x930: Speed Counter Start */
123  __R uint16_t SPD_CNT_DIFF; /* 0x932: Speed Counter Diff */
124  __RW uint8_t SYS_TIME_DIFF_FD; /* 0x934: System Time Difference Filter Depth */
125  __RW uint8_t SPD_CNT_FD; /* 0x935: Speed Counter Filter Depth */
126  __R uint8_t RCV_TIME_LM; /* 0x936: Receive Time Latch Mode */
127  __R uint8_t RESERVED27[73]; /* 0x937 - 0x97F: Reserved */
128  __R uint8_t CYC_UNIT_CTRL; /* 0x980: Cyclic Unit Control */
129  __RW uint8_t SYNCO_ACT; /* 0x981: SYNC Out Unit Activation */
130  __R uint16_t PULSE_LEN; /* 0x982: Pulse Length of SyncSignals */
131  __R uint8_t ACT_STAT; /* 0x984: Activation Status */
132  __R uint8_t RESERVED28[9]; /* 0x985 - 0x98D: Reserved */
133  __RW uint8_t SYNC0_STAT; /* 0x98E: SYNC0 Status */
134  __RW uint8_t SYNC1_STAT; /* 0x98F: SYNC1 Status */
135  __RW uint64_t START_TIME_CO; /* 0x990: Start Time Cyclic Operation */
136  __R uint64_t NXT_SYNC1_PULSE; /* 0x998: Next SYNC1 Pulse */
137  __RW uint32_t SYNC0_CYC_TIME; /* 0x9A0: SYNC0 Cycle Time */
138  __RW uint32_t SYNC1_CYC_TIME; /* 0x9A4: SYNC1 Cycle Time */
139  __RW uint8_t LATCH0_CTRL; /* 0x9A8: Latch0 Control */
140  __RW uint8_t LATCH1_CTRL; /* 0x9A9: Latch1 Control */
141  __R uint8_t RESERVED29[4]; /* 0x9AA - 0x9AD: Reserved */
142  __R uint8_t LATCH0_STAT; /* 0x9AE: Latch0 Status */
143  __R uint8_t LATCH1_STAT; /* 0x9AF: Latch1 Status */
144  __RW uint64_t LATCH0_TIME_PE; /* 0x9B0: Latch0 Time Positive Edge */
145  __RW uint64_t LATCH0_TIME_NE; /* 0x9B8: Latch0 Time Negative Edge */
146  __RW uint64_t LATCH1_TIME_PE; /* 0x9C0: Latch1 Time Positive Edge */
147  __RW uint64_t LATCH1_TIME_NE; /* 0x9C8: Latch1 Time Negative Edge */
148  __R uint8_t RESERVED30[32]; /* 0x9D0 - 0x9EF: Reserved */
149  __R uint32_t ECAT_BUF_CET; /* 0x9F0: EtherCAT Buffer Change Event Time */
150  __R uint8_t RESERVED31[4]; /* 0x9F4 - 0x9F7: Reserved */
151  __R uint32_t PDI_BUF_SET; /* 0x9F8: PDI Buffer Start Event Time */
152  __R uint32_t PDI_BUF_CET; /* 0x9FC: PDI Buffer Change Event Time */
153  __R uint8_t RESERVED32[1024]; /* 0xA00 - 0xDFF: Reserved */
154  __R uint64_t PID; /* 0xE00: Product ID */
155  __R uint64_t VID; /* 0xE08: Vendor ID */
156  __R uint8_t RESERVED33[240]; /* 0xE10 - 0xEFF: Reserved */
157  __R uint32_t DIO_OUT_DATA; /* 0xF00: Digital I/O Output Data */
158  __R uint8_t RESERVED34[12]; /* 0xF04 - 0xF0F: Reserved */
159  __RW uint64_t GPO; /* 0xF10: General Purpose Outputs */
160  __R uint64_t GPI; /* 0xF18: General Purpose Inputs */
161  __R uint8_t RESERVED35[96]; /* 0xF20 - 0xF7F: Reserved */
162  __RW uint8_t USER_RAM_BYTE0; /* 0xF80: User Ram Byte 0 */
163  __RW uint8_t USER_RAM_BYTE1; /* 0xF81: User Ram Byte 1 */
164  __RW uint8_t USER_RAM_BYTE2; /* 0xF82: User Ram Byte 2 */
165  __RW uint8_t USER_RAM_BYTE3; /* 0xF83: User Ram Byte 3 */
166  __RW uint8_t USER_RAM_BYTE4; /* 0xF84: User Ram Byte 4 */
167  __RW uint8_t USER_RAM_BYTE5; /* 0xF85: User Ram Byte 5 */
168  __RW uint8_t USER_RAM_BYTE6; /* 0xF86: User Ram Byte 6 */
169  __RW uint8_t USER_RAM_BYTE7; /* 0xF87: User Ram Byte 7 */
170  __RW uint8_t USER_RAM_BYTE8; /* 0xF88: User Ram Byte 8 */
171  __RW uint8_t USER_RAM_BYTE9; /* 0xF89: User Ram Byte 9 */
172  __RW uint8_t USER_RAM_BYTE10; /* 0xF8A: User Ram Byte 10 */
173  __RW uint8_t USER_RAM_BYTE11; /* 0xF8B: User Ram Byte 11 */
174  __R uint8_t RESERVED36[2]; /* 0xF8C - 0xF8D: Reserved */
175  __RW uint8_t USER_RAM_BYTE14; /* 0xF8E: User Ram Byte 14 */
176  __RW uint8_t USER_RAM_BYTE15; /* 0xF8F: User Ram Byte 15 */
177  __R uint8_t RESERVED37[3]; /* 0xF90 - 0xF92: Reserved */
178  __RW uint8_t USER_RAM_BYTE19; /* 0xF93: User Ram Byte 19 */
179  __R uint8_t RESERVED38[108]; /* 0xF94 - 0xFFF: Reserved */
180  __RW uint32_t PDRAM; /* 0x1000: Process Data Ram */
181  __R uint8_t RESERVED39[61436]; /* 0x1004 - 0xFFFF: Reserved */
182  __RW uint32_t PDRAM_ALS; /* 0x10000: Process Data Ram Alias */
183  __R uint8_t RESERVED40[61436]; /* 0x10004 - 0x1EFFF: Reserved */
184  __RW uint32_t GPR_CFG0; /* 0x1F000: General Purpose Configure 0 */
185  __RW uint32_t GPR_CFG1; /* 0x1F004: General Purpose Configure 1 */
186  __RW uint32_t GPR_CFG2; /* 0x1F008: General Purpose Configure 2 */
187  __R uint8_t RESERVED41[4]; /* 0x1F00C - 0x1F00F: Reserved */
188  __RW uint32_t PHY_CFG0; /* 0x1F010: PHY Configure 0 */
189  __RW uint32_t PHY_CFG1; /* 0x1F014: PHY Configure 1 */
190  __R uint8_t RESERVED42[8]; /* 0x1F018 - 0x1F01F: Reserved */
191  __RW uint32_t GPIO_CTRL; /* 0x1F020: GPIO Output Enable */
192  __RW uint32_t GPI_TRIG_CFG; /* 0x1F024: GPI trigger config */
193  __RW uint32_t GPO_TRIG_CFG; /* 0x1F028: GPO trigger config */
194  __R uint8_t RESERVED43[4]; /* 0x1F02C - 0x1F02F: Reserved */
195  __RW uint32_t GPI_OVERRIDE0; /* 0x1F030: GPI low word Override value */
196  __RW uint32_t GPI_OVERRIDE1; /* 0x1F034: GPI high word Override value */
197  __R uint32_t GPO_REG0; /* 0x1F038: GPO low word read value */
198  __R uint32_t GPO_REG1; /* 0x1F03C: GPO high word read value */
199  __R uint32_t GPI_REG0; /* 0x1F040: GPI low word read value */
200  __R uint32_t GPI_REG1; /* 0x1F044: GPI high word read value */
201  __R uint8_t RESERVED44[24]; /* 0x1F048 - 0x1F05F: Reserved */
202  __R uint32_t GPR_STATUS; /* 0x1F060: global status register */
203  __R uint8_t RESERVED45[28]; /* 0x1F064 - 0x1F07F: Reserved */
204  __RW uint32_t IO_CFG[9]; /* 0x1F080 - 0x1F0A0: CTR IO Configure */
205 } ESC_Type;
206 
207 
208 /* Bitfield definition for register: TYPE */
209 /*
210  * TYPE (RO)
211  *
212  * Controller type
213  */
214 #define ESC_TYPE_TYPE_MASK (0xFFU)
215 #define ESC_TYPE_TYPE_SHIFT (0U)
216 #define ESC_TYPE_TYPE_GET(x) (((uint8_t)(x) & ESC_TYPE_TYPE_MASK) >> ESC_TYPE_TYPE_SHIFT)
217 
218 /* Bitfield definition for register: REVISION */
219 /*
220  * X (RO)
221  *
222  * major version X
223  */
224 #define ESC_REVISION_X_MASK (0xFFU)
225 #define ESC_REVISION_X_SHIFT (0U)
226 #define ESC_REVISION_X_GET(x) (((uint8_t)(x) & ESC_REVISION_X_MASK) >> ESC_REVISION_X_SHIFT)
227 
228 /* Bitfield definition for register: BUILD */
229 /*
230  * BUILD (RO)
231  *
232  */
233 #define ESC_BUILD_BUILD_MASK (0xFF00U)
234 #define ESC_BUILD_BUILD_SHIFT (8U)
235 #define ESC_BUILD_BUILD_GET(x) (((uint16_t)(x) & ESC_BUILD_BUILD_MASK) >> ESC_BUILD_BUILD_SHIFT)
236 
237 /*
238  * Y (RO)
239  *
240  * minor version Y
241  */
242 #define ESC_BUILD_Y_MASK (0xF0U)
243 #define ESC_BUILD_Y_SHIFT (4U)
244 #define ESC_BUILD_Y_GET(x) (((uint16_t)(x) & ESC_BUILD_Y_MASK) >> ESC_BUILD_Y_SHIFT)
245 
246 /*
247  * Z (RO)
248  *
249  * maintenance version Z
250  */
251 #define ESC_BUILD_Z_MASK (0xFU)
252 #define ESC_BUILD_Z_SHIFT (0U)
253 #define ESC_BUILD_Z_GET(x) (((uint16_t)(x) & ESC_BUILD_Z_MASK) >> ESC_BUILD_Z_SHIFT)
254 
255 /* Bitfield definition for register: FMMU_NUM */
256 /*
257  * NUM (RO)
258  *
259  * Number of supported FMMU channels (or entities)
260  */
261 #define ESC_FMMU_NUM_NUM_MASK (0xFFU)
262 #define ESC_FMMU_NUM_NUM_SHIFT (0U)
263 #define ESC_FMMU_NUM_NUM_GET(x) (((uint8_t)(x) & ESC_FMMU_NUM_NUM_MASK) >> ESC_FMMU_NUM_NUM_SHIFT)
264 
265 /* Bitfield definition for register: SYNCM_NUM */
266 /*
267  * NUM (RO)
268  *
269  * Number of supported SyncManager channels (or entities)
270  */
271 #define ESC_SYNCM_NUM_NUM_MASK (0xFFU)
272 #define ESC_SYNCM_NUM_NUM_SHIFT (0U)
273 #define ESC_SYNCM_NUM_NUM_GET(x) (((uint8_t)(x) & ESC_SYNCM_NUM_NUM_MASK) >> ESC_SYNCM_NUM_NUM_SHIFT)
274 
275 /* Bitfield definition for register: RAM_SIZE */
276 /*
277  * SIZE (RO)
278  *
279  * Process Data RAM size supported in KByte
280  */
281 #define ESC_RAM_SIZE_SIZE_MASK (0xFFU)
282 #define ESC_RAM_SIZE_SIZE_SHIFT (0U)
283 #define ESC_RAM_SIZE_SIZE_GET(x) (((uint8_t)(x) & ESC_RAM_SIZE_SIZE_MASK) >> ESC_RAM_SIZE_SIZE_SHIFT)
284 
285 /* Bitfield definition for register: PORT_DESC */
286 /*
287  * PORT3 (RO)
288  *
289  * Port configuration:
290  * 00:Not implemented
291  * 01:Not configured (SII EEPROM)
292  * 10:EBUS
293  * 11:MII/RMII/RGMII
294  */
295 #define ESC_PORT_DESC_PORT3_MASK (0xC0U)
296 #define ESC_PORT_DESC_PORT3_SHIFT (6U)
297 #define ESC_PORT_DESC_PORT3_GET(x) (((uint8_t)(x) & ESC_PORT_DESC_PORT3_MASK) >> ESC_PORT_DESC_PORT3_SHIFT)
298 
299 /*
300  * PORT2 (RO)
301  *
302  * Port configuration:
303  * 00:Not implemented
304  * 01:Not configured (SII EEPROM)
305  * 10:EBUS
306  * 11:MII/RMII/RGMII
307  */
308 #define ESC_PORT_DESC_PORT2_MASK (0x30U)
309 #define ESC_PORT_DESC_PORT2_SHIFT (4U)
310 #define ESC_PORT_DESC_PORT2_GET(x) (((uint8_t)(x) & ESC_PORT_DESC_PORT2_MASK) >> ESC_PORT_DESC_PORT2_SHIFT)
311 
312 /*
313  * PORT1 (RO)
314  *
315  * Port configuration:
316  * 00:Not implemented
317  * 01:Not configured (SII EEPROM)
318  * 10:EBUS
319  * 11:MII/RMII/RGMII
320  */
321 #define ESC_PORT_DESC_PORT1_MASK (0xCU)
322 #define ESC_PORT_DESC_PORT1_SHIFT (2U)
323 #define ESC_PORT_DESC_PORT1_GET(x) (((uint8_t)(x) & ESC_PORT_DESC_PORT1_MASK) >> ESC_PORT_DESC_PORT1_SHIFT)
324 
325 /*
326  * PORT0 (RO)
327  *
328  * Port configuration:
329  * 00:Not implemented
330  * 01:Not configured (SII EEPROM)
331  * 10:EBUS
332  * 11:MII/RMII/RGMII
333  */
334 #define ESC_PORT_DESC_PORT0_MASK (0x3U)
335 #define ESC_PORT_DESC_PORT0_SHIFT (0U)
336 #define ESC_PORT_DESC_PORT0_GET(x) (((uint8_t)(x) & ESC_PORT_DESC_PORT0_MASK) >> ESC_PORT_DESC_PORT0_SHIFT)
337 
338 /* Bitfield definition for register: FEATURE */
339 /*
340  * FFSC (RO)
341  *
342  * Fixed FMMU/SyncManager configuration:
343  * 0:Variable configuration
344  * 1:Fixed configuration (refer to documentation of supporting ESCs)
345  */
346 #define ESC_FEATURE_FFSC_MASK (0x800U)
347 #define ESC_FEATURE_FFSC_SHIFT (11U)
348 #define ESC_FEATURE_FFSC_GET(x) (((uint16_t)(x) & ESC_FEATURE_FFSC_MASK) >> ESC_FEATURE_FFSC_SHIFT)
349 
350 /*
351  * RWC (RO)
352  *
353  * EtherCAT read/write command support(BRW,APRW,FPRW):
354  * 0:Supported
355  * 1:Not supported
356  */
357 #define ESC_FEATURE_RWC_MASK (0x400U)
358 #define ESC_FEATURE_RWC_SHIFT (10U)
359 #define ESC_FEATURE_RWC_GET(x) (((uint16_t)(x) & ESC_FEATURE_RWC_MASK) >> ESC_FEATURE_RWC_SHIFT)
360 
361 /*
362  * LRW (RO)
363  *
364  * EtherCAT LRW command support:
365  * 0:Supported
366  * 1:Not supported
367  */
368 #define ESC_FEATURE_LRW_MASK (0x200U)
369 #define ESC_FEATURE_LRW_SHIFT (9U)
370 #define ESC_FEATURE_LRW_GET(x) (((uint16_t)(x) & ESC_FEATURE_LRW_MASK) >> ESC_FEATURE_LRW_SHIFT)
371 
372 /*
373  * EDSA (RO)
374  *
375  * Enhanced DC SYNC Activation:
376  * 0:Not available
377  * 1:Available
378  * Note:This feature refers to registers 0x981[7:3] and 0x0984
379  */
380 #define ESC_FEATURE_EDSA_MASK (0x100U)
381 #define ESC_FEATURE_EDSA_SHIFT (8U)
382 #define ESC_FEATURE_EDSA_GET(x) (((uint16_t)(x) & ESC_FEATURE_EDSA_MASK) >> ESC_FEATURE_EDSA_SHIFT)
383 
384 /*
385  * SHFE (RO)
386  *
387  * Seperate Handling of FCS Errors:
388  * 0:Not supported
389  * 1:Supported, frames with wrong FCS and additional nibble will be counted separately in Forwarded RX Error Counter
390  */
391 #define ESC_FEATURE_SHFE_MASK (0x80U)
392 #define ESC_FEATURE_SHFE_SHIFT (7U)
393 #define ESC_FEATURE_SHFE_GET(x) (((uint16_t)(x) & ESC_FEATURE_SHFE_MASK) >> ESC_FEATURE_SHFE_SHIFT)
394 
395 /*
396  * ELDM (RO)
397  *
398  * Enhanced Link Detection MII:
399  * 0:Not available
400  * 1:Available
401  */
402 #define ESC_FEATURE_ELDM_MASK (0x40U)
403 #define ESC_FEATURE_ELDM_SHIFT (6U)
404 #define ESC_FEATURE_ELDM_GET(x) (((uint16_t)(x) & ESC_FEATURE_ELDM_MASK) >> ESC_FEATURE_ELDM_SHIFT)
405 
406 /*
407  * DCW (RO)
408  *
409  * Distributed Clocks width:
410  * 0:32 bit
411  * 1:64 bit
412  */
413 #define ESC_FEATURE_DCW_MASK (0x8U)
414 #define ESC_FEATURE_DCW_SHIFT (3U)
415 #define ESC_FEATURE_DCW_GET(x) (((uint16_t)(x) & ESC_FEATURE_DCW_MASK) >> ESC_FEATURE_DCW_SHIFT)
416 
417 /*
418  * DC (RO)
419  *
420  * Distributed Clocks:
421  * 0:Not available
422  * 1:Available
423  */
424 #define ESC_FEATURE_DC_MASK (0x4U)
425 #define ESC_FEATURE_DC_SHIFT (2U)
426 #define ESC_FEATURE_DC_GET(x) (((uint16_t)(x) & ESC_FEATURE_DC_MASK) >> ESC_FEATURE_DC_SHIFT)
427 
428 /*
429  * FMMU (RO)
430  *
431  * FMMU Operation:
432  * 0:Bit oriented
433  * 1:Byte oriented
434  */
435 #define ESC_FEATURE_FMMU_MASK (0x1U)
436 #define ESC_FEATURE_FMMU_SHIFT (0U)
437 #define ESC_FEATURE_FMMU_GET(x) (((uint16_t)(x) & ESC_FEATURE_FMMU_MASK) >> ESC_FEATURE_FMMU_SHIFT)
438 
439 /* Bitfield definition for register: STATION_ADDR */
440 /*
441  * ADDR (RO)
442  *
443  * Address used for node addressing
444  * (FPRD/FPWR/FPRW/FRMW commands)
445  */
446 #define ESC_STATION_ADDR_ADDR_MASK (0xFFFFU)
447 #define ESC_STATION_ADDR_ADDR_SHIFT (0U)
448 #define ESC_STATION_ADDR_ADDR_GET(x) (((uint16_t)(x) & ESC_STATION_ADDR_ADDR_MASK) >> ESC_STATION_ADDR_ADDR_SHIFT)
449 
450 /* Bitfield definition for register: STATION_ALS */
451 /*
452  * ADDR (RW)
453  *
454  * Alias Address used for node addressing
455  * (FPRD/FPWR/FPRW/FRMW commands).
456  * The use of this alias is activated by Register
457  * DL Control Bit 0x0100[24].
458  * NOTE:EEPROM value is only transferred into this
459  * register at first EEPROM load after power-on or
460  * reset.
461  * ESC20 exception:EEPROM value is transferred
462  * into this register after each EEPROM reload
463  * command.
464  */
465 #define ESC_STATION_ALS_ADDR_MASK (0xFFFFU)
466 #define ESC_STATION_ALS_ADDR_SHIFT (0U)
467 #define ESC_STATION_ALS_ADDR_SET(x) (((uint16_t)(x) << ESC_STATION_ALS_ADDR_SHIFT) & ESC_STATION_ALS_ADDR_MASK)
468 #define ESC_STATION_ALS_ADDR_GET(x) (((uint16_t)(x) & ESC_STATION_ALS_ADDR_MASK) >> ESC_STATION_ALS_ADDR_SHIFT)
469 
470 /* Bitfield definition for register: REG_WEN */
471 /*
472  * EN (RO)
473  *
474  * If register write protection is enabled, this
475  * register has to be written in the same
476  * Ethernet frame (value does not matter)
477  * before other writes to this station are allowed.
478  * This bit is self-clearing at the beginning of the
479  * next frame (SOF), or if Register Write
480  * Protection is disabled.
481  */
482 #define ESC_REG_WEN_EN_MASK (0x1U)
483 #define ESC_REG_WEN_EN_SHIFT (0U)
484 #define ESC_REG_WEN_EN_GET(x) (((uint8_t)(x) & ESC_REG_WEN_EN_MASK) >> ESC_REG_WEN_EN_SHIFT)
485 
486 /* Bitfield definition for register: REG_WP */
487 /*
488  * WP (RO)
489  *
490  * Register write protection:
491  * 0:Protection disabled
492  * 1:Protection enabled
493  * Registers 0x0000:0x0F7F are write-protected,
494  * except for 0x0020 and 0x0030
495  */
496 #define ESC_REG_WP_WP_MASK (0x1U)
497 #define ESC_REG_WP_WP_SHIFT (0U)
498 #define ESC_REG_WP_WP_GET(x) (((uint8_t)(x) & ESC_REG_WP_WP_MASK) >> ESC_REG_WP_WP_SHIFT)
499 
500 /* Bitfield definition for register: ESC_WEN */
501 /*
502  * EN (RO)
503  *
504  * If ESC write protection is enabled, this
505  * register has to be written in the same
506  * Ethernet frame (value does not matter)
507  * before other writes to this station are allowed.
508  * This bit is self-clearing at the beginning of the
509  * next frame (SOF), or if ESC Write Protection
510  * is disabled.
511  */
512 #define ESC_ESC_WEN_EN_MASK (0x1U)
513 #define ESC_ESC_WEN_EN_SHIFT (0U)
514 #define ESC_ESC_WEN_EN_GET(x) (((uint8_t)(x) & ESC_ESC_WEN_EN_MASK) >> ESC_ESC_WEN_EN_SHIFT)
515 
516 /* Bitfield definition for register: ESC_WP */
517 /*
518  * WP (RO)
519  *
520  * Write protect:
521  * 0:Protection disabled
522  * 1:Protection enabled
523  * All areas are write-protected, except for 0x0030.
524  */
525 #define ESC_ESC_WP_WP_MASK (0x1U)
526 #define ESC_ESC_WP_WP_SHIFT (0U)
527 #define ESC_ESC_WP_WP_GET(x) (((uint8_t)(x) & ESC_ESC_WP_WP_MASK) >> ESC_ESC_WP_WP_SHIFT)
528 
529 /* Bitfield definition for register: ESC_RST_ECAT */
530 /*
531  * PR (RO)
532  *
533  * Progress of the reset procedure:
534  * 00:initial/reset state
535  * 01:after writing 0x52 ('R'), when previous
536  * state was 00
537  * 10:after writing 0x45 ('E'), when previous
538  * state was 01
539  * 11:after writing 0x53 ('S'), when previous
540  * state was 10.
541  * This value must not be observed
542  * because the ESC enters reset when this
543  * state is reached, resulting in state 00
544  */
545 #define ESC_ESC_RST_ECAT_PR_MASK (0x3U)
546 #define ESC_ESC_RST_ECAT_PR_SHIFT (0U)
547 #define ESC_ESC_RST_ECAT_PR_GET(x) (((uint8_t)(x) & ESC_ESC_RST_ECAT_PR_MASK) >> ESC_ESC_RST_ECAT_PR_SHIFT)
548 
549 /* Bitfield definition for register: ESC_RST_PDI */
550 /*
551  * RST (RW)
552  *
553  * A reset is asserted after writing the reset
554  * sequence 0x52 ('R'), 0x45 ('E') and 0x53 ('S')
555  * in this register with 3 consecutive commands.
556  * Any other command which does not continue
557  * the sequence by writing the next expected
558  * value will cancel the reset procedure
559  */
560 #define ESC_ESC_RST_PDI_RST_MASK (0xFFU)
561 #define ESC_ESC_RST_PDI_RST_SHIFT (0U)
562 #define ESC_ESC_RST_PDI_RST_SET(x) (((uint8_t)(x) << ESC_ESC_RST_PDI_RST_SHIFT) & ESC_ESC_RST_PDI_RST_MASK)
563 #define ESC_ESC_RST_PDI_RST_GET(x) (((uint8_t)(x) & ESC_ESC_RST_PDI_RST_MASK) >> ESC_ESC_RST_PDI_RST_SHIFT)
564 
565 /* Bitfield definition for register: ESC_DL_CTRL */
566 /*
567  * SA (RO)
568  *
569  * Station alias:
570  * 0:Ignore Station Alias
571  * 1:Alias can be used for all configured
572  * address comm
573  */
574 #define ESC_ESC_DL_CTRL_SA_MASK (0x1000000UL)
575 #define ESC_ESC_DL_CTRL_SA_SHIFT (24U)
576 #define ESC_ESC_DL_CTRL_SA_GET(x) (((uint32_t)(x) & ESC_ESC_DL_CTRL_SA_MASK) >> ESC_ESC_DL_CTRL_SA_SHIFT)
577 
578 /*
579  * RFS (RO)
580  *
581  * RX FIFO Size (ESC delays start of
582  * forwarding until FIFO is at least half full).
583  * RX FIFO Size/RX delay reduction** :
584  * Value:EBUS:MII:
585  * 0:-50 ns -40 ns (-80 ns***)
586  * 1:-40 ns -40 ns (-80 ns***)
587  * 2:-30 ns -40 ns
588  * 3:-20 ns -40 ns
589  * 4:-10 ns no change
590  * 5:no change no change
591  * 6:no change no change
592  * 7:default default
593  * NOTE:EEPROM value is only taken over at first
594  * EEPROM load after power-on or reset
595  */
596 #define ESC_ESC_DL_CTRL_RFS_MASK (0x70000UL)
597 #define ESC_ESC_DL_CTRL_RFS_SHIFT (16U)
598 #define ESC_ESC_DL_CTRL_RFS_GET(x) (((uint32_t)(x) & ESC_ESC_DL_CTRL_RFS_MASK) >> ESC_ESC_DL_CTRL_RFS_SHIFT)
599 
600 /*
601  * LP3 (RO)
602  *
603  * Loop Port 3:
604  * 00:Auto
605  * 01:Auto Close
606  * 10:Open
607  * 11:Closed
608  */
609 #define ESC_ESC_DL_CTRL_LP3_MASK (0xC000U)
610 #define ESC_ESC_DL_CTRL_LP3_SHIFT (14U)
611 #define ESC_ESC_DL_CTRL_LP3_GET(x) (((uint32_t)(x) & ESC_ESC_DL_CTRL_LP3_MASK) >> ESC_ESC_DL_CTRL_LP3_SHIFT)
612 
613 /*
614  * LP2 (RO)
615  *
616  * Loop Port 2:
617  * 00:Auto
618  * 01:Auto Close
619  * 10:Open
620  * 11:Closed
621  */
622 #define ESC_ESC_DL_CTRL_LP2_MASK (0x3000U)
623 #define ESC_ESC_DL_CTRL_LP2_SHIFT (12U)
624 #define ESC_ESC_DL_CTRL_LP2_GET(x) (((uint32_t)(x) & ESC_ESC_DL_CTRL_LP2_MASK) >> ESC_ESC_DL_CTRL_LP2_SHIFT)
625 
626 /*
627  * LP1 (RO)
628  *
629  * Loop Port 1:
630  * 00:Auto
631  * 01:Auto Close
632  * 10:Open
633  * 11:Closed
634  */
635 #define ESC_ESC_DL_CTRL_LP1_MASK (0xC00U)
636 #define ESC_ESC_DL_CTRL_LP1_SHIFT (10U)
637 #define ESC_ESC_DL_CTRL_LP1_GET(x) (((uint32_t)(x) & ESC_ESC_DL_CTRL_LP1_MASK) >> ESC_ESC_DL_CTRL_LP1_SHIFT)
638 
639 /*
640  * LP0 (RO)
641  *
642  * Loop Port 0:
643  * 00:Auto
644  * 01:Auto Close
645  * 10:Open
646  * 11:Closed
647  * NOTE:
648  * Loop open means sending/receiving over this port
649  * is enabled, loop closed means sending/receiving
650  * is disabled and frames are forwarded to the next
651  * open port internally.
652  * Auto:loop closed at link down, opened at link up
653  * Auto Close:loop closed at link down, opened with
654  * writing 01 again after link up (or receiving a valid
655  * Ethernet frame at the closed port)
656  * Open:loop open regardless of link state
657  * Closed:loop closed regardless of link state
658  */
659 #define ESC_ESC_DL_CTRL_LP0_MASK (0x300U)
660 #define ESC_ESC_DL_CTRL_LP0_SHIFT (8U)
661 #define ESC_ESC_DL_CTRL_LP0_GET(x) (((uint32_t)(x) & ESC_ESC_DL_CTRL_LP0_MASK) >> ESC_ESC_DL_CTRL_LP0_SHIFT)
662 
663 /*
664  * TU (RO)
665  *
666  * Temporary use of settings in
667  * 0x0100:0x0103[8:15]:
668  * 0:permanent use
669  * 1:use for about 1 second, then revert to
670  * previous settings
671  */
672 #define ESC_ESC_DL_CTRL_TU_MASK (0x2U)
673 #define ESC_ESC_DL_CTRL_TU_SHIFT (1U)
674 #define ESC_ESC_DL_CTRL_TU_GET(x) (((uint32_t)(x) & ESC_ESC_DL_CTRL_TU_MASK) >> ESC_ESC_DL_CTRL_TU_SHIFT)
675 
676 /*
677  * FR (RO)
678  *
679  * Forwarding rule:
680  * 0:Forward non-EtherCAT frames:
681  * EtherCAT frames are processed,
682  * non-EtherCAT frames are forwarded
683  * without processing or modification.
684  * The source MAC address is not
685  * changed for any frame.
686  * 1:Destroy non-EtherCAT frames:
687  * EtherCAT frames are processed, non-EtherCAT frames are destroyed.
688  * The source MAC address is changed by
689  * the Processing Unit for every frame
690  * (SOURCE_MAC[1] is set
691  */
692 #define ESC_ESC_DL_CTRL_FR_MASK (0x1U)
693 #define ESC_ESC_DL_CTRL_FR_SHIFT (0U)
694 #define ESC_ESC_DL_CTRL_FR_GET(x) (((uint32_t)(x) & ESC_ESC_DL_CTRL_FR_MASK) >> ESC_ESC_DL_CTRL_FR_SHIFT)
695 
696 /* Bitfield definition for register: PHYSICAL_RW_OFFSET */
697 /*
698  * OFFSET (RO)
699  *
700  * This register is used for ReadWrite
701  * commands in Device Addressing mode
702  * (FPRW, APRW, BRW).
703  * The internal read address is directly taken
704  * from the offset address field of the EtherCAT
705  * datagram header, while the internal write
706  * address is calculated by adding the Physical
707  * Read/Write Offset value to the offset address
708  * field.
709  * Internal read address = ADR,
710  * internal write address = ADR + R/W-Offset
711  */
712 #define ESC_PHYSICAL_RW_OFFSET_OFFSET_MASK (0xFFFFU)
713 #define ESC_PHYSICAL_RW_OFFSET_OFFSET_SHIFT (0U)
714 #define ESC_PHYSICAL_RW_OFFSET_OFFSET_GET(x) (((uint16_t)(x) & ESC_PHYSICAL_RW_OFFSET_OFFSET_MASK) >> ESC_PHYSICAL_RW_OFFSET_OFFSET_SHIFT)
715 
716 /* Bitfield definition for register: ESC_DL_STAT */
717 /*
718  * CP3 (RO)
719  *
720  * Communication on Port 3:
721  * 0:No stable communication
722  * 1:Communication established
723  */
724 #define ESC_ESC_DL_STAT_CP3_MASK (0x8000U)
725 #define ESC_ESC_DL_STAT_CP3_SHIFT (15U)
726 #define ESC_ESC_DL_STAT_CP3_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_CP3_MASK) >> ESC_ESC_DL_STAT_CP3_SHIFT)
727 
728 /*
729  * LP3 (RO)
730  *
731  * Loop Port 3:
732  * 0:Open
733  * 1:Closed
734  */
735 #define ESC_ESC_DL_STAT_LP3_MASK (0x4000U)
736 #define ESC_ESC_DL_STAT_LP3_SHIFT (14U)
737 #define ESC_ESC_DL_STAT_LP3_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_LP3_MASK) >> ESC_ESC_DL_STAT_LP3_SHIFT)
738 
739 /*
740  * CP2 (RO)
741  *
742  * Communication on Port 2:
743  * 0:No stable communication
744  * 1:Communication established
745  */
746 #define ESC_ESC_DL_STAT_CP2_MASK (0x2000U)
747 #define ESC_ESC_DL_STAT_CP2_SHIFT (13U)
748 #define ESC_ESC_DL_STAT_CP2_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_CP2_MASK) >> ESC_ESC_DL_STAT_CP2_SHIFT)
749 
750 /*
751  * LP2 (RO)
752  *
753  * Loop Port 2:
754  * 0:Open
755  * 1:Closed
756  */
757 #define ESC_ESC_DL_STAT_LP2_MASK (0x1000U)
758 #define ESC_ESC_DL_STAT_LP2_SHIFT (12U)
759 #define ESC_ESC_DL_STAT_LP2_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_LP2_MASK) >> ESC_ESC_DL_STAT_LP2_SHIFT)
760 
761 /*
762  * CP1 (RO)
763  *
764  * Communication on Port 1:
765  * 0:No stable communication
766  * 1:Communication established
767  */
768 #define ESC_ESC_DL_STAT_CP1_MASK (0x800U)
769 #define ESC_ESC_DL_STAT_CP1_SHIFT (11U)
770 #define ESC_ESC_DL_STAT_CP1_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_CP1_MASK) >> ESC_ESC_DL_STAT_CP1_SHIFT)
771 
772 /*
773  * LP1 (RO)
774  *
775  * Loop Port 1:
776  * 0:Open
777  * 1:Closed
778  */
779 #define ESC_ESC_DL_STAT_LP1_MASK (0x400U)
780 #define ESC_ESC_DL_STAT_LP1_SHIFT (10U)
781 #define ESC_ESC_DL_STAT_LP1_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_LP1_MASK) >> ESC_ESC_DL_STAT_LP1_SHIFT)
782 
783 /*
784  * CP0 (RO)
785  *
786  * Communication on Port 0:
787  * 0:No stable communication
788  * 1:Communication established
789  */
790 #define ESC_ESC_DL_STAT_CP0_MASK (0x200U)
791 #define ESC_ESC_DL_STAT_CP0_SHIFT (9U)
792 #define ESC_ESC_DL_STAT_CP0_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_CP0_MASK) >> ESC_ESC_DL_STAT_CP0_SHIFT)
793 
794 /*
795  * LP0 (RO)
796  *
797  * Loop Port 0:
798  * 0:Open
799  * 1:Closed
800  */
801 #define ESC_ESC_DL_STAT_LP0_MASK (0x100U)
802 #define ESC_ESC_DL_STAT_LP0_SHIFT (8U)
803 #define ESC_ESC_DL_STAT_LP0_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_LP0_MASK) >> ESC_ESC_DL_STAT_LP0_SHIFT)
804 
805 /*
806  * PLP3 (RO)
807  *
808  * Physical link on Port 3:
809  * 0:No link
810  * 1:Link detected
811  */
812 #define ESC_ESC_DL_STAT_PLP3_MASK (0x80U)
813 #define ESC_ESC_DL_STAT_PLP3_SHIFT (7U)
814 #define ESC_ESC_DL_STAT_PLP3_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_PLP3_MASK) >> ESC_ESC_DL_STAT_PLP3_SHIFT)
815 
816 /*
817  * PLP2 (RO)
818  *
819  * Physical link on Port 2:
820  * 0:No link
821  * 1:Link detected
822  */
823 #define ESC_ESC_DL_STAT_PLP2_MASK (0x40U)
824 #define ESC_ESC_DL_STAT_PLP2_SHIFT (6U)
825 #define ESC_ESC_DL_STAT_PLP2_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_PLP2_MASK) >> ESC_ESC_DL_STAT_PLP2_SHIFT)
826 
827 /*
828  * PLP1 (RO)
829  *
830  * Physical link on Port 1:
831  * 0:No link
832  * 1:Link detected
833  */
834 #define ESC_ESC_DL_STAT_PLP1_MASK (0x20U)
835 #define ESC_ESC_DL_STAT_PLP1_SHIFT (5U)
836 #define ESC_ESC_DL_STAT_PLP1_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_PLP1_MASK) >> ESC_ESC_DL_STAT_PLP1_SHIFT)
837 
838 /*
839  * PLP0 (RO)
840  *
841  * Physical link on Port 0:
842  * 0:No link
843  * 1:Link detected
844  */
845 #define ESC_ESC_DL_STAT_PLP0_MASK (0x10U)
846 #define ESC_ESC_DL_STAT_PLP0_SHIFT (4U)
847 #define ESC_ESC_DL_STAT_PLP0_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_PLP0_MASK) >> ESC_ESC_DL_STAT_PLP0_SHIFT)
848 
849 /*
850  * ELD (RO)
851  *
852  * Enhanced Link detection:
853  * 0:Deactivated for all ports
854  * 1:Activated for at least one port
855  * NOTE:EEPROM value is only transferred into this
856  * register at first EEPROM load after power-on or
857  * reset
858  */
859 #define ESC_ESC_DL_STAT_ELD_MASK (0x4U)
860 #define ESC_ESC_DL_STAT_ELD_SHIFT (2U)
861 #define ESC_ESC_DL_STAT_ELD_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_ELD_MASK) >> ESC_ESC_DL_STAT_ELD_SHIFT)
862 
863 /*
864  * WDS (RO)
865  *
866  * PDI Watchdog Status:
867  * 0:Watchdog expired
868  * 1:Watchdog reloaded
869  */
870 #define ESC_ESC_DL_STAT_WDS_MASK (0x2U)
871 #define ESC_ESC_DL_STAT_WDS_SHIFT (1U)
872 #define ESC_ESC_DL_STAT_WDS_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_WDS_MASK) >> ESC_ESC_DL_STAT_WDS_SHIFT)
873 
874 /*
875  * EPLC (RO)
876  *
877  * PDI operational/EEPROM loaded correctly:
878  * 0:EEPROM not loaded, PDI not
879  * operational (no access to Process Data
880  * RAM)
881  * 1:EEPROM loaded correctly, PDI
882  * operational (access to Process Data
883  * RAM)
884  */
885 #define ESC_ESC_DL_STAT_EPLC_MASK (0x1U)
886 #define ESC_ESC_DL_STAT_EPLC_SHIFT (0U)
887 #define ESC_ESC_DL_STAT_EPLC_GET(x) (((uint16_t)(x) & ESC_ESC_DL_STAT_EPLC_MASK) >> ESC_ESC_DL_STAT_EPLC_SHIFT)
888 
889 /* Bitfield definition for register: AL_CTRL */
890 /*
891  * DI (RW)
892  *
893  * Device Identification:
894  * 0:No request
895  * 1:Device Identification request
896  */
897 #define ESC_AL_CTRL_DI_MASK (0x20U)
898 #define ESC_AL_CTRL_DI_SHIFT (5U)
899 #define ESC_AL_CTRL_DI_SET(x) (((uint16_t)(x) << ESC_AL_CTRL_DI_SHIFT) & ESC_AL_CTRL_DI_MASK)
900 #define ESC_AL_CTRL_DI_GET(x) (((uint16_t)(x) & ESC_AL_CTRL_DI_MASK) >> ESC_AL_CTRL_DI_SHIFT)
901 
902 /*
903  * EIA (RW)
904  *
905  * Error Ind Ack:
906  * 0:No Ack of Error Ind in AL status register
907  * 1:Ack of Error Ind in AL status register
908  */
909 #define ESC_AL_CTRL_EIA_MASK (0x10U)
910 #define ESC_AL_CTRL_EIA_SHIFT (4U)
911 #define ESC_AL_CTRL_EIA_SET(x) (((uint16_t)(x) << ESC_AL_CTRL_EIA_SHIFT) & ESC_AL_CTRL_EIA_MASK)
912 #define ESC_AL_CTRL_EIA_GET(x) (((uint16_t)(x) & ESC_AL_CTRL_EIA_MASK) >> ESC_AL_CTRL_EIA_SHIFT)
913 
914 /*
915  * IST (RW)
916  *
917  * Initiate State Transition of the Device State
918  * Machine:
919  * 1:Request Init State
920  * 3:Request Bootstrap State
921  * 2:Request Pre-Operational State
922  * 4:Request Safe-Operational State
923  * 8:Request Operational State
924  */
925 #define ESC_AL_CTRL_IST_MASK (0xFU)
926 #define ESC_AL_CTRL_IST_SHIFT (0U)
927 #define ESC_AL_CTRL_IST_SET(x) (((uint16_t)(x) << ESC_AL_CTRL_IST_SHIFT) & ESC_AL_CTRL_IST_MASK)
928 #define ESC_AL_CTRL_IST_GET(x) (((uint16_t)(x) & ESC_AL_CTRL_IST_MASK) >> ESC_AL_CTRL_IST_SHIFT)
929 
930 /* Bitfield definition for register: AL_STAT */
931 /*
932  * DI (RW)
933  *
934  * Device Identification:
935  * 0:Device Identification not valid
936  * 1:Device Identification loaded
937  */
938 #define ESC_AL_STAT_DI_MASK (0x20U)
939 #define ESC_AL_STAT_DI_SHIFT (5U)
940 #define ESC_AL_STAT_DI_SET(x) (((uint16_t)(x) << ESC_AL_STAT_DI_SHIFT) & ESC_AL_STAT_DI_MASK)
941 #define ESC_AL_STAT_DI_GET(x) (((uint16_t)(x) & ESC_AL_STAT_DI_MASK) >> ESC_AL_STAT_DI_SHIFT)
942 
943 /*
944  * EI (RW)
945  *
946  * Error Ind:
947  * 0:Device is in State as requested or Flag
948  * cleared by command
949  * 1:Device has not entered requested State
950  * or changed State as result of a local
951  * action
952  */
953 #define ESC_AL_STAT_EI_MASK (0x10U)
954 #define ESC_AL_STAT_EI_SHIFT (4U)
955 #define ESC_AL_STAT_EI_SET(x) (((uint16_t)(x) << ESC_AL_STAT_EI_SHIFT) & ESC_AL_STAT_EI_MASK)
956 #define ESC_AL_STAT_EI_GET(x) (((uint16_t)(x) & ESC_AL_STAT_EI_MASK) >> ESC_AL_STAT_EI_SHIFT)
957 
958 /*
959  * AS (RW)
960  *
961  * Actual State of the Device State Machine:
962  * 1:Init State
963  * 3:Bootstrap State
964  * 2:Pre-Operational State
965  * 4:Safe-Operational State
966  * 8:Operational State
967  */
968 #define ESC_AL_STAT_AS_MASK (0xFU)
969 #define ESC_AL_STAT_AS_SHIFT (0U)
970 #define ESC_AL_STAT_AS_SET(x) (((uint16_t)(x) << ESC_AL_STAT_AS_SHIFT) & ESC_AL_STAT_AS_MASK)
971 #define ESC_AL_STAT_AS_GET(x) (((uint16_t)(x) & ESC_AL_STAT_AS_MASK) >> ESC_AL_STAT_AS_SHIFT)
972 
973 /* Bitfield definition for register: AL_STAT_CODE */
974 /*
975  * CODE (RW)
976  *
977  * AL Status Code
978  */
979 #define ESC_AL_STAT_CODE_CODE_MASK (0xFFFFU)
980 #define ESC_AL_STAT_CODE_CODE_SHIFT (0U)
981 #define ESC_AL_STAT_CODE_CODE_SET(x) (((uint16_t)(x) << ESC_AL_STAT_CODE_CODE_SHIFT) & ESC_AL_STAT_CODE_CODE_MASK)
982 #define ESC_AL_STAT_CODE_CODE_GET(x) (((uint16_t)(x) & ESC_AL_STAT_CODE_CODE_MASK) >> ESC_AL_STAT_CODE_CODE_SHIFT)
983 
984 /* Bitfield definition for register: RUN_LED_OVRD */
985 /*
986  * EN_OVRD (RW)
987  *
988  * Enable Override:
989  * 0:Override disabled
990  * 1:Override enabled
991  */
992 #define ESC_RUN_LED_OVRD_EN_OVRD_MASK (0x10U)
993 #define ESC_RUN_LED_OVRD_EN_OVRD_SHIFT (4U)
994 #define ESC_RUN_LED_OVRD_EN_OVRD_SET(x) (((uint8_t)(x) << ESC_RUN_LED_OVRD_EN_OVRD_SHIFT) & ESC_RUN_LED_OVRD_EN_OVRD_MASK)
995 #define ESC_RUN_LED_OVRD_EN_OVRD_GET(x) (((uint8_t)(x) & ESC_RUN_LED_OVRD_EN_OVRD_MASK) >> ESC_RUN_LED_OVRD_EN_OVRD_SHIFT)
996 
997 /*
998  * LED_CODE (RW)
999  *
1000  * LED code:
1001  * 0x0:Off
1002  * 0x1:Flash 1x
1003  * 0x2-0xC:Flash 2x – 12x
1004  * 0xD:Blinking
1005  * 0xE:Flickering
1006  * 0xF:On
1007  */
1008 #define ESC_RUN_LED_OVRD_LED_CODE_MASK (0xFU)
1009 #define ESC_RUN_LED_OVRD_LED_CODE_SHIFT (0U)
1010 #define ESC_RUN_LED_OVRD_LED_CODE_SET(x) (((uint8_t)(x) << ESC_RUN_LED_OVRD_LED_CODE_SHIFT) & ESC_RUN_LED_OVRD_LED_CODE_MASK)
1011 #define ESC_RUN_LED_OVRD_LED_CODE_GET(x) (((uint8_t)(x) & ESC_RUN_LED_OVRD_LED_CODE_MASK) >> ESC_RUN_LED_OVRD_LED_CODE_SHIFT)
1012 
1013 /* Bitfield definition for register: ERR_LED_OVRD */
1014 /*
1015  * EN_OVRD (RW)
1016  *
1017  * Enable Override:
1018  * 0:Override disabled
1019  * 1:Override enabled
1020  */
1021 #define ESC_ERR_LED_OVRD_EN_OVRD_MASK (0x10U)
1022 #define ESC_ERR_LED_OVRD_EN_OVRD_SHIFT (4U)
1023 #define ESC_ERR_LED_OVRD_EN_OVRD_SET(x) (((uint8_t)(x) << ESC_ERR_LED_OVRD_EN_OVRD_SHIFT) & ESC_ERR_LED_OVRD_EN_OVRD_MASK)
1024 #define ESC_ERR_LED_OVRD_EN_OVRD_GET(x) (((uint8_t)(x) & ESC_ERR_LED_OVRD_EN_OVRD_MASK) >> ESC_ERR_LED_OVRD_EN_OVRD_SHIFT)
1025 
1026 /*
1027  * LED_CODE (RW)
1028  *
1029  * LED code:
1030  * 0x0:Off
1031  * 0x1-0xC:Flash 1x – 12x
1032  * 0xD:Blinking
1033  * 0xE:Flickering
1034  * 0xF:On
1035  */
1036 #define ESC_ERR_LED_OVRD_LED_CODE_MASK (0xFU)
1037 #define ESC_ERR_LED_OVRD_LED_CODE_SHIFT (0U)
1038 #define ESC_ERR_LED_OVRD_LED_CODE_SET(x) (((uint8_t)(x) << ESC_ERR_LED_OVRD_LED_CODE_SHIFT) & ESC_ERR_LED_OVRD_LED_CODE_MASK)
1039 #define ESC_ERR_LED_OVRD_LED_CODE_GET(x) (((uint8_t)(x) & ESC_ERR_LED_OVRD_LED_CODE_MASK) >> ESC_ERR_LED_OVRD_LED_CODE_SHIFT)
1040 
1041 /* Bitfield definition for register: PDI_CTRL */
1042 /*
1043  * PDI (RO)
1044  *
1045  * Process data interface:
1046  * 0x00:Interface deactivated (no PDI)
1047  * 0x01:4 Digital Input
1048  * 0x02:4 Digital Output
1049  * 0x03:2 Digital Input and 2 Digital Output
1050  * 0x04:Digital I/O
1051  * 0x05:SPI Slave
1052  * 0x06:Oversampling I/O
1053  * 0x07:EtherCAT Bridge (port 3)
1054  * 0x08:16 Bit asynchronous Microcontroller
1055  * interface
1056  * 0x09:8 Bit asynchronous Microcontroller
1057  * interface
1058  * 0x0A:16 Bit synchronous Microcontroller
1059  * interface
1060  * 0x0B:8 Bit synchronous Microcontroller
1061  * interface
1062  * 0x10:32 Digital Input and 0 Digital Output
1063  * 0x11:24 Digital Input and 8 Digital Output
1064  * 0x12:16 Digital Input and 16 Digital Output
1065  * 0x13:8 Digital Input and 24 Digital Output
1066  * 0x14:0 Digital Input and 32 Digital Output
1067  * 0x80:On-chip bus
1068  * Others:Reserved
1069  */
1070 #define ESC_PDI_CTRL_PDI_MASK (0xFFU)
1071 #define ESC_PDI_CTRL_PDI_SHIFT (0U)
1072 #define ESC_PDI_CTRL_PDI_GET(x) (((uint8_t)(x) & ESC_PDI_CTRL_PDI_MASK) >> ESC_PDI_CTRL_PDI_SHIFT)
1073 
1074 /* Bitfield definition for register: ESC_CFG */
1075 /*
1076  * ELP3 (RO)
1077  *
1078  * Enhanced Link port 3:
1079  * 0:disabled (if bit 1=0)
1080  * 1:enabled
1081  */
1082 #define ESC_ESC_CFG_ELP3_MASK (0x80U)
1083 #define ESC_ESC_CFG_ELP3_SHIFT (7U)
1084 #define ESC_ESC_CFG_ELP3_GET(x) (((uint8_t)(x) & ESC_ESC_CFG_ELP3_MASK) >> ESC_ESC_CFG_ELP3_SHIFT)
1085 
1086 /*
1087  * ELP2 (RO)
1088  *
1089  * Enhanced Link port 2:
1090  * 0:disabled (if bit 1=0)
1091  * 1:enabled
1092  */
1093 #define ESC_ESC_CFG_ELP2_MASK (0x40U)
1094 #define ESC_ESC_CFG_ELP2_SHIFT (6U)
1095 #define ESC_ESC_CFG_ELP2_GET(x) (((uint8_t)(x) & ESC_ESC_CFG_ELP2_MASK) >> ESC_ESC_CFG_ELP2_SHIFT)
1096 
1097 /*
1098  * ELP1 (RO)
1099  *
1100  * Enhanced Link port 1:
1101  * 0:disabled (if bit 1=0)
1102  * 1:enabled
1103  */
1104 #define ESC_ESC_CFG_ELP1_MASK (0x20U)
1105 #define ESC_ESC_CFG_ELP1_SHIFT (5U)
1106 #define ESC_ESC_CFG_ELP1_GET(x) (((uint8_t)(x) & ESC_ESC_CFG_ELP1_MASK) >> ESC_ESC_CFG_ELP1_SHIFT)
1107 
1108 /*
1109  * ELP0 (RO)
1110  *
1111  * Enhanced Link port 0:
1112  * 0:disabled (if bit 1=0)
1113  * 1:enabled
1114  */
1115 #define ESC_ESC_CFG_ELP0_MASK (0x10U)
1116 #define ESC_ESC_CFG_ELP0_SHIFT (4U)
1117 #define ESC_ESC_CFG_ELP0_GET(x) (((uint8_t)(x) & ESC_ESC_CFG_ELP0_MASK) >> ESC_ESC_CFG_ELP0_SHIFT)
1118 
1119 /*
1120  * CDLIU (RO)
1121  *
1122  * Distributed Clocks Latch In Unit:
1123  * 0:disabled (power saving)
1124  * 1:enabled
1125  */
1126 #define ESC_ESC_CFG_CDLIU_MASK (0x8U)
1127 #define ESC_ESC_CFG_CDLIU_SHIFT (3U)
1128 #define ESC_ESC_CFG_CDLIU_GET(x) (((uint8_t)(x) & ESC_ESC_CFG_CDLIU_MASK) >> ESC_ESC_CFG_CDLIU_SHIFT)
1129 
1130 /*
1131  * DCSOU (RO)
1132  *
1133  * Distributed Clocks SYNC Out Unit:
1134  * 0:disabled (power saving)
1135  * 1:enabled
1136  */
1137 #define ESC_ESC_CFG_DCSOU_MASK (0x4U)
1138 #define ESC_ESC_CFG_DCSOU_SHIFT (2U)
1139 #define ESC_ESC_CFG_DCSOU_GET(x) (((uint8_t)(x) & ESC_ESC_CFG_DCSOU_MASK) >> ESC_ESC_CFG_DCSOU_SHIFT)
1140 
1141 /*
1142  * ELDAP (RO)
1143  *
1144  * Enhanced Link detection all ports:
1145  * 0:disabled (if bits [7:4]=0)
1146  * 1:enabled at all ports (overrides bits [7:4])
1147  */
1148 #define ESC_ESC_CFG_ELDAP_MASK (0x2U)
1149 #define ESC_ESC_CFG_ELDAP_SHIFT (1U)
1150 #define ESC_ESC_CFG_ELDAP_GET(x) (((uint8_t)(x) & ESC_ESC_CFG_ELDAP_MASK) >> ESC_ESC_CFG_ELDAP_SHIFT)
1151 
1152 /*
1153  * DEV_EMU (RO)
1154  *
1155  * Device emulation (control of AL status):
1156  * 0:AL status register has to be set by PDI
1157  * 1:AL status register will be set to value
1158  * written to AL control register
1159  */
1160 #define ESC_ESC_CFG_DEV_EMU_MASK (0x1U)
1161 #define ESC_ESC_CFG_DEV_EMU_SHIFT (0U)
1162 #define ESC_ESC_CFG_DEV_EMU_GET(x) (((uint8_t)(x) & ESC_ESC_CFG_DEV_EMU_MASK) >> ESC_ESC_CFG_DEV_EMU_SHIFT)
1163 
1164 /* Bitfield definition for register: PDI_INFO */
1165 /*
1166  * PDICN (RO)
1167  *
1168  * PDI configuration invalid:
1169  * 0:PDI configuration ok
1170  * 1:PDI configuration invalid
1171  */
1172 #define ESC_PDI_INFO_PDICN_MASK (0x8U)
1173 #define ESC_PDI_INFO_PDICN_SHIFT (3U)
1174 #define ESC_PDI_INFO_PDICN_GET(x) (((uint16_t)(x) & ESC_PDI_INFO_PDICN_MASK) >> ESC_PDI_INFO_PDICN_SHIFT)
1175 
1176 /*
1177  * PDIA (RO)
1178  *
1179  * PDI active:
1180  * 0:PDI not active
1181  * 1:PDI active
1182  */
1183 #define ESC_PDI_INFO_PDIA_MASK (0x4U)
1184 #define ESC_PDI_INFO_PDIA_SHIFT (2U)
1185 #define ESC_PDI_INFO_PDIA_GET(x) (((uint16_t)(x) & ESC_PDI_INFO_PDIA_MASK) >> ESC_PDI_INFO_PDIA_SHIFT)
1186 
1187 /*
1188  * ECLFE (RO)
1189  *
1190  * ESC configuration area loaded from
1191  * EEPROM:
1192  * 0:not loaded
1193  * 1:loaded
1194  */
1195 #define ESC_PDI_INFO_ECLFE_MASK (0x2U)
1196 #define ESC_PDI_INFO_ECLFE_SHIFT (1U)
1197 #define ESC_PDI_INFO_ECLFE_GET(x) (((uint16_t)(x) & ESC_PDI_INFO_ECLFE_MASK) >> ESC_PDI_INFO_ECLFE_SHIFT)
1198 
1199 /*
1200  * PFABW (RO)
1201  *
1202  * DI function acknowledge by write:
1203  * 0:Disabled
1204  * 1:Enabled
1205  */
1206 #define ESC_PDI_INFO_PFABW_MASK (0x1U)
1207 #define ESC_PDI_INFO_PFABW_SHIFT (0U)
1208 #define ESC_PDI_INFO_PFABW_GET(x) (((uint16_t)(x) & ESC_PDI_INFO_PFABW_MASK) >> ESC_PDI_INFO_PFABW_SHIFT)
1209 
1210 /* Bitfield definition for register: PDI_CFG */
1211 /*
1212  * BUS (RO)
1213  *
1214  * On-chip bus:
1215  * 000:Intel® Avalon®
1216  * 001:AXI®
1217  * 010:Xilinx® PLB v4.6
1218  * 100:Xilinx OPB
1219  * others:reserved
1220  */
1221 #define ESC_PDI_CFG_BUS_MASK (0xE0U)
1222 #define ESC_PDI_CFG_BUS_SHIFT (5U)
1223 #define ESC_PDI_CFG_BUS_GET(x) (((uint8_t)(x) & ESC_PDI_CFG_BUS_MASK) >> ESC_PDI_CFG_BUS_SHIFT)
1224 
1225 /*
1226  * CLK (RO)
1227  *
1228  * On-chip bus clock:
1229  * 0:asynchronous
1230  * 1-31:synchronous multiplication factor
1231  * (N * 25 MHz)
1232  */
1233 #define ESC_PDI_CFG_CLK_MASK (0x1FU)
1234 #define ESC_PDI_CFG_CLK_SHIFT (0U)
1235 #define ESC_PDI_CFG_CLK_GET(x) (((uint8_t)(x) & ESC_PDI_CFG_CLK_MASK) >> ESC_PDI_CFG_CLK_SHIFT)
1236 
1237 /* Bitfield definition for register: PDI_SL_CFG */
1238 /*
1239  * SYNC1_MAER (RO)
1240  *
1241  * SYNC1 mapped to AL Event Request
1242  * register 0x0220[3]:
1243  * 0:Disabled
1244  * 1:Enabled
1245  */
1246 #define ESC_PDI_SL_CFG_SYNC1_MAER_MASK (0x80U)
1247 #define ESC_PDI_SL_CFG_SYNC1_MAER_SHIFT (7U)
1248 #define ESC_PDI_SL_CFG_SYNC1_MAER_GET(x) (((uint8_t)(x) & ESC_PDI_SL_CFG_SYNC1_MAER_MASK) >> ESC_PDI_SL_CFG_SYNC1_MAER_SHIFT)
1249 
1250 /*
1251  * SYNC1_CFG (RO)
1252  *
1253  * SYNC1/LATCH1 configuration*:
1254  * 0:LATCH1 input
1255  * 1:SYNC1 output
1256  */
1257 #define ESC_PDI_SL_CFG_SYNC1_CFG_MASK (0x40U)
1258 #define ESC_PDI_SL_CFG_SYNC1_CFG_SHIFT (6U)
1259 #define ESC_PDI_SL_CFG_SYNC1_CFG_GET(x) (((uint8_t)(x) & ESC_PDI_SL_CFG_SYNC1_CFG_MASK) >> ESC_PDI_SL_CFG_SYNC1_CFG_SHIFT)
1260 
1261 /*
1262  * SYNC1_ODP (RO)
1263  *
1264  * SYNC1 output driver/polarity:
1265  * 00:Push-Pull active low
1266  * 01:Open Drain (active low)
1267  * 10:Push-Pull active high
1268  * 11:Open Source (active high)
1269  */
1270 #define ESC_PDI_SL_CFG_SYNC1_ODP_MASK (0x30U)
1271 #define ESC_PDI_SL_CFG_SYNC1_ODP_SHIFT (4U)
1272 #define ESC_PDI_SL_CFG_SYNC1_ODP_GET(x) (((uint8_t)(x) & ESC_PDI_SL_CFG_SYNC1_ODP_MASK) >> ESC_PDI_SL_CFG_SYNC1_ODP_SHIFT)
1273 
1274 /*
1275  * SYNC0_MAER (RO)
1276  *
1277  * SYNC0 mapped to AL Event Request
1278  * register 0x0220[2]:
1279  * 0:Disabled
1280  * 1:Enabled
1281  */
1282 #define ESC_PDI_SL_CFG_SYNC0_MAER_MASK (0x8U)
1283 #define ESC_PDI_SL_CFG_SYNC0_MAER_SHIFT (3U)
1284 #define ESC_PDI_SL_CFG_SYNC0_MAER_GET(x) (((uint8_t)(x) & ESC_PDI_SL_CFG_SYNC0_MAER_MASK) >> ESC_PDI_SL_CFG_SYNC0_MAER_SHIFT)
1285 
1286 /*
1287  * SYNC0_CFG (RO)
1288  *
1289  * SYNC0/LATCH0 configuration*:
1290  * 0:LATCH0 Input
1291  * 1:SYNC0 Output
1292  */
1293 #define ESC_PDI_SL_CFG_SYNC0_CFG_MASK (0x4U)
1294 #define ESC_PDI_SL_CFG_SYNC0_CFG_SHIFT (2U)
1295 #define ESC_PDI_SL_CFG_SYNC0_CFG_GET(x) (((uint8_t)(x) & ESC_PDI_SL_CFG_SYNC0_CFG_MASK) >> ESC_PDI_SL_CFG_SYNC0_CFG_SHIFT)
1296 
1297 /*
1298  * SYNC0_ODP (RO)
1299  *
1300  * SYNC0 output driver/polarity:
1301  * 00:Push-Pull active low
1302  * 01:Open Drain (active low)
1303  * 10:Push-Pull active high
1304  * 11:Open Source (active high)
1305  */
1306 #define ESC_PDI_SL_CFG_SYNC0_ODP_MASK (0x3U)
1307 #define ESC_PDI_SL_CFG_SYNC0_ODP_SHIFT (0U)
1308 #define ESC_PDI_SL_CFG_SYNC0_ODP_GET(x) (((uint8_t)(x) & ESC_PDI_SL_CFG_SYNC0_ODP_MASK) >> ESC_PDI_SL_CFG_SYNC0_ODP_SHIFT)
1309 
1310 /* Bitfield definition for register: PDI_EXT_CFG */
1311 /*
1312  * OCBST (RW)
1313  *
1314  * On-chip bus sub-type for AXI:
1315  * 000:AXI3
1316  * 001:AXI4
1317  * 010:AXI4 LITE
1318  * others:reserved
1319  */
1320 #define ESC_PDI_EXT_CFG_OCBST_MASK (0x700U)
1321 #define ESC_PDI_EXT_CFG_OCBST_SHIFT (8U)
1322 #define ESC_PDI_EXT_CFG_OCBST_SET(x) (((uint16_t)(x) << ESC_PDI_EXT_CFG_OCBST_SHIFT) & ESC_PDI_EXT_CFG_OCBST_MASK)
1323 #define ESC_PDI_EXT_CFG_OCBST_GET(x) (((uint16_t)(x) & ESC_PDI_EXT_CFG_OCBST_MASK) >> ESC_PDI_EXT_CFG_OCBST_SHIFT)
1324 
1325 /*
1326  * RPS (RO)
1327  *
1328  * Read prefetch size (in cycles of PDI width):
1329  * 0:4 cycles
1330  * 1:1 cycle (typical)
1331  * 2:2 cycles
1332  * 3:Reserved
1333  */
1334 #define ESC_PDI_EXT_CFG_RPS_MASK (0x3U)
1335 #define ESC_PDI_EXT_CFG_RPS_SHIFT (0U)
1336 #define ESC_PDI_EXT_CFG_RPS_GET(x) (((uint16_t)(x) & ESC_PDI_EXT_CFG_RPS_MASK) >> ESC_PDI_EXT_CFG_RPS_SHIFT)
1337 
1338 /* Bitfield definition for register: ECAT_EVT_MSK */
1339 /*
1340  * MASK (RO)
1341  *
1342  * ECAT Event masking of the ECAT Event
1343  * Request Events for mapping into ECAT event
1344  * field of EtherCAT frames:
1345  * 0:Corresponding ECAT Event Request
1346  * register bit is not mapped
1347  * 1:Corresponding ECAT Event Request
1348  * register bit is mapped
1349  */
1350 #define ESC_ECAT_EVT_MSK_MASK_MASK (0xFFFFU)
1351 #define ESC_ECAT_EVT_MSK_MASK_SHIFT (0U)
1352 #define ESC_ECAT_EVT_MSK_MASK_GET(x) (((uint16_t)(x) & ESC_ECAT_EVT_MSK_MASK_MASK) >> ESC_ECAT_EVT_MSK_MASK_SHIFT)
1353 
1354 /* Bitfield definition for register: PDI_AL_EVT_MSK */
1355 /*
1356  * MASK (RW)
1357  *
1358  * AL Event masking of the AL Event Request
1359  * register Events for mapping to PDI IRQ
1360  * signal:
1361  * 0:Corresponding AL Event Request
1362  * register bit is not mapped
1363  * 1:Corresponding AL Event Request
1364  * register bit is mapped
1365  */
1366 #define ESC_PDI_AL_EVT_MSK_MASK_MASK (0xFFFFFFFFUL)
1367 #define ESC_PDI_AL_EVT_MSK_MASK_SHIFT (0U)
1368 #define ESC_PDI_AL_EVT_MSK_MASK_SET(x) (((uint32_t)(x) << ESC_PDI_AL_EVT_MSK_MASK_SHIFT) & ESC_PDI_AL_EVT_MSK_MASK_MASK)
1369 #define ESC_PDI_AL_EVT_MSK_MASK_GET(x) (((uint32_t)(x) & ESC_PDI_AL_EVT_MSK_MASK_MASK) >> ESC_PDI_AL_EVT_MSK_MASK_SHIFT)
1370 
1371 /* Bitfield definition for register: ECAT_EVT_REQ */
1372 /*
1373  * MV (RO)
1374  *
1375  * Mirrors values of each SyncManager Status:
1376  * 0:No Sync Channel 0 event
1377  * 1:Sync Channel 0 event pending
1378  * 0:No Sync Channel 1 event
1379  * 1:Sync Channel 1 event pending
1380  * …
1381  * 0:No Sync Channel 7 event
1382  * 1:Sync Channel 7 event pending
1383  */
1384 #define ESC_ECAT_EVT_REQ_MV_MASK (0xFF0U)
1385 #define ESC_ECAT_EVT_REQ_MV_SHIFT (4U)
1386 #define ESC_ECAT_EVT_REQ_MV_GET(x) (((uint16_t)(x) & ESC_ECAT_EVT_REQ_MV_MASK) >> ESC_ECAT_EVT_REQ_MV_SHIFT)
1387 
1388 /*
1389  * ALS_EVT (RO)
1390  *
1391  * AL Status event:
1392  * 0:No change in AL Status
1393  * 1:AL Status change
1394  * (Bit is cleared by reading out AL Status
1395  * 0x0130:0x0131 from ECAT)
1396  */
1397 #define ESC_ECAT_EVT_REQ_ALS_EVT_MASK (0x8U)
1398 #define ESC_ECAT_EVT_REQ_ALS_EVT_SHIFT (3U)
1399 #define ESC_ECAT_EVT_REQ_ALS_EVT_GET(x) (((uint16_t)(x) & ESC_ECAT_EVT_REQ_ALS_EVT_MASK) >> ESC_ECAT_EVT_REQ_ALS_EVT_SHIFT)
1400 
1401 /*
1402  * DLS_EVT (RO)
1403  *
1404  * DL Status event:
1405  * 0:No change in DL Status
1406  * 1:DL Status change
1407  * (Bit is cleared by reading out DL Status
1408  * 0x0110:0x0111 from ECAT)
1409  */
1410 #define ESC_ECAT_EVT_REQ_DLS_EVT_MASK (0x4U)
1411 #define ESC_ECAT_EVT_REQ_DLS_EVT_SHIFT (2U)
1412 #define ESC_ECAT_EVT_REQ_DLS_EVT_GET(x) (((uint16_t)(x) & ESC_ECAT_EVT_REQ_DLS_EVT_MASK) >> ESC_ECAT_EVT_REQ_DLS_EVT_SHIFT)
1413 
1414 /*
1415  * DCL_EVT (RO)
1416  *
1417  * DC Latch event:
1418  * 0:No change on DC Latch Inputs
1419  * 1:At least one change on DC Latch Inputs
1420  * (Bit is cleared by reading DC Latch event
1421  * times from ECAT for ECAT-controlled Latch
1422  * Units, so that Latch 0/1 Status
1423  * 0x09AE:0x09AF indicates no event)
1424  */
1425 #define ESC_ECAT_EVT_REQ_DCL_EVT_MASK (0x1U)
1426 #define ESC_ECAT_EVT_REQ_DCL_EVT_SHIFT (0U)
1427 #define ESC_ECAT_EVT_REQ_DCL_EVT_GET(x) (((uint16_t)(x) & ESC_ECAT_EVT_REQ_DCL_EVT_MASK) >> ESC_ECAT_EVT_REQ_DCL_EVT_SHIFT)
1428 
1429 /* Bitfield definition for register: AL_EVT_REQ */
1430 /*
1431  * SM_INT (RO)
1432  *
1433  * SyncManager interrupts (SyncManager
1434  * register offset 0x5, bit [0] or [1]):
1435  * 0:No SyncManager 0 interrupt
1436  * 1:SyncManager 0 interrupt pending
1437  * 0:No SyncManager 1 interrupt
1438  * 1:SyncManager 1 interrupt pending
1439  * …
1440  * 0:No SyncManager 15 interrupt
1441  * 1:SyncManager 15 interrupt pending
1442  */
1443 #define ESC_AL_EVT_REQ_SM_INT_MASK (0xFFFF00UL)
1444 #define ESC_AL_EVT_REQ_SM_INT_SHIFT (8U)
1445 #define ESC_AL_EVT_REQ_SM_INT_GET(x) (((uint32_t)(x) & ESC_AL_EVT_REQ_SM_INT_MASK) >> ESC_AL_EVT_REQ_SM_INT_SHIFT)
1446 
1447 /*
1448  * WDG_PD (RO)
1449  *
1450  * Watchdog Process Data:
1451  * 0:Has not expired
1452  * 1:Has expired
1453  * (Bit is cleared by reading Watchdog Status
1454  * Process Data 0x0440 from PDI)
1455  */
1456 #define ESC_AL_EVT_REQ_WDG_PD_MASK (0x40U)
1457 #define ESC_AL_EVT_REQ_WDG_PD_SHIFT (6U)
1458 #define ESC_AL_EVT_REQ_WDG_PD_GET(x) (((uint32_t)(x) & ESC_AL_EVT_REQ_WDG_PD_MASK) >> ESC_AL_EVT_REQ_WDG_PD_SHIFT)
1459 
1460 /*
1461  * EE_EMU (RO)
1462  *
1463  * EEPROM Emulation:
1464  * 0:No command pending
1465  * 1:EEPROM command pending
1466  * (Bit is cleared by acknowledging the
1467  * command in EEPROM Control/Status
1468  * register 0x0502:0x0503[10:8] from PDI)
1469  */
1470 #define ESC_AL_EVT_REQ_EE_EMU_MASK (0x20U)
1471 #define ESC_AL_EVT_REQ_EE_EMU_SHIFT (5U)
1472 #define ESC_AL_EVT_REQ_EE_EMU_GET(x) (((uint32_t)(x) & ESC_AL_EVT_REQ_EE_EMU_MASK) >> ESC_AL_EVT_REQ_EE_EMU_SHIFT)
1473 
1474 /*
1475  * SM_ACT (RO)
1476  *
1477  * SyncManager activation register
1478  * (SyncManager register offset 0x6) changed:
1479  * 0:No change in any SyncManager
1480  * 1:At least one SyncManager changed
1481  * (Bit is cleared by reading SyncManager
1482  * Activation registers 0x0806 etc. from PDI)
1483  */
1484 #define ESC_AL_EVT_REQ_SM_ACT_MASK (0x10U)
1485 #define ESC_AL_EVT_REQ_SM_ACT_SHIFT (4U)
1486 #define ESC_AL_EVT_REQ_SM_ACT_GET(x) (((uint32_t)(x) & ESC_AL_EVT_REQ_SM_ACT_MASK) >> ESC_AL_EVT_REQ_SM_ACT_SHIFT)
1487 
1488 /*
1489  * ST_DC_SYNC1 (RO)
1490  *
1491  * State of DC SYNC1 (if register
1492  * 0x0151[7]=1):
1493  * (Bit is cleared by reading of SYNC1 status
1494  * 0x098F from PDI, use only in Acknowledge
1495  * mode)
1496  */
1497 #define ESC_AL_EVT_REQ_ST_DC_SYNC1_MASK (0x8U)
1498 #define ESC_AL_EVT_REQ_ST_DC_SYNC1_SHIFT (3U)
1499 #define ESC_AL_EVT_REQ_ST_DC_SYNC1_GET(x) (((uint32_t)(x) & ESC_AL_EVT_REQ_ST_DC_SYNC1_MASK) >> ESC_AL_EVT_REQ_ST_DC_SYNC1_SHIFT)
1500 
1501 /*
1502  * ST_DC_SYNC0 (RO)
1503  *
1504  * State of DC SYNC0 (if register
1505  * 0x0151[3]=1):
1506  * (Bit is cleared by reading SYNC0 status
1507  * 0x098E from PDI, use only in Acknowledge
1508  * mode)
1509  */
1510 #define ESC_AL_EVT_REQ_ST_DC_SYNC0_MASK (0x4U)
1511 #define ESC_AL_EVT_REQ_ST_DC_SYNC0_SHIFT (2U)
1512 #define ESC_AL_EVT_REQ_ST_DC_SYNC0_GET(x) (((uint32_t)(x) & ESC_AL_EVT_REQ_ST_DC_SYNC0_MASK) >> ESC_AL_EVT_REQ_ST_DC_SYNC0_SHIFT)
1513 
1514 /*
1515  * DCL_EVT (RO)
1516  *
1517  * DC Latch event:
1518  * 0:No change on DC Latch Inputs
1519  * 1:At least one change on DC Latch Inputs
1520  * (Bit is cleared by reading DC Latch event
1521  * times from PDI, so that Latch 0/1 Status
1522  * 0x09AE:0x09AF indicates no event. Available
1523  * if Latch Unit is PDI-controlled)
1524  */
1525 #define ESC_AL_EVT_REQ_DCL_EVT_MASK (0x2U)
1526 #define ESC_AL_EVT_REQ_DCL_EVT_SHIFT (1U)
1527 #define ESC_AL_EVT_REQ_DCL_EVT_GET(x) (((uint32_t)(x) & ESC_AL_EVT_REQ_DCL_EVT_MASK) >> ESC_AL_EVT_REQ_DCL_EVT_SHIFT)
1528 
1529 /*
1530  * ALC_EVT (RO)
1531  *
1532  * AL Control event:
1533  * 0:No AL Control Register change
1534  * 1:AL Control Register has been written3
1535  * (Bit is cleared by reading AL Control register
1536  * 0x0120:0x0121 from PDI)
1537  */
1538 #define ESC_AL_EVT_REQ_ALC_EVT_MASK (0x1U)
1539 #define ESC_AL_EVT_REQ_ALC_EVT_SHIFT (0U)
1540 #define ESC_AL_EVT_REQ_ALC_EVT_GET(x) (((uint32_t)(x) & ESC_AL_EVT_REQ_ALC_EVT_MASK) >> ESC_AL_EVT_REQ_ALC_EVT_SHIFT)
1541 
1542 /* Bitfield definition for register array: RX_ERR_CNT */
1543 /*
1544  * RX_ERR (RO)
1545  *
1546  * RX Error counter of Port y (counting is
1547  * stopped when 0xFF is reached).
1548  */
1549 #define ESC_RX_ERR_CNT_RX_ERR_MASK (0xFF00U)
1550 #define ESC_RX_ERR_CNT_RX_ERR_SHIFT (8U)
1551 #define ESC_RX_ERR_CNT_RX_ERR_GET(x) (((uint16_t)(x) & ESC_RX_ERR_CNT_RX_ERR_MASK) >> ESC_RX_ERR_CNT_RX_ERR_SHIFT)
1552 
1553 /*
1554  * IVD_FRM (RO)
1555  *
1556  * Invalid frame counter of Port y (counting is
1557  * stopped when 0xFF is reached).
1558  */
1559 #define ESC_RX_ERR_CNT_IVD_FRM_MASK (0xFFU)
1560 #define ESC_RX_ERR_CNT_IVD_FRM_SHIFT (0U)
1561 #define ESC_RX_ERR_CNT_IVD_FRM_GET(x) (((uint16_t)(x) & ESC_RX_ERR_CNT_IVD_FRM_MASK) >> ESC_RX_ERR_CNT_IVD_FRM_SHIFT)
1562 
1563 /* Bitfield definition for register array: FWD_RX_ERR_CNT */
1564 /*
1565  * ERR_CNT (RO)
1566  *
1567  * Forwarded error counter of Port y (counting is
1568  * stopped when 0xFF is reached).
1569  */
1570 #define ESC_FWD_RX_ERR_CNT_ERR_CNT_MASK (0xFFU)
1571 #define ESC_FWD_RX_ERR_CNT_ERR_CNT_SHIFT (0U)
1572 #define ESC_FWD_RX_ERR_CNT_ERR_CNT_GET(x) (((uint8_t)(x) & ESC_FWD_RX_ERR_CNT_ERR_CNT_MASK) >> ESC_FWD_RX_ERR_CNT_ERR_CNT_SHIFT)
1573 
1574 /* Bitfield definition for register: ECAT_PU_ERR_CNT */
1575 /*
1576  * CNT (RO)
1577  *
1578  * ECAT Processing Unit error counter
1579  * (counting is stopped when 0xFF is reached).
1580  * Counts errors of frames passing the
1581  * Processing Unit.
1582  */
1583 #define ESC_ECAT_PU_ERR_CNT_CNT_MASK (0xFFU)
1584 #define ESC_ECAT_PU_ERR_CNT_CNT_SHIFT (0U)
1585 #define ESC_ECAT_PU_ERR_CNT_CNT_GET(x) (((uint8_t)(x) & ESC_ECAT_PU_ERR_CNT_CNT_MASK) >> ESC_ECAT_PU_ERR_CNT_CNT_SHIFT)
1586 
1587 /* Bitfield definition for register: PDI_ERR_CNT */
1588 /*
1589  * CNT (RO)
1590  *
1591  * PDI Error counter (counting is stopped when
1592  * 0xFF is reached). Counts if a PDI access has
1593  * an interface error.
1594  */
1595 #define ESC_PDI_ERR_CNT_CNT_MASK (0xFFU)
1596 #define ESC_PDI_ERR_CNT_CNT_SHIFT (0U)
1597 #define ESC_PDI_ERR_CNT_CNT_GET(x) (((uint8_t)(x) & ESC_PDI_ERR_CNT_CNT_MASK) >> ESC_PDI_ERR_CNT_CNT_SHIFT)
1598 
1599 /* Bitfield definition for register array: LOST_LINK_CNT */
1600 /*
1601  * CNT (RO)
1602  *
1603  * Lost Link counter of Port y (counting is
1604  * stopped when 0xff is reached). Counts only if
1605  * port is open and loop is Auto.
1606  */
1607 #define ESC_LOST_LINK_CNT_CNT_MASK (0xFFU)
1608 #define ESC_LOST_LINK_CNT_CNT_SHIFT (0U)
1609 #define ESC_LOST_LINK_CNT_CNT_GET(x) (((uint8_t)(x) & ESC_LOST_LINK_CNT_CNT_MASK) >> ESC_LOST_LINK_CNT_CNT_SHIFT)
1610 
1611 /* Bitfield definition for register: WDG_DIV */
1612 /*
1613  * DIV (RO)
1614  *
1615  * Watchdog divider:Number of 25 MHz tics
1616  * (minus 2) that represent the basic watchdog
1617  * increment. (Default value is 100µs = 2498)
1618  */
1619 #define ESC_WDG_DIV_DIV_MASK (0xFFFFU)
1620 #define ESC_WDG_DIV_DIV_SHIFT (0U)
1621 #define ESC_WDG_DIV_DIV_GET(x) (((uint16_t)(x) & ESC_WDG_DIV_DIV_MASK) >> ESC_WDG_DIV_DIV_SHIFT)
1622 
1623 /* Bitfield definition for register: WDG_TIME_PDI */
1624 /*
1625  * TIME (RO)
1626  *
1627  * Watchdog Time PDI:number of basic
1628  * watchdog increments
1629  * (Default value with Watchdog divider 100µs
1630  * means 100ms Watchdog)
1631  */
1632 #define ESC_WDG_TIME_PDI_TIME_MASK (0xFFFFU)
1633 #define ESC_WDG_TIME_PDI_TIME_SHIFT (0U)
1634 #define ESC_WDG_TIME_PDI_TIME_GET(x) (((uint16_t)(x) & ESC_WDG_TIME_PDI_TIME_MASK) >> ESC_WDG_TIME_PDI_TIME_SHIFT)
1635 
1636 /* Bitfield definition for register: WDG_TIME_PDAT */
1637 /*
1638  * TIME (RO)
1639  *
1640  * Watchdog Time Process Data:number of
1641  * basic watchdog increments
1642  * (Default value with Watchdog divider 100µs
1643  * means 100ms Watchdog)
1644  */
1645 #define ESC_WDG_TIME_PDAT_TIME_MASK (0xFFFFU)
1646 #define ESC_WDG_TIME_PDAT_TIME_SHIFT (0U)
1647 #define ESC_WDG_TIME_PDAT_TIME_GET(x) (((uint16_t)(x) & ESC_WDG_TIME_PDAT_TIME_MASK) >> ESC_WDG_TIME_PDAT_TIME_SHIFT)
1648 
1649 /* Bitfield definition for register: WDG_STAT_PDAT */
1650 /*
1651  * ST (RW)
1652  *
1653  * Watchdog Status of Process Data (triggered
1654  * by SyncManagers)
1655  * 0:Watchdog Process Data expired
1656  * 1:Watchdog Process Data is active or
1657  * disabled
1658  */
1659 #define ESC_WDG_STAT_PDAT_ST_MASK (0x1U)
1660 #define ESC_WDG_STAT_PDAT_ST_SHIFT (0U)
1661 #define ESC_WDG_STAT_PDAT_ST_SET(x) (((uint16_t)(x) << ESC_WDG_STAT_PDAT_ST_SHIFT) & ESC_WDG_STAT_PDAT_ST_MASK)
1662 #define ESC_WDG_STAT_PDAT_ST_GET(x) (((uint16_t)(x) & ESC_WDG_STAT_PDAT_ST_MASK) >> ESC_WDG_STAT_PDAT_ST_SHIFT)
1663 
1664 /* Bitfield definition for register: WDG_CNT_PDAT */
1665 /*
1666  * CNT (RO)
1667  *
1668  * Watchdog Counter Process Data (counting is
1669  * stopped when 0xFF is reached). Counts if
1670  * Process Data Watchdog expires.
1671  */
1672 #define ESC_WDG_CNT_PDAT_CNT_MASK (0xFFU)
1673 #define ESC_WDG_CNT_PDAT_CNT_SHIFT (0U)
1674 #define ESC_WDG_CNT_PDAT_CNT_GET(x) (((uint8_t)(x) & ESC_WDG_CNT_PDAT_CNT_MASK) >> ESC_WDG_CNT_PDAT_CNT_SHIFT)
1675 
1676 /* Bitfield definition for register: WDG_CNT_PDI */
1677 /*
1678  * CNT (RO)
1679  *
1680  * Watchdog PDI counter (counting is stopped
1681  * when 0xFF is reached). Counts if PDI
1682  * Watchdog expires.
1683  */
1684 #define ESC_WDG_CNT_PDI_CNT_MASK (0xFFU)
1685 #define ESC_WDG_CNT_PDI_CNT_SHIFT (0U)
1686 #define ESC_WDG_CNT_PDI_CNT_GET(x) (((uint8_t)(x) & ESC_WDG_CNT_PDI_CNT_MASK) >> ESC_WDG_CNT_PDI_CNT_SHIFT)
1687 
1688 /* Bitfield definition for register: EEPROM_CFG */
1689 /*
1690  * FORCE_ECAT (RO)
1691  *
1692  * Force ECAT access:
1693  * 0:Do not change Bit 0x0501[0]
1694  * 1:Reset Bit 0x0501[0] to 0
1695  */
1696 #define ESC_EEPROM_CFG_FORCE_ECAT_MASK (0x2U)
1697 #define ESC_EEPROM_CFG_FORCE_ECAT_SHIFT (1U)
1698 #define ESC_EEPROM_CFG_FORCE_ECAT_GET(x) (((uint8_t)(x) & ESC_EEPROM_CFG_FORCE_ECAT_MASK) >> ESC_EEPROM_CFG_FORCE_ECAT_SHIFT)
1699 
1700 /*
1701  * PDI (RO)
1702  *
1703  * EEPROM control is offered to PDI:
1704  * 0:no
1705  * 1:yes (PDI has EEPROM control)
1706  */
1707 #define ESC_EEPROM_CFG_PDI_MASK (0x1U)
1708 #define ESC_EEPROM_CFG_PDI_SHIFT (0U)
1709 #define ESC_EEPROM_CFG_PDI_GET(x) (((uint8_t)(x) & ESC_EEPROM_CFG_PDI_MASK) >> ESC_EEPROM_CFG_PDI_SHIFT)
1710 
1711 /* Bitfield definition for register: EEPROM_PDI_ACC_STAT */
1712 /*
1713  * ACCESS (RW)
1714  *
1715  * Access to EEPROM:
1716  * 0:PDI releases EEPROM access
1717  * 1:PDI takes EEPROM access (PDI has
1718  * EEPROM control)
1719  */
1720 #define ESC_EEPROM_PDI_ACC_STAT_ACCESS_MASK (0x1U)
1721 #define ESC_EEPROM_PDI_ACC_STAT_ACCESS_SHIFT (0U)
1722 #define ESC_EEPROM_PDI_ACC_STAT_ACCESS_SET(x) (((uint8_t)(x) << ESC_EEPROM_PDI_ACC_STAT_ACCESS_SHIFT) & ESC_EEPROM_PDI_ACC_STAT_ACCESS_MASK)
1723 #define ESC_EEPROM_PDI_ACC_STAT_ACCESS_GET(x) (((uint8_t)(x) & ESC_EEPROM_PDI_ACC_STAT_ACCESS_MASK) >> ESC_EEPROM_PDI_ACC_STAT_ACCESS_SHIFT)
1724 
1725 /* Bitfield definition for register: EEPROM_CTRL_STAT */
1726 /*
1727  * BUSY (RO)
1728  *
1729  * Busy:
1730  * 0:EEPROM Interface is idle
1731  * 1:EEPROM Interface is busy
1732  */
1733 #define ESC_EEPROM_CTRL_STAT_BUSY_MASK (0x8000U)
1734 #define ESC_EEPROM_CTRL_STAT_BUSY_SHIFT (15U)
1735 #define ESC_EEPROM_CTRL_STAT_BUSY_GET(x) (((uint16_t)(x) & ESC_EEPROM_CTRL_STAT_BUSY_MASK) >> ESC_EEPROM_CTRL_STAT_BUSY_SHIFT)
1736 
1737 /*
1738  * ERR_WEN (RO)
1739  *
1740  * Error Write Enable*3
1741  * :
1742  * 0:No error
1743  * 1:Write Command without Write enable
1744  */
1745 #define ESC_EEPROM_CTRL_STAT_ERR_WEN_MASK (0x4000U)
1746 #define ESC_EEPROM_CTRL_STAT_ERR_WEN_SHIFT (14U)
1747 #define ESC_EEPROM_CTRL_STAT_ERR_WEN_GET(x) (((uint16_t)(x) & ESC_EEPROM_CTRL_STAT_ERR_WEN_MASK) >> ESC_EEPROM_CTRL_STAT_ERR_WEN_SHIFT)
1748 
1749 /*
1750  * ERR_ACK_CMD (RW)
1751  *
1752  * Error Acknowledge/Command*3
1753  * :
1754  * 0:No error
1755  * 1:Missing EEPROM acknowledge or invalid
1756  * command
1757  * EEPROM emulation only:PDI writes 1 if a temporary
1758  * failure has occurred.
1759  */
1760 #define ESC_EEPROM_CTRL_STAT_ERR_ACK_CMD_MASK (0x2000U)
1761 #define ESC_EEPROM_CTRL_STAT_ERR_ACK_CMD_SHIFT (13U)
1762 #define ESC_EEPROM_CTRL_STAT_ERR_ACK_CMD_SET(x) (((uint16_t)(x) << ESC_EEPROM_CTRL_STAT_ERR_ACK_CMD_SHIFT) & ESC_EEPROM_CTRL_STAT_ERR_ACK_CMD_MASK)
1763 #define ESC_EEPROM_CTRL_STAT_ERR_ACK_CMD_GET(x) (((uint16_t)(x) & ESC_EEPROM_CTRL_STAT_ERR_ACK_CMD_MASK) >> ESC_EEPROM_CTRL_STAT_ERR_ACK_CMD_SHIFT)
1764 
1765 /*
1766  * EE_LDS (RO)
1767  *
1768  * EEPROM loading status:
1769  * 0:EEPROM loaded, device information ok
1770  * 1:EEPROM not loaded, device information not
1771  * available (EEPROM loading in progress or
1772  * finished with a failure)
1773  */
1774 #define ESC_EEPROM_CTRL_STAT_EE_LDS_MASK (0x1000U)
1775 #define ESC_EEPROM_CTRL_STAT_EE_LDS_SHIFT (12U)
1776 #define ESC_EEPROM_CTRL_STAT_EE_LDS_GET(x) (((uint16_t)(x) & ESC_EEPROM_CTRL_STAT_EE_LDS_MASK) >> ESC_EEPROM_CTRL_STAT_EE_LDS_SHIFT)
1777 
1778 /*
1779  * CKSM_ERR (RW)
1780  *
1781  * Checksum Error in ESC Configuration Area:
1782  * 0:Checksum ok
1783  * 1:Checksum error
1784  * EEPROM emulation for IP Core only:PDI writes 1 if a
1785  * CRC failure has occurred for a reload command.
1786  */
1787 #define ESC_EEPROM_CTRL_STAT_CKSM_ERR_MASK (0x800U)
1788 #define ESC_EEPROM_CTRL_STAT_CKSM_ERR_SHIFT (11U)
1789 #define ESC_EEPROM_CTRL_STAT_CKSM_ERR_SET(x) (((uint16_t)(x) << ESC_EEPROM_CTRL_STAT_CKSM_ERR_SHIFT) & ESC_EEPROM_CTRL_STAT_CKSM_ERR_MASK)
1790 #define ESC_EEPROM_CTRL_STAT_CKSM_ERR_GET(x) (((uint16_t)(x) & ESC_EEPROM_CTRL_STAT_CKSM_ERR_MASK) >> ESC_EEPROM_CTRL_STAT_CKSM_ERR_SHIFT)
1791 
1792 /*
1793  * CMD (RW)
1794  *
1795  * Command register*2:
1796  * Write:Initiate command.
1797  * Read:Currently executed command
1798  * Commands:
1799  * 000:No command/EEPROM idle (clear error bits)
1800  * 001:Read
1801  * 010:Write
1802  * 100:Reload
1803  * Others:Reserved/invalid commands (do not issue)
1804  * EEPROM emulation only:after execution, PDI writes
1805  * command value to indicate operation is ready.
1806  */
1807 #define ESC_EEPROM_CTRL_STAT_CMD_MASK (0x700U)
1808 #define ESC_EEPROM_CTRL_STAT_CMD_SHIFT (8U)
1809 #define ESC_EEPROM_CTRL_STAT_CMD_SET(x) (((uint16_t)(x) << ESC_EEPROM_CTRL_STAT_CMD_SHIFT) & ESC_EEPROM_CTRL_STAT_CMD_MASK)
1810 #define ESC_EEPROM_CTRL_STAT_CMD_GET(x) (((uint16_t)(x) & ESC_EEPROM_CTRL_STAT_CMD_MASK) >> ESC_EEPROM_CTRL_STAT_CMD_SHIFT)
1811 
1812 /*
1813  * EE_ALGM (RO)
1814  *
1815  * Selected EEPROM Algorithm:
1816  * 0:1 address byte (1Kbit – 16Kbit EEPROMs)
1817  * 1:2 address bytes (32Kbit – 4 Mbit EEPROMs)
1818  */
1819 #define ESC_EEPROM_CTRL_STAT_EE_ALGM_MASK (0x80U)
1820 #define ESC_EEPROM_CTRL_STAT_EE_ALGM_SHIFT (7U)
1821 #define ESC_EEPROM_CTRL_STAT_EE_ALGM_GET(x) (((uint16_t)(x) & ESC_EEPROM_CTRL_STAT_EE_ALGM_MASK) >> ESC_EEPROM_CTRL_STAT_EE_ALGM_SHIFT)
1822 
1823 /*
1824  * NUM_RD_BYTE (RO)
1825  *
1826  * Supported number of EEPROM read bytes:
1827  * 0:4 Bytes
1828  * 1:8 Bytes
1829  */
1830 #define ESC_EEPROM_CTRL_STAT_NUM_RD_BYTE_MASK (0x40U)
1831 #define ESC_EEPROM_CTRL_STAT_NUM_RD_BYTE_SHIFT (6U)
1832 #define ESC_EEPROM_CTRL_STAT_NUM_RD_BYTE_GET(x) (((uint16_t)(x) & ESC_EEPROM_CTRL_STAT_NUM_RD_BYTE_MASK) >> ESC_EEPROM_CTRL_STAT_NUM_RD_BYTE_SHIFT)
1833 
1834 /*
1835  * EE_EMU (RO)
1836  *
1837  * EPROM emulation:
1838  * 0:Normal operation (I²C interface used)
1839  * 1:PDI emulates EEPROM (I²C not used)
1840  */
1841 #define ESC_EEPROM_CTRL_STAT_EE_EMU_MASK (0x20U)
1842 #define ESC_EEPROM_CTRL_STAT_EE_EMU_SHIFT (5U)
1843 #define ESC_EEPROM_CTRL_STAT_EE_EMU_GET(x) (((uint16_t)(x) & ESC_EEPROM_CTRL_STAT_EE_EMU_MASK) >> ESC_EEPROM_CTRL_STAT_EE_EMU_SHIFT)
1844 
1845 /*
1846  * ECAT_WEN (RO)
1847  *
1848  * ECAT write enable*2
1849  * :
1850  * 0:Write requests are disabled
1851  * 1:Write requests are enabled
1852  * This bit is always 1 if PDI has EEPROM control.
1853  */
1854 #define ESC_EEPROM_CTRL_STAT_ECAT_WEN_MASK (0x1U)
1855 #define ESC_EEPROM_CTRL_STAT_ECAT_WEN_SHIFT (0U)
1856 #define ESC_EEPROM_CTRL_STAT_ECAT_WEN_GET(x) (((uint16_t)(x) & ESC_EEPROM_CTRL_STAT_ECAT_WEN_MASK) >> ESC_EEPROM_CTRL_STAT_ECAT_WEN_SHIFT)
1857 
1858 /* Bitfield definition for register: EEPROM_ADDR */
1859 /*
1860  * ADDR (RW)
1861  *
1862  * EEPROM Address
1863  * 0:First word (= 16 bit)
1864  * 1:Second word
1865  * …
1866  * Actually used EEPROM Address bits:
1867  * 9-0: EEPROM size up to 16 Kbit
1868  * 17-0: EEPROM size 32 Kbit – 4 Mbit
1869  * 31-0: EEPROM Emulation
1870  */
1871 #define ESC_EEPROM_ADDR_ADDR_MASK (0xFFFFFFFFUL)
1872 #define ESC_EEPROM_ADDR_ADDR_SHIFT (0U)
1873 #define ESC_EEPROM_ADDR_ADDR_SET(x) (((uint32_t)(x) << ESC_EEPROM_ADDR_ADDR_SHIFT) & ESC_EEPROM_ADDR_ADDR_MASK)
1874 #define ESC_EEPROM_ADDR_ADDR_GET(x) (((uint32_t)(x) & ESC_EEPROM_ADDR_ADDR_MASK) >> ESC_EEPROM_ADDR_ADDR_SHIFT)
1875 
1876 /* Bitfield definition for register: EEPROM_DATA */
1877 /*
1878  * HI (RW)
1879  *
1880  * EEPROM Read data (data read from
1881  * EEPROM, higher bytes)
1882  */
1883 #define ESC_EEPROM_DATA_HI_MASK (0xFFFFFFFFFFFF0000ULL)
1884 #define ESC_EEPROM_DATA_HI_SHIFT (16U)
1885 #define ESC_EEPROM_DATA_HI_SET(x) (((uint64_t)(x) << ESC_EEPROM_DATA_HI_SHIFT) & ESC_EEPROM_DATA_HI_MASK)
1886 #define ESC_EEPROM_DATA_HI_GET(x) (((uint64_t)(x) & ESC_EEPROM_DATA_HI_MASK) >> ESC_EEPROM_DATA_HI_SHIFT)
1887 
1888 /*
1889  * LO (RW)
1890  *
1891  * EEPROM Write data (data to be written to
1892  * EEPROM) or
1893  * EEPROM Read data (data read from
1894  * EEPROM, lower bytes)
1895  */
1896 #define ESC_EEPROM_DATA_LO_MASK (0xFFFFU)
1897 #define ESC_EEPROM_DATA_LO_SHIFT (0U)
1898 #define ESC_EEPROM_DATA_LO_SET(x) (((uint64_t)(x) << ESC_EEPROM_DATA_LO_SHIFT) & ESC_EEPROM_DATA_LO_MASK)
1899 #define ESC_EEPROM_DATA_LO_GET(x) (((uint64_t)(x) & ESC_EEPROM_DATA_LO_MASK) >> ESC_EEPROM_DATA_LO_SHIFT)
1900 
1901 /* Bitfield definition for register: MII_MNG_CS */
1902 /*
1903  * BUSY (RO)
1904  *
1905  * Busy:
1906  * 0:MII Management Interface is idle
1907  * 1:MII Management Interface is busy
1908  */
1909 #define ESC_MII_MNG_CS_BUSY_MASK (0x8000U)
1910 #define ESC_MII_MNG_CS_BUSY_SHIFT (15U)
1911 #define ESC_MII_MNG_CS_BUSY_GET(x) (((uint16_t)(x) & ESC_MII_MNG_CS_BUSY_MASK) >> ESC_MII_MNG_CS_BUSY_SHIFT)
1912 
1913 /*
1914  * CMD_ERR (RO)
1915  *
1916  * Command error:
1917  * 0:Last Command was successful
1918  * 1:Invalid command or write command
1919  * without Write Enable
1920  * Cleared by executing a valid command or by
1921  * writing “00” to Command register bits [9:8].
1922  */
1923 #define ESC_MII_MNG_CS_CMD_ERR_MASK (0x4000U)
1924 #define ESC_MII_MNG_CS_CMD_ERR_SHIFT (14U)
1925 #define ESC_MII_MNG_CS_CMD_ERR_GET(x) (((uint16_t)(x) & ESC_MII_MNG_CS_CMD_ERR_MASK) >> ESC_MII_MNG_CS_CMD_ERR_SHIFT)
1926 
1927 /*
1928  * RD_ERR (RO)
1929  *
1930  * Read error:
1931  * 0:No read error
1932  * 1:Read error occurred (PHY or register
1933  * not available)
1934  * Cleared by writing to register 0x0511
1935  */
1936 #define ESC_MII_MNG_CS_RD_ERR_MASK (0x2000U)
1937 #define ESC_MII_MNG_CS_RD_ERR_SHIFT (13U)
1938 #define ESC_MII_MNG_CS_RD_ERR_GET(x) (((uint16_t)(x) & ESC_MII_MNG_CS_RD_ERR_MASK) >> ESC_MII_MNG_CS_RD_ERR_SHIFT)
1939 
1940 /*
1941  * CMD (RW)
1942  *
1943  * Command register*:
1944  * Write:Initiate command.
1945  * Read:Currently executed command
1946  * 00:No command/MI idle (clear error bits)
1947  * 01:Read
1948  * 10:Write
1949  * Others:Reserved/invalid command (do not
1950  * issue)
1951  */
1952 #define ESC_MII_MNG_CS_CMD_MASK (0x300U)
1953 #define ESC_MII_MNG_CS_CMD_SHIFT (8U)
1954 #define ESC_MII_MNG_CS_CMD_SET(x) (((uint16_t)(x) << ESC_MII_MNG_CS_CMD_SHIFT) & ESC_MII_MNG_CS_CMD_MASK)
1955 #define ESC_MII_MNG_CS_CMD_GET(x) (((uint16_t)(x) & ESC_MII_MNG_CS_CMD_MASK) >> ESC_MII_MNG_CS_CMD_SHIFT)
1956 
1957 /*
1958  * PHY_ADDR (RO)
1959  *
1960  * PHY address of port 0
1961  * (this is equal to the PHY address offset, if the
1962  * PHY addresses are consecutive)
1963  * IP Core since V3.0.0/3.00c:
1964  * Translation 0x0512[7]=0:
1965  * Register 0x0510[7:3] shows PHY address of
1966  * port 0
1967  * Translation 0x0512[7]=1:
1968  * Register 0x0510[7:3] shows the PHY address
1969  * which will be used for port 0-3 as requested
1970  * by 0x0512[4:0] (valid values 0-3)
1971  */
1972 #define ESC_MII_MNG_CS_PHY_ADDR_MASK (0xF8U)
1973 #define ESC_MII_MNG_CS_PHY_ADDR_SHIFT (3U)
1974 #define ESC_MII_MNG_CS_PHY_ADDR_GET(x) (((uint16_t)(x) & ESC_MII_MNG_CS_PHY_ADDR_MASK) >> ESC_MII_MNG_CS_PHY_ADDR_SHIFT)
1975 
1976 /*
1977  * LINK_DC (RO)
1978  *
1979  * MI link detection and configuration:
1980  * 0:Disabled for all ports
1981  * 1:Enabled for at least one MII port, refer
1982  * to PHY Port Status (0x0518 ff.) for
1983  * details
1984  */
1985 #define ESC_MII_MNG_CS_LINK_DC_MASK (0x4U)
1986 #define ESC_MII_MNG_CS_LINK_DC_SHIFT (2U)
1987 #define ESC_MII_MNG_CS_LINK_DC_GET(x) (((uint16_t)(x) & ESC_MII_MNG_CS_LINK_DC_MASK) >> ESC_MII_MNG_CS_LINK_DC_SHIFT)
1988 
1989 /*
1990  * PDI (RO)
1991  *
1992  * Management Interface can be controlled by
1993  * PDI (registers 0x0516-0x0517):
1994  * 0:Only ECAT control
1995  * 1:PDI control possible
1996  */
1997 #define ESC_MII_MNG_CS_PDI_MASK (0x2U)
1998 #define ESC_MII_MNG_CS_PDI_SHIFT (1U)
1999 #define ESC_MII_MNG_CS_PDI_GET(x) (((uint16_t)(x) & ESC_MII_MNG_CS_PDI_MASK) >> ESC_MII_MNG_CS_PDI_SHIFT)
2000 
2001 /*
2002  * WEN (RO)
2003  *
2004  * Write enable*:
2005  * 0:Write disabled
2006  * 1:Write enabled
2007  * This bit is always 1 if PDI has MI control.
2008  * ET1100-0000/-0001 exception:
2009  * Bit is not always 1 if PDI has MI control, and
2010  * bit is writable by PDI.
2011  */
2012 #define ESC_MII_MNG_CS_WEN_MASK (0x1U)
2013 #define ESC_MII_MNG_CS_WEN_SHIFT (0U)
2014 #define ESC_MII_MNG_CS_WEN_GET(x) (((uint16_t)(x) & ESC_MII_MNG_CS_WEN_MASK) >> ESC_MII_MNG_CS_WEN_SHIFT)
2015 
2016 /* Bitfield definition for register: PHY_ADDR */
2017 /*
2018  * SHOW (RW)
2019  *
2020  * Target PHY Address translation:
2021  * 0:Enabled
2022  * 1:Disabled
2023  * Refer to 0x0512[4:0] and 0x0510[7:3] for
2024  * details.
2025  */
2026 #define ESC_PHY_ADDR_SHOW_MASK (0x80U)
2027 #define ESC_PHY_ADDR_SHOW_SHIFT (7U)
2028 #define ESC_PHY_ADDR_SHOW_SET(x) (((uint8_t)(x) << ESC_PHY_ADDR_SHOW_SHIFT) & ESC_PHY_ADDR_SHOW_MASK)
2029 #define ESC_PHY_ADDR_SHOW_GET(x) (((uint8_t)(x) & ESC_PHY_ADDR_SHOW_MASK) >> ESC_PHY_ADDR_SHOW_SHIFT)
2030 
2031 /*
2032  * ADDR (RW)
2033  *
2034  * Target PHY Address
2035  * Translation 0x0512[7]=0:
2036  * 0-3:Target PHY Addresses 0-3 are used
2037  * to access the PHYs at port 0-3, when
2038  * the PHY addresses are properly
2039  * configured
2040  * 4-31:The configured PHY address of port 0
2041  * (PHY address offset) is added to the
2042  * Target PHY Address values 4-31
2043  * when accessing a PHY
2044  * Translation 0x0512[7]=1:
2045  * 0-31:Target PHY Addresses is used when
2046  * accessing a PHY without translation
2047  */
2048 #define ESC_PHY_ADDR_ADDR_MASK (0x1FU)
2049 #define ESC_PHY_ADDR_ADDR_SHIFT (0U)
2050 #define ESC_PHY_ADDR_ADDR_SET(x) (((uint8_t)(x) << ESC_PHY_ADDR_ADDR_SHIFT) & ESC_PHY_ADDR_ADDR_MASK)
2051 #define ESC_PHY_ADDR_ADDR_GET(x) (((uint8_t)(x) & ESC_PHY_ADDR_ADDR_MASK) >> ESC_PHY_ADDR_ADDR_SHIFT)
2052 
2053 /* Bitfield definition for register: PHY_REG_ADDR */
2054 /*
2055  * ADDR (RW)
2056  *
2057  * Address of PHY Register that shall be
2058  * read/written
2059  */
2060 #define ESC_PHY_REG_ADDR_ADDR_MASK (0x1FU)
2061 #define ESC_PHY_REG_ADDR_ADDR_SHIFT (0U)
2062 #define ESC_PHY_REG_ADDR_ADDR_SET(x) (((uint8_t)(x) << ESC_PHY_REG_ADDR_ADDR_SHIFT) & ESC_PHY_REG_ADDR_ADDR_MASK)
2063 #define ESC_PHY_REG_ADDR_ADDR_GET(x) (((uint8_t)(x) & ESC_PHY_REG_ADDR_ADDR_MASK) >> ESC_PHY_REG_ADDR_ADDR_SHIFT)
2064 
2065 /* Bitfield definition for register: PHY_DATA */
2066 /*
2067  * DATA (RW)
2068  *
2069  * PHY Read/Write Data
2070  */
2071 #define ESC_PHY_DATA_DATA_MASK (0xFFFFU)
2072 #define ESC_PHY_DATA_DATA_SHIFT (0U)
2073 #define ESC_PHY_DATA_DATA_SET(x) (((uint16_t)(x) << ESC_PHY_DATA_DATA_SHIFT) & ESC_PHY_DATA_DATA_MASK)
2074 #define ESC_PHY_DATA_DATA_GET(x) (((uint16_t)(x) & ESC_PHY_DATA_DATA_MASK) >> ESC_PHY_DATA_DATA_SHIFT)
2075 
2076 /* Bitfield definition for register: MIIM_ECAT_ACC_STAT */
2077 /*
2078  * ACC (RO)
2079  *
2080  * Access to MII management:
2081  * 0:ECAT enables PDI takeover of MII
2082  * management interface
2083  * 1:ECAT claims exclusive access to MII
2084  * management interface
2085  */
2086 #define ESC_MIIM_ECAT_ACC_STAT_ACC_MASK (0x1U)
2087 #define ESC_MIIM_ECAT_ACC_STAT_ACC_SHIFT (0U)
2088 #define ESC_MIIM_ECAT_ACC_STAT_ACC_GET(x) (((uint8_t)(x) & ESC_MIIM_ECAT_ACC_STAT_ACC_MASK) >> ESC_MIIM_ECAT_ACC_STAT_ACC_SHIFT)
2089 
2090 /* Bitfield definition for register: MIIM_PDI_ACC_STAT */
2091 /*
2092  * FORCE (RO)
2093  *
2094  * Force PDI Access State:
2095  * 0:Do not change Bit 0x0517[0]
2096  * 1:Reset Bit 0x0517[0] to 0
2097  */
2098 #define ESC_MIIM_PDI_ACC_STAT_FORCE_MASK (0x2U)
2099 #define ESC_MIIM_PDI_ACC_STAT_FORCE_SHIFT (1U)
2100 #define ESC_MIIM_PDI_ACC_STAT_FORCE_GET(x) (((uint8_t)(x) & ESC_MIIM_PDI_ACC_STAT_FORCE_MASK) >> ESC_MIIM_PDI_ACC_STAT_FORCE_SHIFT)
2101 
2102 /*
2103  * ACC (RW)
2104  *
2105  * Access to MII management:
2106  * 0:ECAT has access to MII management
2107  * 1:PDI has access to MII management
2108  */
2109 #define ESC_MIIM_PDI_ACC_STAT_ACC_MASK (0x1U)
2110 #define ESC_MIIM_PDI_ACC_STAT_ACC_SHIFT (0U)
2111 #define ESC_MIIM_PDI_ACC_STAT_ACC_SET(x) (((uint8_t)(x) << ESC_MIIM_PDI_ACC_STAT_ACC_SHIFT) & ESC_MIIM_PDI_ACC_STAT_ACC_MASK)
2112 #define ESC_MIIM_PDI_ACC_STAT_ACC_GET(x) (((uint8_t)(x) & ESC_MIIM_PDI_ACC_STAT_ACC_MASK) >> ESC_MIIM_PDI_ACC_STAT_ACC_SHIFT)
2113 
2114 /* Bitfield definition for register array: PHY_STAT */
2115 /*
2116  * PCU (RW)
2117  *
2118  * PHY configuration updated:
2119  * 0:No update
2120  * 1:PHY configuration was updated
2121  * Cleared by writing any value to at least one
2122  * of the PHY Port y Status registers.
2123  */
2124 #define ESC_PHY_STAT_PCU_MASK (0x20U)
2125 #define ESC_PHY_STAT_PCU_SHIFT (5U)
2126 #define ESC_PHY_STAT_PCU_SET(x) (((uint8_t)(x) << ESC_PHY_STAT_PCU_SHIFT) & ESC_PHY_STAT_PCU_MASK)
2127 #define ESC_PHY_STAT_PCU_GET(x) (((uint8_t)(x) & ESC_PHY_STAT_PCU_MASK) >> ESC_PHY_STAT_PCU_SHIFT)
2128 
2129 /*
2130  * LPE (RO)
2131  *
2132  * Link partner error:
2133  * 0:No error detected
2134  * 1:Link partner error
2135  */
2136 #define ESC_PHY_STAT_LPE_MASK (0x10U)
2137 #define ESC_PHY_STAT_LPE_SHIFT (4U)
2138 #define ESC_PHY_STAT_LPE_GET(x) (((uint8_t)(x) & ESC_PHY_STAT_LPE_MASK) >> ESC_PHY_STAT_LPE_SHIFT)
2139 
2140 /*
2141  * RE (RW)
2142  *
2143  * Read error:
2144  * 0:No read error occurred
2145  * 1:A read error has occurred
2146  * Cleared by writing any value to at least one
2147  * of the PHY Port y Status registers.
2148  */
2149 #define ESC_PHY_STAT_RE_MASK (0x8U)
2150 #define ESC_PHY_STAT_RE_SHIFT (3U)
2151 #define ESC_PHY_STAT_RE_SET(x) (((uint8_t)(x) << ESC_PHY_STAT_RE_SHIFT) & ESC_PHY_STAT_RE_MASK)
2152 #define ESC_PHY_STAT_RE_GET(x) (((uint8_t)(x) & ESC_PHY_STAT_RE_MASK) >> ESC_PHY_STAT_RE_SHIFT)
2153 
2154 /*
2155  * LSE (RO)
2156  *
2157  * Link status error:
2158  * 0:No error
2159  * 1:Link error, link inhibited
2160  */
2161 #define ESC_PHY_STAT_LSE_MASK (0x4U)
2162 #define ESC_PHY_STAT_LSE_SHIFT (2U)
2163 #define ESC_PHY_STAT_LSE_GET(x) (((uint8_t)(x) & ESC_PHY_STAT_LSE_MASK) >> ESC_PHY_STAT_LSE_SHIFT)
2164 
2165 /*
2166  * LS (RO)
2167  *
2168  * Link status (100 Mbit/s, Full Duplex, Auto
2169  * negotiation):
2170  * 0:No link
2171  * 1:Link detected
2172  */
2173 #define ESC_PHY_STAT_LS_MASK (0x2U)
2174 #define ESC_PHY_STAT_LS_SHIFT (1U)
2175 #define ESC_PHY_STAT_LS_GET(x) (((uint8_t)(x) & ESC_PHY_STAT_LS_MASK) >> ESC_PHY_STAT_LS_SHIFT)
2176 
2177 /*
2178  * PLS (RO)
2179  *
2180  * Physical link status (PHY status register 1.2):
2181  * 0:No physical link
2182  * 1:Physical link detected
2183  */
2184 #define ESC_PHY_STAT_PLS_MASK (0x1U)
2185 #define ESC_PHY_STAT_PLS_SHIFT (0U)
2186 #define ESC_PHY_STAT_PLS_GET(x) (((uint8_t)(x) & ESC_PHY_STAT_PLS_MASK) >> ESC_PHY_STAT_PLS_SHIFT)
2187 
2188 /* Bitfield definition for register of struct array FMMU: LOGIC_START_ADDR */
2189 /*
2190  * ADDR (RO)
2191  *
2192  * Logical start address within the EtherCAT
2193  * Address Space.
2194  */
2195 #define ESC_FMMU_LOGIC_START_ADDR_ADDR_MASK (0xFFFFFFFFUL)
2196 #define ESC_FMMU_LOGIC_START_ADDR_ADDR_SHIFT (0U)
2197 #define ESC_FMMU_LOGIC_START_ADDR_ADDR_GET(x) (((uint32_t)(x) & ESC_FMMU_LOGIC_START_ADDR_ADDR_MASK) >> ESC_FMMU_LOGIC_START_ADDR_ADDR_SHIFT)
2198 
2199 /* Bitfield definition for register of struct array FMMU: LENGTH */
2200 /*
2201  * OFFSET (RO)
2202  *
2203  * Offset from the first logical FMMU byte to the
2204  * last FMMU byte + 1 (e.g., if two bytes are
2205  * used, then this parameter shall contain 2)
2206  */
2207 #define ESC_FMMU_LENGTH_OFFSET_MASK (0xFFFFU)
2208 #define ESC_FMMU_LENGTH_OFFSET_SHIFT (0U)
2209 #define ESC_FMMU_LENGTH_OFFSET_GET(x) (((uint16_t)(x) & ESC_FMMU_LENGTH_OFFSET_MASK) >> ESC_FMMU_LENGTH_OFFSET_SHIFT)
2210 
2211 /* Bitfield definition for register of struct array FMMU: LOGIC_START_BIT */
2212 /*
2213  * START (RO)
2214  *
2215  * Logical starting bit that shall be mapped (bits
2216  * are counted from least significant bit 0 to
2217  * most significant bit 7)
2218  */
2219 #define ESC_FMMU_LOGIC_START_BIT_START_MASK (0x7U)
2220 #define ESC_FMMU_LOGIC_START_BIT_START_SHIFT (0U)
2221 #define ESC_FMMU_LOGIC_START_BIT_START_GET(x) (((uint8_t)(x) & ESC_FMMU_LOGIC_START_BIT_START_MASK) >> ESC_FMMU_LOGIC_START_BIT_START_SHIFT)
2222 
2223 /* Bitfield definition for register of struct array FMMU: LOGIC_STOP_BIT */
2224 /*
2225  * STOP (RO)
2226  *
2227  * Last logical bit that shall be mapped (bits are
2228  * counted from least significant bit 0 to most
2229  * significant bit 7)
2230  */
2231 #define ESC_FMMU_LOGIC_STOP_BIT_STOP_MASK (0x7U)
2232 #define ESC_FMMU_LOGIC_STOP_BIT_STOP_SHIFT (0U)
2233 #define ESC_FMMU_LOGIC_STOP_BIT_STOP_GET(x) (((uint8_t)(x) & ESC_FMMU_LOGIC_STOP_BIT_STOP_MASK) >> ESC_FMMU_LOGIC_STOP_BIT_STOP_SHIFT)
2234 
2235 /* Bitfield definition for register of struct array FMMU: PHYSICAL_START_ADDR */
2236 /*
2237  * ADDR (RO)
2238  *
2239  * Physical Start Address (mapped to logical
2240  * Start address)
2241  */
2242 #define ESC_FMMU_PHYSICAL_START_ADDR_ADDR_MASK (0xFFFFU)
2243 #define ESC_FMMU_PHYSICAL_START_ADDR_ADDR_SHIFT (0U)
2244 #define ESC_FMMU_PHYSICAL_START_ADDR_ADDR_GET(x) (((uint16_t)(x) & ESC_FMMU_PHYSICAL_START_ADDR_ADDR_MASK) >> ESC_FMMU_PHYSICAL_START_ADDR_ADDR_SHIFT)
2245 
2246 /* Bitfield definition for register of struct array FMMU: PHYSICAL_START_BIT */
2247 /*
2248  * START (RO)
2249  *
2250  * Physical starting bit as target of logical start
2251  * bit mapping (bits are counted from least
2252  * significant bit 0 to most significant bit 7)
2253  */
2254 #define ESC_FMMU_PHYSICAL_START_BIT_START_MASK (0x7U)
2255 #define ESC_FMMU_PHYSICAL_START_BIT_START_SHIFT (0U)
2256 #define ESC_FMMU_PHYSICAL_START_BIT_START_GET(x) (((uint8_t)(x) & ESC_FMMU_PHYSICAL_START_BIT_START_MASK) >> ESC_FMMU_PHYSICAL_START_BIT_START_SHIFT)
2257 
2258 /* Bitfield definition for register of struct array FMMU: TYPE */
2259 /*
2260  * MAP_WR (RO)
2261  *
2262  * 0:Ignore mapping for write accesses
2263  * 1:Use mapping for write accesses
2264  */
2265 #define ESC_FMMU_TYPE_MAP_WR_MASK (0x2U)
2266 #define ESC_FMMU_TYPE_MAP_WR_SHIFT (1U)
2267 #define ESC_FMMU_TYPE_MAP_WR_GET(x) (((uint8_t)(x) & ESC_FMMU_TYPE_MAP_WR_MASK) >> ESC_FMMU_TYPE_MAP_WR_SHIFT)
2268 
2269 /*
2270  * MAP_RD (RO)
2271  *
2272  * 0:Ignore mapping for read accesses
2273  * 1:Use mapping for read accesses
2274  */
2275 #define ESC_FMMU_TYPE_MAP_RD_MASK (0x1U)
2276 #define ESC_FMMU_TYPE_MAP_RD_SHIFT (0U)
2277 #define ESC_FMMU_TYPE_MAP_RD_GET(x) (((uint8_t)(x) & ESC_FMMU_TYPE_MAP_RD_MASK) >> ESC_FMMU_TYPE_MAP_RD_SHIFT)
2278 
2279 /* Bitfield definition for register of struct array FMMU: ACTIVATE */
2280 /*
2281  * ACT (RO)
2282  *
2283  * 0:FMMU deactivated
2284  * 1:FMMU activated. FMMU checks
2285  * logically addressed blocks to be
2286  * mapped according to configured
2287  * mapping
2288  */
2289 #define ESC_FMMU_ACTIVATE_ACT_MASK (0x1U)
2290 #define ESC_FMMU_ACTIVATE_ACT_SHIFT (0U)
2291 #define ESC_FMMU_ACTIVATE_ACT_GET(x) (((uint8_t)(x) & ESC_FMMU_ACTIVATE_ACT_MASK) >> ESC_FMMU_ACTIVATE_ACT_SHIFT)
2292 
2293 /* Bitfield definition for register of struct array SYNCM: PHYSICAL_START_ADDR */
2294 /*
2295  * ADDR (RO)
2296  *
2297  * First byte that will be handled by
2298  * SyncManager
2299  */
2300 #define ESC_SYNCM_PHYSICAL_START_ADDR_ADDR_MASK (0xFFFFU)
2301 #define ESC_SYNCM_PHYSICAL_START_ADDR_ADDR_SHIFT (0U)
2302 #define ESC_SYNCM_PHYSICAL_START_ADDR_ADDR_GET(x) (((uint16_t)(x) & ESC_SYNCM_PHYSICAL_START_ADDR_ADDR_MASK) >> ESC_SYNCM_PHYSICAL_START_ADDR_ADDR_SHIFT)
2303 
2304 /* Bitfield definition for register of struct array SYNCM: LENGTH */
2305 /*
2306  * LEN (RO)
2307  *
2308  * Number of bytes assigned to SyncManager
2309  * (shall be greater than 1, otherwise
2310  * SyncManager is not activated. If set to 1, only
2311  * Watchdog Trigger is generated if configured)
2312  */
2313 #define ESC_SYNCM_LENGTH_LEN_MASK (0xFFFFU)
2314 #define ESC_SYNCM_LENGTH_LEN_SHIFT (0U)
2315 #define ESC_SYNCM_LENGTH_LEN_GET(x) (((uint16_t)(x) & ESC_SYNCM_LENGTH_LEN_MASK) >> ESC_SYNCM_LENGTH_LEN_SHIFT)
2316 
2317 /* Bitfield definition for register of struct array SYNCM: CONTROL */
2318 /*
2319  * WDG_TRG_EN (RO)
2320  *
2321  * Watchdog Trigger Enable:
2322  * 0:Disabled
2323  * 1:Enabled
2324  */
2325 #define ESC_SYNCM_CONTROL_WDG_TRG_EN_MASK (0x40U)
2326 #define ESC_SYNCM_CONTROL_WDG_TRG_EN_SHIFT (6U)
2327 #define ESC_SYNCM_CONTROL_WDG_TRG_EN_GET(x) (((uint8_t)(x) & ESC_SYNCM_CONTROL_WDG_TRG_EN_MASK) >> ESC_SYNCM_CONTROL_WDG_TRG_EN_SHIFT)
2328 
2329 /*
2330  * INT_AL (RO)
2331  *
2332  * Interrupt in AL Event Request Register:
2333  * 0:Disabled
2334  * 1:Enabled
2335  */
2336 #define ESC_SYNCM_CONTROL_INT_AL_MASK (0x20U)
2337 #define ESC_SYNCM_CONTROL_INT_AL_SHIFT (5U)
2338 #define ESC_SYNCM_CONTROL_INT_AL_GET(x) (((uint8_t)(x) & ESC_SYNCM_CONTROL_INT_AL_MASK) >> ESC_SYNCM_CONTROL_INT_AL_SHIFT)
2339 
2340 /*
2341  * INT_ECAT (RO)
2342  *
2343  * Interrupt in ECAT Event Request Register:
2344  * 0:Disabled
2345  * 1:Enabled
2346  */
2347 #define ESC_SYNCM_CONTROL_INT_ECAT_MASK (0x10U)
2348 #define ESC_SYNCM_CONTROL_INT_ECAT_SHIFT (4U)
2349 #define ESC_SYNCM_CONTROL_INT_ECAT_GET(x) (((uint8_t)(x) & ESC_SYNCM_CONTROL_INT_ECAT_MASK) >> ESC_SYNCM_CONTROL_INT_ECAT_SHIFT)
2350 
2351 /*
2352  * DIR (RO)
2353  *
2354  * Direction:
2355  * 00:Read:ECAT read access, PDI write
2356  * access.
2357  * 01:Write:ECAT write access, PDI read
2358  * access.
2359  * 10:Reserved
2360  * 11:Reserved
2361  */
2362 #define ESC_SYNCM_CONTROL_DIR_MASK (0xCU)
2363 #define ESC_SYNCM_CONTROL_DIR_SHIFT (2U)
2364 #define ESC_SYNCM_CONTROL_DIR_GET(x) (((uint8_t)(x) & ESC_SYNCM_CONTROL_DIR_MASK) >> ESC_SYNCM_CONTROL_DIR_SHIFT)
2365 
2366 /*
2367  * OP_MODE (RO)
2368  *
2369  * Operation Mode:
2370  * 00:Buffered (3 buffer mode)
2371  * 01:Reserved
2372  * 10:Mailbox (Single buffer mode)
2373  * 11:Reserved
2374  */
2375 #define ESC_SYNCM_CONTROL_OP_MODE_MASK (0x3U)
2376 #define ESC_SYNCM_CONTROL_OP_MODE_SHIFT (0U)
2377 #define ESC_SYNCM_CONTROL_OP_MODE_GET(x) (((uint8_t)(x) & ESC_SYNCM_CONTROL_OP_MODE_MASK) >> ESC_SYNCM_CONTROL_OP_MODE_SHIFT)
2378 
2379 /* Bitfield definition for register of struct array SYNCM: STATUS */
2380 /*
2381  * WB_INUSE (RO)
2382  *
2383  * Write buffer in use (opened)
2384  */
2385 #define ESC_SYNCM_STATUS_WB_INUSE_MASK (0x80U)
2386 #define ESC_SYNCM_STATUS_WB_INUSE_SHIFT (7U)
2387 #define ESC_SYNCM_STATUS_WB_INUSE_GET(x) (((uint8_t)(x) & ESC_SYNCM_STATUS_WB_INUSE_MASK) >> ESC_SYNCM_STATUS_WB_INUSE_SHIFT)
2388 
2389 /*
2390  * RB_INUSE (RO)
2391  *
2392  * Read buffer in use (opened)
2393  */
2394 #define ESC_SYNCM_STATUS_RB_INUSE_MASK (0x40U)
2395 #define ESC_SYNCM_STATUS_RB_INUSE_SHIFT (6U)
2396 #define ESC_SYNCM_STATUS_RB_INUSE_GET(x) (((uint8_t)(x) & ESC_SYNCM_STATUS_RB_INUSE_MASK) >> ESC_SYNCM_STATUS_RB_INUSE_SHIFT)
2397 
2398 /*
2399  * BUF_MODE (RO)
2400  *
2401  * Buffered mode:buffer status (last written
2402  * buffer):
2403  * 00:1
2404  * st buffer
2405  * 01:2
2406  * nd buffer
2407  * 10:3
2408  * rd buffer
2409  * 11:(no buffer written)
2410  * Mailbox mode:reserved
2411  */
2412 #define ESC_SYNCM_STATUS_BUF_MODE_MASK (0x30U)
2413 #define ESC_SYNCM_STATUS_BUF_MODE_SHIFT (4U)
2414 #define ESC_SYNCM_STATUS_BUF_MODE_GET(x) (((uint8_t)(x) & ESC_SYNCM_STATUS_BUF_MODE_MASK) >> ESC_SYNCM_STATUS_BUF_MODE_SHIFT)
2415 
2416 /*
2417  * MBX_MODE (RO)
2418  *
2419  * Mailbox mode:mailbox status:
2420  * 0:Mailbox empty
2421  * 1:Mailbox full
2422  * Buffered mode:reserved
2423  */
2424 #define ESC_SYNCM_STATUS_MBX_MODE_MASK (0x8U)
2425 #define ESC_SYNCM_STATUS_MBX_MODE_SHIFT (3U)
2426 #define ESC_SYNCM_STATUS_MBX_MODE_GET(x) (((uint8_t)(x) & ESC_SYNCM_STATUS_MBX_MODE_MASK) >> ESC_SYNCM_STATUS_MBX_MODE_SHIFT)
2427 
2428 /*
2429  * INT_RD (RO)
2430  *
2431  * Interrupt Read:
2432  * 1:Interrupt after buffer was completely and
2433  * successfully read
2434  * 0:Interrupt cleared after first byte of buffer
2435  * was written
2436  * NOTE:This interrupt is signalled to the writing
2437  * side if enabled in the SM Control register
2438  */
2439 #define ESC_SYNCM_STATUS_INT_RD_MASK (0x2U)
2440 #define ESC_SYNCM_STATUS_INT_RD_SHIFT (1U)
2441 #define ESC_SYNCM_STATUS_INT_RD_GET(x) (((uint8_t)(x) & ESC_SYNCM_STATUS_INT_RD_MASK) >> ESC_SYNCM_STATUS_INT_RD_SHIFT)
2442 
2443 /*
2444  * INT_WR (RO)
2445  *
2446  * Interrupt Write:
2447  * 1:Interrupt after buffer was completely and
2448  * successfully written
2449  * 0:Interrupt cleared after first byte of buffer
2450  * was read
2451  * NOTE:This interrupt is signalled to the reading
2452  * side if enabled in the SM Control register
2453  */
2454 #define ESC_SYNCM_STATUS_INT_WR_MASK (0x1U)
2455 #define ESC_SYNCM_STATUS_INT_WR_SHIFT (0U)
2456 #define ESC_SYNCM_STATUS_INT_WR_GET(x) (((uint8_t)(x) & ESC_SYNCM_STATUS_INT_WR_MASK) >> ESC_SYNCM_STATUS_INT_WR_SHIFT)
2457 
2458 /* Bitfield definition for register of struct array SYNCM: ACTIVATE */
2459 /*
2460  * LATCH_PDI (RO)
2461  *
2462  * Latch Event PDI:
2463  * 0:No
2464  * 1:Generate Latch events when PDI issues
2465  * a buffer exchange or when PDI
2466  * accesses buffer start address
2467  */
2468 #define ESC_SYNCM_ACTIVATE_LATCH_PDI_MASK (0x80U)
2469 #define ESC_SYNCM_ACTIVATE_LATCH_PDI_SHIFT (7U)
2470 #define ESC_SYNCM_ACTIVATE_LATCH_PDI_GET(x) (((uint8_t)(x) & ESC_SYNCM_ACTIVATE_LATCH_PDI_MASK) >> ESC_SYNCM_ACTIVATE_LATCH_PDI_SHIFT)
2471 
2472 /*
2473  * LATCH_ECAT (RO)
2474  *
2475  * Latch Event ECAT:
2476  * 0:No
2477  * 1:Generate Latch event when EtherCAT
2478  * master issues a buffer exchange
2479  */
2480 #define ESC_SYNCM_ACTIVATE_LATCH_ECAT_MASK (0x40U)
2481 #define ESC_SYNCM_ACTIVATE_LATCH_ECAT_SHIFT (6U)
2482 #define ESC_SYNCM_ACTIVATE_LATCH_ECAT_GET(x) (((uint8_t)(x) & ESC_SYNCM_ACTIVATE_LATCH_ECAT_MASK) >> ESC_SYNCM_ACTIVATE_LATCH_ECAT_SHIFT)
2483 
2484 /*
2485  * REPEAT (RO)
2486  *
2487  * Repeat Request:
2488  * A toggle of Repeat Request means that a
2489  * mailbox retry is needed (primarily used in
2490  * conjunction with ECAT Read Mailbox)
2491  */
2492 #define ESC_SYNCM_ACTIVATE_REPEAT_MASK (0x2U)
2493 #define ESC_SYNCM_ACTIVATE_REPEAT_SHIFT (1U)
2494 #define ESC_SYNCM_ACTIVATE_REPEAT_GET(x) (((uint8_t)(x) & ESC_SYNCM_ACTIVATE_REPEAT_MASK) >> ESC_SYNCM_ACTIVATE_REPEAT_SHIFT)
2495 
2496 /*
2497  * EN (RW)
2498  *
2499  * SyncManager Enable/Disable:
2500  * 0:Disable:Access to Memory without
2501  * SyncManager control
2502  * 1:Enable:SyncManager is active and
2503  * controls Memory area set in
2504  * configuration
2505  */
2506 #define ESC_SYNCM_ACTIVATE_EN_MASK (0x1U)
2507 #define ESC_SYNCM_ACTIVATE_EN_SHIFT (0U)
2508 #define ESC_SYNCM_ACTIVATE_EN_SET(x) (((uint8_t)(x) << ESC_SYNCM_ACTIVATE_EN_SHIFT) & ESC_SYNCM_ACTIVATE_EN_MASK)
2509 #define ESC_SYNCM_ACTIVATE_EN_GET(x) (((uint8_t)(x) & ESC_SYNCM_ACTIVATE_EN_MASK) >> ESC_SYNCM_ACTIVATE_EN_SHIFT)
2510 
2511 /* Bitfield definition for register of struct array SYNCM: PDI_CTRL */
2512 /*
2513  * REPEAT_ACK (RW)
2514  *
2515  * Repeat Ack:
2516  * If this is set to the same value as that set by
2517  * Repeat Request, the PDI acknowledges the
2518  * execution of a previous set Repeat request.
2519  */
2520 #define ESC_SYNCM_PDI_CTRL_REPEAT_ACK_MASK (0x2U)
2521 #define ESC_SYNCM_PDI_CTRL_REPEAT_ACK_SHIFT (1U)
2522 #define ESC_SYNCM_PDI_CTRL_REPEAT_ACK_SET(x) (((uint8_t)(x) << ESC_SYNCM_PDI_CTRL_REPEAT_ACK_SHIFT) & ESC_SYNCM_PDI_CTRL_REPEAT_ACK_MASK)
2523 #define ESC_SYNCM_PDI_CTRL_REPEAT_ACK_GET(x) (((uint8_t)(x) & ESC_SYNCM_PDI_CTRL_REPEAT_ACK_MASK) >> ESC_SYNCM_PDI_CTRL_REPEAT_ACK_SHIFT)
2524 
2525 /*
2526  * DEACT (RW)
2527  *
2528  * Deactivate SyncManager:
2529  * Read:
2530  * 0:Normal operation, SyncManager
2531  * activated.
2532  * 1:SyncManager deactivated and reset.
2533  * SyncManager locks access to Memory
2534  * area.
2535  * Write:
2536  * 0:Activate SyncManager
2537  * 1:Request SyncManager deactivation
2538  * NOTE:Writing 1 is delayed until the end of the
2539  * frame, which is currently processed.
2540  */
2541 #define ESC_SYNCM_PDI_CTRL_DEACT_MASK (0x1U)
2542 #define ESC_SYNCM_PDI_CTRL_DEACT_SHIFT (0U)
2543 #define ESC_SYNCM_PDI_CTRL_DEACT_SET(x) (((uint8_t)(x) << ESC_SYNCM_PDI_CTRL_DEACT_SHIFT) & ESC_SYNCM_PDI_CTRL_DEACT_MASK)
2544 #define ESC_SYNCM_PDI_CTRL_DEACT_GET(x) (((uint8_t)(x) & ESC_SYNCM_PDI_CTRL_DEACT_MASK) >> ESC_SYNCM_PDI_CTRL_DEACT_SHIFT)
2545 
2546 /* Bitfield definition for register array: RCV_TIME */
2547 /*
2548  * LT (RO)
2549  *
2550  * Local time at the beginning of the last receive
2551  * frame containing a write access to register
2552  * 0x0900.
2553  */
2554 #define ESC_RCV_TIME_LT_MASK (0xFFFFFF00UL)
2555 #define ESC_RCV_TIME_LT_SHIFT (8U)
2556 #define ESC_RCV_TIME_LT_GET(x) (((uint32_t)(x) & ESC_RCV_TIME_LT_MASK) >> ESC_RCV_TIME_LT_SHIFT)
2557 
2558 /*
2559  * REQ (RO)
2560  *
2561  * Write:
2562  * A write access to register 0x0900 with
2563  * BWR or FPWR latches the local time at
2564  * the beginning of the receive frame (start
2565  * first bit of preamble) at each port.
2566  * Write (ESC20, ET1200 exception):
2567  * A write access latches the local time at
2568  * the beginning of the receive frame at
2569  * port 0. It enables the time stamping at
2570  * the other ports.
2571  * Read:
2572  * Local time at the beginning of the last
2573  * receive frame containing a write access
2574  * to this register.
2575  * NOTE:FPWR requires an address match for
2576  * accessing this register like any FPWR command.
2577  * All write commands with address match will
2578  * increment the working counter (e.g., APWR), but
2579  * they will not trigger receive time latching.
2580  */
2581 #define ESC_RCV_TIME_REQ_MASK (0xFFU)
2582 #define ESC_RCV_TIME_REQ_SHIFT (0U)
2583 #define ESC_RCV_TIME_REQ_GET(x) (((uint32_t)(x) & ESC_RCV_TIME_REQ_MASK) >> ESC_RCV_TIME_REQ_SHIFT)
2584 
2585 /* Bitfield definition for register: SYS_TIME */
2586 /*
2587  * ST (RW)
2588  *
2589  */
2590 #define ESC_SYS_TIME_ST_MASK (0xFFFFFFFFFFFFFFFFULL)
2591 #define ESC_SYS_TIME_ST_SHIFT (0U)
2592 #define ESC_SYS_TIME_ST_SET(x) (((uint64_t)(x) << ESC_SYS_TIME_ST_SHIFT) & ESC_SYS_TIME_ST_MASK)
2593 #define ESC_SYS_TIME_ST_GET(x) (((uint64_t)(x) & ESC_SYS_TIME_ST_MASK) >> ESC_SYS_TIME_ST_SHIFT)
2594 
2595 /* Bitfield definition for register: RCVT_ECAT_PU */
2596 /*
2597  * LT (RO)
2598  *
2599  * Local time at the beginning of a frame (start
2600  * first bit of preamble) received at the ECAT
2601  * Processing Unit containing a write access to
2602  * register 0x0900
2603  * NOTE:E.g., if port 0 is open, this register reflects
2604  * the Receive Time Port 0 as a 64 Bit value.
2605  * Any valid EtherCAT write access to register
2606  * 0x0900 triggers latching, not only BWR/FPWR
2607  * commands as with register 0x0900.
2608  */
2609 #define ESC_RCVT_ECAT_PU_LT_MASK (0xFFFFFFFFFFFFFFFFULL)
2610 #define ESC_RCVT_ECAT_PU_LT_SHIFT (0U)
2611 #define ESC_RCVT_ECAT_PU_LT_GET(x) (((uint64_t)(x) & ESC_RCVT_ECAT_PU_LT_MASK) >> ESC_RCVT_ECAT_PU_LT_SHIFT)
2612 
2613 /* Bitfield definition for register: SYS_TIME_OFFSET */
2614 /*
2615  * OFFSET (RW)
2616  *
2617  * Difference between local time and System
2618  * Time. Offset is added to the local time.
2619  */
2620 #define ESC_SYS_TIME_OFFSET_OFFSET_MASK (0xFFFFFFFFFFFFFFFFULL)
2621 #define ESC_SYS_TIME_OFFSET_OFFSET_SHIFT (0U)
2622 #define ESC_SYS_TIME_OFFSET_OFFSET_SET(x) (((uint64_t)(x) << ESC_SYS_TIME_OFFSET_OFFSET_SHIFT) & ESC_SYS_TIME_OFFSET_OFFSET_MASK)
2623 #define ESC_SYS_TIME_OFFSET_OFFSET_GET(x) (((uint64_t)(x) & ESC_SYS_TIME_OFFSET_OFFSET_MASK) >> ESC_SYS_TIME_OFFSET_OFFSET_SHIFT)
2624 
2625 /* Bitfield definition for register: SYS_TIME_DELAY */
2626 /*
2627  * DLY (RW)
2628  *
2629  * Delay between Reference Clock and the
2630  * ESC
2631  */
2632 #define ESC_SYS_TIME_DELAY_DLY_MASK (0xFFFFFFFFUL)
2633 #define ESC_SYS_TIME_DELAY_DLY_SHIFT (0U)
2634 #define ESC_SYS_TIME_DELAY_DLY_SET(x) (((uint32_t)(x) << ESC_SYS_TIME_DELAY_DLY_SHIFT) & ESC_SYS_TIME_DELAY_DLY_MASK)
2635 #define ESC_SYS_TIME_DELAY_DLY_GET(x) (((uint32_t)(x) & ESC_SYS_TIME_DELAY_DLY_MASK) >> ESC_SYS_TIME_DELAY_DLY_SHIFT)
2636 
2637 /* Bitfield definition for register: SYS_TIME_DIFF */
2638 /*
2639  * DIFF (RO)
2640  *
2641  * 0:Local copy of System Time less than
2642  * received System Time
2643  * 1:Local copy of System Time greater than
2644  * or equal to received System Time
2645  */
2646 #define ESC_SYS_TIME_DIFF_DIFF_MASK (0x80000000UL)
2647 #define ESC_SYS_TIME_DIFF_DIFF_SHIFT (31U)
2648 #define ESC_SYS_TIME_DIFF_DIFF_GET(x) (((uint32_t)(x) & ESC_SYS_TIME_DIFF_DIFF_MASK) >> ESC_SYS_TIME_DIFF_DIFF_SHIFT)
2649 
2650 /*
2651  * NUM (RO)
2652  *
2653  * Mean difference between local copy of
2654  * System Time and received System Time
2655  * values
2656  * Difference = Received System Time –
2657  * local copy of System Time
2658  */
2659 #define ESC_SYS_TIME_DIFF_NUM_MASK (0x7FFFFFFFUL)
2660 #define ESC_SYS_TIME_DIFF_NUM_SHIFT (0U)
2661 #define ESC_SYS_TIME_DIFF_NUM_GET(x) (((uint32_t)(x) & ESC_SYS_TIME_DIFF_NUM_MASK) >> ESC_SYS_TIME_DIFF_NUM_SHIFT)
2662 
2663 /* Bitfield definition for register: SPD_CNT_START */
2664 /*
2665  * BW (RW)
2666  *
2667  * Bandwidth for adjustment of local copy of
2668  * System Time (larger values → smaller
2669  * bandwidth and smoother adjustment)
2670  * A write access resets System Time
2671  * Difference (0x092C:0x092F) and Speed
2672  * Counter Diff (0x0932:0x0933).
2673  * Valid values:0x0080 to 0x3FFF
2674  */
2675 #define ESC_SPD_CNT_START_BW_MASK (0x7FFFU)
2676 #define ESC_SPD_CNT_START_BW_SHIFT (0U)
2677 #define ESC_SPD_CNT_START_BW_SET(x) (((uint16_t)(x) << ESC_SPD_CNT_START_BW_SHIFT) & ESC_SPD_CNT_START_BW_MASK)
2678 #define ESC_SPD_CNT_START_BW_GET(x) (((uint16_t)(x) & ESC_SPD_CNT_START_BW_MASK) >> ESC_SPD_CNT_START_BW_SHIFT)
2679 
2680 /* Bitfield definition for register: SPD_CNT_DIFF */
2681 /*
2682  * DIFF (RO)
2683  *
2684  * Representation of the deviation between
2685  * local clock period and Reference Clock's
2686  * clock period (representation:two's
2687  * complement)
2688  * Range:±(Speed Counter Start – 0x7F)
2689  */
2690 #define ESC_SPD_CNT_DIFF_DIFF_MASK (0xFFFFU)
2691 #define ESC_SPD_CNT_DIFF_DIFF_SHIFT (0U)
2692 #define ESC_SPD_CNT_DIFF_DIFF_GET(x) (((uint16_t)(x) & ESC_SPD_CNT_DIFF_DIFF_MASK) >> ESC_SPD_CNT_DIFF_DIFF_SHIFT)
2693 
2694 /* Bitfield definition for register: SYS_TIME_DIFF_FD */
2695 /*
2696  * DEPTH (RW)
2697  *
2698  * Filter depth for averaging the received
2699  * System Time deviation
2700  * IP Core since V2.2.0/V2.02a:
2701  * A write access resets System Time
2702  * Difference (0x092C:0x092F)
2703  */
2704 #define ESC_SYS_TIME_DIFF_FD_DEPTH_MASK (0xFU)
2705 #define ESC_SYS_TIME_DIFF_FD_DEPTH_SHIFT (0U)
2706 #define ESC_SYS_TIME_DIFF_FD_DEPTH_SET(x) (((uint8_t)(x) << ESC_SYS_TIME_DIFF_FD_DEPTH_SHIFT) & ESC_SYS_TIME_DIFF_FD_DEPTH_MASK)
2707 #define ESC_SYS_TIME_DIFF_FD_DEPTH_GET(x) (((uint8_t)(x) & ESC_SYS_TIME_DIFF_FD_DEPTH_MASK) >> ESC_SYS_TIME_DIFF_FD_DEPTH_SHIFT)
2708 
2709 /* Bitfield definition for register: SPD_CNT_FD */
2710 /*
2711  * DEPTH (RW)
2712  *
2713  * Filter depth for averaging the clock period
2714  * deviation
2715  * IP Core since V2.2.0/V2.02a:
2716  * A write access resets the internal speed
2717  * counter filter
2718  */
2719 #define ESC_SPD_CNT_FD_DEPTH_MASK (0xFU)
2720 #define ESC_SPD_CNT_FD_DEPTH_SHIFT (0U)
2721 #define ESC_SPD_CNT_FD_DEPTH_SET(x) (((uint8_t)(x) << ESC_SPD_CNT_FD_DEPTH_SHIFT) & ESC_SPD_CNT_FD_DEPTH_MASK)
2722 #define ESC_SPD_CNT_FD_DEPTH_GET(x) (((uint8_t)(x) & ESC_SPD_CNT_FD_DEPTH_MASK) >> ESC_SPD_CNT_FD_DEPTH_SHIFT)
2723 
2724 /* Bitfield definition for register: RCV_TIME_LM */
2725 /*
2726  * LATCH_MODE (RO)
2727  *
2728  * Receive Time Latch Mode:
2729  * 0:Forwarding mode (used if frames are
2730  * entering the ESC at port 0 first):
2731  * Receive time stamps of ports 1-3 are
2732  * enabled after the write access to
2733  * 0x0900, so the following frame at ports
2734  * 1-3 will be time stamped (this is typically
2735  * the write frame to 0x0900 coming back
2736  * from the network behind the ESC).
2737  * 1:Reverse mode (used if frames are
2738  * entering ESC at port 1-3 first):
2739  * Receive time stamps of ports 1-3 are
2740  * immediately taken over from the internal
2741  * hidden time stamp registers, so the
2742  * previous frame entering the ESC at
2743  * ports 1-3 will be time stamped when the
2744  * write frame to 0x0900 enters port 0 (the
2745  * previous frame at ports 1-3 is typically
2746  * the write frame to 0x0900 coming from
2747  * the master, which will enable time
2748  * stamp
2749  */
2750 #define ESC_RCV_TIME_LM_LATCH_MODE_MASK (0x1U)
2751 #define ESC_RCV_TIME_LM_LATCH_MODE_SHIFT (0U)
2752 #define ESC_RCV_TIME_LM_LATCH_MODE_GET(x) (((uint8_t)(x) & ESC_RCV_TIME_LM_LATCH_MODE_MASK) >> ESC_RCV_TIME_LM_LATCH_MODE_SHIFT)
2753 
2754 /* Bitfield definition for register: CYC_UNIT_CTRL */
2755 /*
2756  * LATCHI1 (RO)
2757  *
2758  * Latch In unit 1:
2759  * 0:ECAT-controlled
2760  * 1:PDI-controlled
2761  * NOTE:Latch interrupt is routed to ECAT/PDI
2762  * depending on this setting
2763  */
2764 #define ESC_CYC_UNIT_CTRL_LATCHI1_MASK (0x20U)
2765 #define ESC_CYC_UNIT_CTRL_LATCHI1_SHIFT (5U)
2766 #define ESC_CYC_UNIT_CTRL_LATCHI1_GET(x) (((uint8_t)(x) & ESC_CYC_UNIT_CTRL_LATCHI1_MASK) >> ESC_CYC_UNIT_CTRL_LATCHI1_SHIFT)
2767 
2768 /*
2769  * LATCHI0 (RO)
2770  *
2771  * Latch In unit 0:
2772  * 0:ECAT-controlled
2773  * 1:PDI-controlled
2774  * NOTE:Latch interrupt is routed to ECAT/PDI
2775  * depending on this setting.
2776  * Always 1 (PDI-controlled) if System Time is PDIcontrolled.
2777  */
2778 #define ESC_CYC_UNIT_CTRL_LATCHI0_MASK (0x10U)
2779 #define ESC_CYC_UNIT_CTRL_LATCHI0_SHIFT (4U)
2780 #define ESC_CYC_UNIT_CTRL_LATCHI0_GET(x) (((uint8_t)(x) & ESC_CYC_UNIT_CTRL_LATCHI0_MASK) >> ESC_CYC_UNIT_CTRL_LATCHI0_SHIFT)
2781 
2782 /*
2783  * SYNCO (RO)
2784  *
2785  * Cyclic Unit and SYNC0 out unit control:
2786  * 0:ECAT-controlled
2787  * 1:PDI-controlled
2788  */
2789 #define ESC_CYC_UNIT_CTRL_SYNCO_MASK (0x1U)
2790 #define ESC_CYC_UNIT_CTRL_SYNCO_SHIFT (0U)
2791 #define ESC_CYC_UNIT_CTRL_SYNCO_GET(x) (((uint8_t)(x) & ESC_CYC_UNIT_CTRL_SYNCO_MASK) >> ESC_CYC_UNIT_CTRL_SYNCO_SHIFT)
2792 
2793 /* Bitfield definition for register: SYNCO_ACT */
2794 /*
2795  * SSDP (RW)
2796  *
2797  * SyncSignal debug pulse (Vasily bit):
2798  * 0:Deactivated
2799  * 1:Immediately generate one ping only on
2800  * SYNC0-1 according to 0x0981[2:1 for
2801  * debugging
2802  * This bit is self-clearing, always read 0.
2803  * All pulses are generated at the same time,
2804  * the cycle time is ignored. The configured
2805  * pulse length is used.
2806  */
2807 #define ESC_SYNCO_ACT_SSDP_MASK (0x80U)
2808 #define ESC_SYNCO_ACT_SSDP_SHIFT (7U)
2809 #define ESC_SYNCO_ACT_SSDP_SET(x) (((uint8_t)(x) << ESC_SYNCO_ACT_SSDP_SHIFT) & ESC_SYNCO_ACT_SSDP_MASK)
2810 #define ESC_SYNCO_ACT_SSDP_GET(x) (((uint8_t)(x) & ESC_SYNCO_ACT_SSDP_MASK) >> ESC_SYNCO_ACT_SSDP_SHIFT)
2811 
2812 /*
2813  * NFC (RW)
2814  *
2815  * Near future configuration (approx.):
2816  * 0:½ DC width future (231 ns or 263 ns)
2817  * 1:~2.1 sec. future (231 ns)
2818  */
2819 #define ESC_SYNCO_ACT_NFC_MASK (0x40U)
2820 #define ESC_SYNCO_ACT_NFC_SHIFT (6U)
2821 #define ESC_SYNCO_ACT_NFC_SET(x) (((uint8_t)(x) << ESC_SYNCO_ACT_NFC_SHIFT) & ESC_SYNCO_ACT_NFC_MASK)
2822 #define ESC_SYNCO_ACT_NFC_GET(x) (((uint8_t)(x) & ESC_SYNCO_ACT_NFC_MASK) >> ESC_SYNCO_ACT_NFC_SHIFT)
2823 
2824 /*
2825  * STPC (RW)
2826  *
2827  * Start Time plausibility check:
2828  * 0:Disabled. SyncSignal generation if Start
2829  * Time is reached.
2830  * 1:Immediate SyncSignal generation if
2831  * Start Time is outside near future (see
2832  * 0x0981[6])
2833  */
2834 #define ESC_SYNCO_ACT_STPC_MASK (0x20U)
2835 #define ESC_SYNCO_ACT_STPC_SHIFT (5U)
2836 #define ESC_SYNCO_ACT_STPC_SET(x) (((uint8_t)(x) << ESC_SYNCO_ACT_STPC_SHIFT) & ESC_SYNCO_ACT_STPC_MASK)
2837 #define ESC_SYNCO_ACT_STPC_GET(x) (((uint8_t)(x) & ESC_SYNCO_ACT_STPC_MASK) >> ESC_SYNCO_ACT_STPC_SHIFT)
2838 
2839 /*
2840  * EXT (RW)
2841  *
2842  * Extension of Start Time Cyclic Operation
2843  * (0x0990:0x0993):
2844  * 0:No extension
2845  * 1:Extend 32 bit written Start Time to 64 bit
2846  */
2847 #define ESC_SYNCO_ACT_EXT_MASK (0x10U)
2848 #define ESC_SYNCO_ACT_EXT_SHIFT (4U)
2849 #define ESC_SYNCO_ACT_EXT_SET(x) (((uint8_t)(x) << ESC_SYNCO_ACT_EXT_SHIFT) & ESC_SYNCO_ACT_EXT_MASK)
2850 #define ESC_SYNCO_ACT_EXT_GET(x) (((uint8_t)(x) & ESC_SYNCO_ACT_EXT_MASK) >> ESC_SYNCO_ACT_EXT_SHIFT)
2851 
2852 /*
2853  * AC (RW)
2854  *
2855  * Auto-activation by writing Start Time Cyclic
2856  * Operation (0x0990:0x0997):
2857  * 0:Disabled
2858  * 1:Auto-activation enabled. 0x0981[0] is
2859  * set automatically after Start Time is
2860  * written.
2861  */
2862 #define ESC_SYNCO_ACT_AC_MASK (0x8U)
2863 #define ESC_SYNCO_ACT_AC_SHIFT (3U)
2864 #define ESC_SYNCO_ACT_AC_SET(x) (((uint8_t)(x) << ESC_SYNCO_ACT_AC_SHIFT) & ESC_SYNCO_ACT_AC_MASK)
2865 #define ESC_SYNCO_ACT_AC_GET(x) (((uint8_t)(x) & ESC_SYNCO_ACT_AC_MASK) >> ESC_SYNCO_ACT_AC_SHIFT)
2866 
2867 /*
2868  * SYNC1_GEN (RW)
2869  *
2870  * SYNC1 generation:
2871  * 0:Deactivated
2872  * 1:SYNC1 pulse is generated
2873  */
2874 #define ESC_SYNCO_ACT_SYNC1_GEN_MASK (0x4U)
2875 #define ESC_SYNCO_ACT_SYNC1_GEN_SHIFT (2U)
2876 #define ESC_SYNCO_ACT_SYNC1_GEN_SET(x) (((uint8_t)(x) << ESC_SYNCO_ACT_SYNC1_GEN_SHIFT) & ESC_SYNCO_ACT_SYNC1_GEN_MASK)
2877 #define ESC_SYNCO_ACT_SYNC1_GEN_GET(x) (((uint8_t)(x) & ESC_SYNCO_ACT_SYNC1_GEN_MASK) >> ESC_SYNCO_ACT_SYNC1_GEN_SHIFT)
2878 
2879 /*
2880  * SYNC0_GEN (RW)
2881  *
2882  * SYNC0 generation:
2883  * 0:Deactivated
2884  * 1:SYNC0 pulse is generated
2885  */
2886 #define ESC_SYNCO_ACT_SYNC0_GEN_MASK (0x2U)
2887 #define ESC_SYNCO_ACT_SYNC0_GEN_SHIFT (1U)
2888 #define ESC_SYNCO_ACT_SYNC0_GEN_SET(x) (((uint8_t)(x) << ESC_SYNCO_ACT_SYNC0_GEN_SHIFT) & ESC_SYNCO_ACT_SYNC0_GEN_MASK)
2889 #define ESC_SYNCO_ACT_SYNC0_GEN_GET(x) (((uint8_t)(x) & ESC_SYNCO_ACT_SYNC0_GEN_MASK) >> ESC_SYNCO_ACT_SYNC0_GEN_SHIFT)
2890 
2891 /*
2892  * SOUA (RW)
2893  *
2894  * Sync Out Unit activation:
2895  * 0:Deactivated
2896  * 1:Activated
2897  */
2898 #define ESC_SYNCO_ACT_SOUA_MASK (0x1U)
2899 #define ESC_SYNCO_ACT_SOUA_SHIFT (0U)
2900 #define ESC_SYNCO_ACT_SOUA_SET(x) (((uint8_t)(x) << ESC_SYNCO_ACT_SOUA_SHIFT) & ESC_SYNCO_ACT_SOUA_MASK)
2901 #define ESC_SYNCO_ACT_SOUA_GET(x) (((uint8_t)(x) & ESC_SYNCO_ACT_SOUA_MASK) >> ESC_SYNCO_ACT_SOUA_SHIFT)
2902 
2903 /* Bitfield definition for register: PULSE_LEN */
2904 /*
2905  * LEN (RO)
2906  *
2907  * Pulse length of SyncSignals (in Units of
2908  * 10ns)
2909  * 0:Acknowledge mode:SyncSignal will be
2910  * cleared by reading SYNC[1:0] Status
2911  * register
2912  */
2913 #define ESC_PULSE_LEN_LEN_MASK (0xFFFFU)
2914 #define ESC_PULSE_LEN_LEN_SHIFT (0U)
2915 #define ESC_PULSE_LEN_LEN_GET(x) (((uint16_t)(x) & ESC_PULSE_LEN_LEN_MASK) >> ESC_PULSE_LEN_LEN_SHIFT)
2916 
2917 /* Bitfield definition for register: ACT_STAT */
2918 /*
2919  * CHK_RSLT (RO)
2920  *
2921  * Start Time Cyclic Operation (0x0990:0x0997)
2922  * plausibility check result when Sync Out Unit
2923  * was activated:
2924  * 0:Start Time was within near future
2925  * 1:Start Time was out of near future
2926  * (0x0981[6])
2927  */
2928 #define ESC_ACT_STAT_CHK_RSLT_MASK (0x4U)
2929 #define ESC_ACT_STAT_CHK_RSLT_SHIFT (2U)
2930 #define ESC_ACT_STAT_CHK_RSLT_GET(x) (((uint8_t)(x) & ESC_ACT_STAT_CHK_RSLT_MASK) >> ESC_ACT_STAT_CHK_RSLT_SHIFT)
2931 
2932 /*
2933  * SYNC1 (RO)
2934  *
2935  * SYNC1 activation state:
2936  * 0:First SYNC1 pulse is not pending
2937  * 1:First SYNC1 pulse is pending
2938  */
2939 #define ESC_ACT_STAT_SYNC1_MASK (0x2U)
2940 #define ESC_ACT_STAT_SYNC1_SHIFT (1U)
2941 #define ESC_ACT_STAT_SYNC1_GET(x) (((uint8_t)(x) & ESC_ACT_STAT_SYNC1_MASK) >> ESC_ACT_STAT_SYNC1_SHIFT)
2942 
2943 /*
2944  * SYNC0 (RO)
2945  *
2946  * SYNC0 activation state:
2947  * 0:First SYNC0 pulse is not pending
2948  * 1:First SYNC0 pulse is pending
2949  */
2950 #define ESC_ACT_STAT_SYNC0_MASK (0x1U)
2951 #define ESC_ACT_STAT_SYNC0_SHIFT (0U)
2952 #define ESC_ACT_STAT_SYNC0_GET(x) (((uint8_t)(x) & ESC_ACT_STAT_SYNC0_MASK) >> ESC_ACT_STAT_SYNC0_SHIFT)
2953 
2954 /* Bitfield definition for register: SYNC0_STAT */
2955 /*
2956  * ACK (RW)
2957  *
2958  * SYNC0 state for Acknowledge mode.
2959  * SYNC0 in Acknowledge mode is cleared by
2960  * reading this register from PDI, use only in
2961  * Acknowledge mode
2962  */
2963 #define ESC_SYNC0_STAT_ACK_MASK (0x1U)
2964 #define ESC_SYNC0_STAT_ACK_SHIFT (0U)
2965 #define ESC_SYNC0_STAT_ACK_SET(x) (((uint8_t)(x) << ESC_SYNC0_STAT_ACK_SHIFT) & ESC_SYNC0_STAT_ACK_MASK)
2966 #define ESC_SYNC0_STAT_ACK_GET(x) (((uint8_t)(x) & ESC_SYNC0_STAT_ACK_MASK) >> ESC_SYNC0_STAT_ACK_SHIFT)
2967 
2968 /* Bitfield definition for register: SYNC1_STAT */
2969 /*
2970  * ACK (RW)
2971  *
2972  * SYNC1 state for Acknowledge mode.
2973  * SYNC1 in Acknowledge mode is cleared by
2974  * reading this register from PDI, use only in
2975  * Acknowledge mode
2976  */
2977 #define ESC_SYNC1_STAT_ACK_MASK (0x1U)
2978 #define ESC_SYNC1_STAT_ACK_SHIFT (0U)
2979 #define ESC_SYNC1_STAT_ACK_SET(x) (((uint8_t)(x) << ESC_SYNC1_STAT_ACK_SHIFT) & ESC_SYNC1_STAT_ACK_MASK)
2980 #define ESC_SYNC1_STAT_ACK_GET(x) (((uint8_t)(x) & ESC_SYNC1_STAT_ACK_MASK) >> ESC_SYNC1_STAT_ACK_SHIFT)
2981 
2982 /* Bitfield definition for register: START_TIME_CO */
2983 /*
2984  * ST (RW)
2985  *
2986  * Write:Start time (System time) of cyclic
2987  * operation in ns
2988  * Read:System time of next SYNC0 pulse in
2989  * ns
2990  */
2991 #define ESC_START_TIME_CO_ST_MASK (0xFFFFFFFFFFFFFFFFULL)
2992 #define ESC_START_TIME_CO_ST_SHIFT (0U)
2993 #define ESC_START_TIME_CO_ST_SET(x) (((uint64_t)(x) << ESC_START_TIME_CO_ST_SHIFT) & ESC_START_TIME_CO_ST_MASK)
2994 #define ESC_START_TIME_CO_ST_GET(x) (((uint64_t)(x) & ESC_START_TIME_CO_ST_MASK) >> ESC_START_TIME_CO_ST_SHIFT)
2995 
2996 /* Bitfield definition for register: NXT_SYNC1_PULSE */
2997 /*
2998  * TIME (RO)
2999  *
3000  * System time of next SYNC1 pulse in ns
3001  */
3002 #define ESC_NXT_SYNC1_PULSE_TIME_MASK (0xFFFFFFFFFFFFFFFFULL)
3003 #define ESC_NXT_SYNC1_PULSE_TIME_SHIFT (0U)
3004 #define ESC_NXT_SYNC1_PULSE_TIME_GET(x) (((uint64_t)(x) & ESC_NXT_SYNC1_PULSE_TIME_MASK) >> ESC_NXT_SYNC1_PULSE_TIME_SHIFT)
3005 
3006 /* Bitfield definition for register: SYNC0_CYC_TIME */
3007 /*
3008  * CYC (RW)
3009  *
3010  * Time between two consecutive SYNC0
3011  * pulses in ns.
3012  * 0:Single shot mode, generate only one
3013  * SYNC0 pulse.
3014  */
3015 #define ESC_SYNC0_CYC_TIME_CYC_MASK (0xFFFFFFFFUL)
3016 #define ESC_SYNC0_CYC_TIME_CYC_SHIFT (0U)
3017 #define ESC_SYNC0_CYC_TIME_CYC_SET(x) (((uint32_t)(x) << ESC_SYNC0_CYC_TIME_CYC_SHIFT) & ESC_SYNC0_CYC_TIME_CYC_MASK)
3018 #define ESC_SYNC0_CYC_TIME_CYC_GET(x) (((uint32_t)(x) & ESC_SYNC0_CYC_TIME_CYC_MASK) >> ESC_SYNC0_CYC_TIME_CYC_SHIFT)
3019 
3020 /* Bitfield definition for register: SYNC1_CYC_TIME */
3021 /*
3022  * CYC (RW)
3023  *
3024  * Time between SYNC0 pulse and SYNC1
3025  * pulse in ns
3026  */
3027 #define ESC_SYNC1_CYC_TIME_CYC_MASK (0xFFFFFFFFUL)
3028 #define ESC_SYNC1_CYC_TIME_CYC_SHIFT (0U)
3029 #define ESC_SYNC1_CYC_TIME_CYC_SET(x) (((uint32_t)(x) << ESC_SYNC1_CYC_TIME_CYC_SHIFT) & ESC_SYNC1_CYC_TIME_CYC_MASK)
3030 #define ESC_SYNC1_CYC_TIME_CYC_GET(x) (((uint32_t)(x) & ESC_SYNC1_CYC_TIME_CYC_MASK) >> ESC_SYNC1_CYC_TIME_CYC_SHIFT)
3031 
3032 /* Bitfield definition for register: LATCH0_CTRL */
3033 /*
3034  * NEG_EDGE (RW)
3035  *
3036  * Latch0 negative edge:
3037  * 0:Continuous Latch active
3038  * 1:Single event (only first event active)
3039  */
3040 #define ESC_LATCH0_CTRL_NEG_EDGE_MASK (0x2U)
3041 #define ESC_LATCH0_CTRL_NEG_EDGE_SHIFT (1U)
3042 #define ESC_LATCH0_CTRL_NEG_EDGE_SET(x) (((uint8_t)(x) << ESC_LATCH0_CTRL_NEG_EDGE_SHIFT) & ESC_LATCH0_CTRL_NEG_EDGE_MASK)
3043 #define ESC_LATCH0_CTRL_NEG_EDGE_GET(x) (((uint8_t)(x) & ESC_LATCH0_CTRL_NEG_EDGE_MASK) >> ESC_LATCH0_CTRL_NEG_EDGE_SHIFT)
3044 
3045 /*
3046  * POS_EDGE (RW)
3047  *
3048  * Latch0 positive edge:
3049  * 0:Continuous Latch active
3050  * 1:Single event (only first event active)
3051  */
3052 #define ESC_LATCH0_CTRL_POS_EDGE_MASK (0x1U)
3053 #define ESC_LATCH0_CTRL_POS_EDGE_SHIFT (0U)
3054 #define ESC_LATCH0_CTRL_POS_EDGE_SET(x) (((uint8_t)(x) << ESC_LATCH0_CTRL_POS_EDGE_SHIFT) & ESC_LATCH0_CTRL_POS_EDGE_MASK)
3055 #define ESC_LATCH0_CTRL_POS_EDGE_GET(x) (((uint8_t)(x) & ESC_LATCH0_CTRL_POS_EDGE_MASK) >> ESC_LATCH0_CTRL_POS_EDGE_SHIFT)
3056 
3057 /* Bitfield definition for register: LATCH1_CTRL */
3058 /*
3059  * NEG_EDGE (RW)
3060  *
3061  * Latch1 negative edge:
3062  * 0:Continuous Latch active
3063  * 1:Single event (only first event active)
3064  */
3065 #define ESC_LATCH1_CTRL_NEG_EDGE_MASK (0x2U)
3066 #define ESC_LATCH1_CTRL_NEG_EDGE_SHIFT (1U)
3067 #define ESC_LATCH1_CTRL_NEG_EDGE_SET(x) (((uint8_t)(x) << ESC_LATCH1_CTRL_NEG_EDGE_SHIFT) & ESC_LATCH1_CTRL_NEG_EDGE_MASK)
3068 #define ESC_LATCH1_CTRL_NEG_EDGE_GET(x) (((uint8_t)(x) & ESC_LATCH1_CTRL_NEG_EDGE_MASK) >> ESC_LATCH1_CTRL_NEG_EDGE_SHIFT)
3069 
3070 /*
3071  * POS_EDGE (RW)
3072  *
3073  * Latch1 positive edge:
3074  * 0:Continuous Latch active
3075  * 1:Single event (only first event active)
3076  */
3077 #define ESC_LATCH1_CTRL_POS_EDGE_MASK (0x1U)
3078 #define ESC_LATCH1_CTRL_POS_EDGE_SHIFT (0U)
3079 #define ESC_LATCH1_CTRL_POS_EDGE_SET(x) (((uint8_t)(x) << ESC_LATCH1_CTRL_POS_EDGE_SHIFT) & ESC_LATCH1_CTRL_POS_EDGE_MASK)
3080 #define ESC_LATCH1_CTRL_POS_EDGE_GET(x) (((uint8_t)(x) & ESC_LATCH1_CTRL_POS_EDGE_MASK) >> ESC_LATCH1_CTRL_POS_EDGE_SHIFT)
3081 
3082 /* Bitfield definition for register: LATCH0_STAT */
3083 /*
3084  * PIN_STAT (RO)
3085  *
3086  * Latch0 pin state
3087  */
3088 #define ESC_LATCH0_STAT_PIN_STAT_MASK (0x4U)
3089 #define ESC_LATCH0_STAT_PIN_STAT_SHIFT (2U)
3090 #define ESC_LATCH0_STAT_PIN_STAT_GET(x) (((uint8_t)(x) & ESC_LATCH0_STAT_PIN_STAT_MASK) >> ESC_LATCH0_STAT_PIN_STAT_SHIFT)
3091 
3092 /*
3093  * NEG_EDGE (RO)
3094  *
3095  * Event Latch0 negative edge.
3096  * 0:Negative edge not detected or
3097  * continuous mode
3098  * 1:Negative edge detected in single event
3099  * mode only.
3100  * Flag cleared by reading out Latch0 Time
3101  * Negative Edge.
3102  */
3103 #define ESC_LATCH0_STAT_NEG_EDGE_MASK (0x2U)
3104 #define ESC_LATCH0_STAT_NEG_EDGE_SHIFT (1U)
3105 #define ESC_LATCH0_STAT_NEG_EDGE_GET(x) (((uint8_t)(x) & ESC_LATCH0_STAT_NEG_EDGE_MASK) >> ESC_LATCH0_STAT_NEG_EDGE_SHIFT)
3106 
3107 /*
3108  * POS_EDGE (RO)
3109  *
3110  * Event Latch0 positive edge.
3111  * 0:Positive edge not detected or
3112  * continuous mode
3113  * 1:Positive edge detected in single event
3114  * mode only.
3115  * Flag cleared by reading out Latch0 Time
3116  * Positive Edge.
3117  */
3118 #define ESC_LATCH0_STAT_POS_EDGE_MASK (0x1U)
3119 #define ESC_LATCH0_STAT_POS_EDGE_SHIFT (0U)
3120 #define ESC_LATCH0_STAT_POS_EDGE_GET(x) (((uint8_t)(x) & ESC_LATCH0_STAT_POS_EDGE_MASK) >> ESC_LATCH0_STAT_POS_EDGE_SHIFT)
3121 
3122 /* Bitfield definition for register: LATCH1_STAT */
3123 /*
3124  * PIN_STAT (RO)
3125  *
3126  * Latch1 pin state
3127  */
3128 #define ESC_LATCH1_STAT_PIN_STAT_MASK (0x4U)
3129 #define ESC_LATCH1_STAT_PIN_STAT_SHIFT (2U)
3130 #define ESC_LATCH1_STAT_PIN_STAT_GET(x) (((uint8_t)(x) & ESC_LATCH1_STAT_PIN_STAT_MASK) >> ESC_LATCH1_STAT_PIN_STAT_SHIFT)
3131 
3132 /*
3133  * NEG_EDGE (RO)
3134  *
3135  * Event Latch1 negative edge.
3136  * 0:Negative edge not detected or
3137  * continuous mode
3138  * 1:Negative edge detected in single event
3139  * mode only.
3140  * Flag cleared by reading out Latch1 Time
3141  * Negative Edge.
3142  */
3143 #define ESC_LATCH1_STAT_NEG_EDGE_MASK (0x2U)
3144 #define ESC_LATCH1_STAT_NEG_EDGE_SHIFT (1U)
3145 #define ESC_LATCH1_STAT_NEG_EDGE_GET(x) (((uint8_t)(x) & ESC_LATCH1_STAT_NEG_EDGE_MASK) >> ESC_LATCH1_STAT_NEG_EDGE_SHIFT)
3146 
3147 /*
3148  * POS_EDGE (RO)
3149  *
3150  * Event Latch1 positive edge.
3151  * 0:Positive edge not detected or
3152  * continuous mode
3153  * 1:Positive edge detected in single event
3154  * mode only.
3155  * Flag cleared by reading out Latch1 Time
3156  * Positive Edge.
3157  */
3158 #define ESC_LATCH1_STAT_POS_EDGE_MASK (0x1U)
3159 #define ESC_LATCH1_STAT_POS_EDGE_SHIFT (0U)
3160 #define ESC_LATCH1_STAT_POS_EDGE_GET(x) (((uint8_t)(x) & ESC_LATCH1_STAT_POS_EDGE_MASK) >> ESC_LATCH1_STAT_POS_EDGE_SHIFT)
3161 
3162 /* Bitfield definition for register: LATCH0_TIME_PE */
3163 /*
3164  * TIME (RW)
3165  *
3166  * System time at the positive edge of the
3167  * Latch0 signal.
3168  */
3169 #define ESC_LATCH0_TIME_PE_TIME_MASK (0xFFFFFFFFFFFFFFFFULL)
3170 #define ESC_LATCH0_TIME_PE_TIME_SHIFT (0U)
3171 #define ESC_LATCH0_TIME_PE_TIME_SET(x) (((uint64_t)(x) << ESC_LATCH0_TIME_PE_TIME_SHIFT) & ESC_LATCH0_TIME_PE_TIME_MASK)
3172 #define ESC_LATCH0_TIME_PE_TIME_GET(x) (((uint64_t)(x) & ESC_LATCH0_TIME_PE_TIME_MASK) >> ESC_LATCH0_TIME_PE_TIME_SHIFT)
3173 
3174 /* Bitfield definition for register: LATCH0_TIME_NE */
3175 /*
3176  * TIME (RW)
3177  *
3178  * System time at the negative edge of the
3179  * Latch0 signal.
3180  */
3181 #define ESC_LATCH0_TIME_NE_TIME_MASK (0xFFFFFFFFFFFFFFFFULL)
3182 #define ESC_LATCH0_TIME_NE_TIME_SHIFT (0U)
3183 #define ESC_LATCH0_TIME_NE_TIME_SET(x) (((uint64_t)(x) << ESC_LATCH0_TIME_NE_TIME_SHIFT) & ESC_LATCH0_TIME_NE_TIME_MASK)
3184 #define ESC_LATCH0_TIME_NE_TIME_GET(x) (((uint64_t)(x) & ESC_LATCH0_TIME_NE_TIME_MASK) >> ESC_LATCH0_TIME_NE_TIME_SHIFT)
3185 
3186 /* Bitfield definition for register: LATCH1_TIME_PE */
3187 /*
3188  * TIME (RW)
3189  *
3190  * System time at the positive edge of the
3191  * Latch1 signal.
3192  */
3193 #define ESC_LATCH1_TIME_PE_TIME_MASK (0xFFFFFFFFFFFFFFFFULL)
3194 #define ESC_LATCH1_TIME_PE_TIME_SHIFT (0U)
3195 #define ESC_LATCH1_TIME_PE_TIME_SET(x) (((uint64_t)(x) << ESC_LATCH1_TIME_PE_TIME_SHIFT) & ESC_LATCH1_TIME_PE_TIME_MASK)
3196 #define ESC_LATCH1_TIME_PE_TIME_GET(x) (((uint64_t)(x) & ESC_LATCH1_TIME_PE_TIME_MASK) >> ESC_LATCH1_TIME_PE_TIME_SHIFT)
3197 
3198 /* Bitfield definition for register: LATCH1_TIME_NE */
3199 /*
3200  * TIME (RW)
3201  *
3202  * System time at the negative edge of the
3203  * Latch1 signal.
3204  */
3205 #define ESC_LATCH1_TIME_NE_TIME_MASK (0xFFFFFFFFFFFFFFFFULL)
3206 #define ESC_LATCH1_TIME_NE_TIME_SHIFT (0U)
3207 #define ESC_LATCH1_TIME_NE_TIME_SET(x) (((uint64_t)(x) << ESC_LATCH1_TIME_NE_TIME_SHIFT) & ESC_LATCH1_TIME_NE_TIME_MASK)
3208 #define ESC_LATCH1_TIME_NE_TIME_GET(x) (((uint64_t)(x) & ESC_LATCH1_TIME_NE_TIME_MASK) >> ESC_LATCH1_TIME_NE_TIME_SHIFT)
3209 
3210 /* Bitfield definition for register: ECAT_BUF_CET */
3211 /*
3212  * TIME (RO)
3213  *
3214  * Local time at the beginning of the frame
3215  * which causes at least one SyncManager to
3216  * assert an ECAT event
3217  */
3218 #define ESC_ECAT_BUF_CET_TIME_MASK (0xFFFFFFFFUL)
3219 #define ESC_ECAT_BUF_CET_TIME_SHIFT (0U)
3220 #define ESC_ECAT_BUF_CET_TIME_GET(x) (((uint32_t)(x) & ESC_ECAT_BUF_CET_TIME_MASK) >> ESC_ECAT_BUF_CET_TIME_SHIFT)
3221 
3222 /* Bitfield definition for register: PDI_BUF_SET */
3223 /*
3224  * TIME (RO)
3225  *
3226  * Local time when at least one SyncManager
3227  * asserts a PDI buffer start event
3228  */
3229 #define ESC_PDI_BUF_SET_TIME_MASK (0xFFFFFFFFUL)
3230 #define ESC_PDI_BUF_SET_TIME_SHIFT (0U)
3231 #define ESC_PDI_BUF_SET_TIME_GET(x) (((uint32_t)(x) & ESC_PDI_BUF_SET_TIME_MASK) >> ESC_PDI_BUF_SET_TIME_SHIFT)
3232 
3233 /* Bitfield definition for register: PDI_BUF_CET */
3234 /*
3235  * TIME (RO)
3236  *
3237  * Local time when at least one SyncManager
3238  * asserts a PDI buffer change event
3239  */
3240 #define ESC_PDI_BUF_CET_TIME_MASK (0xFFFFFFFFUL)
3241 #define ESC_PDI_BUF_CET_TIME_SHIFT (0U)
3242 #define ESC_PDI_BUF_CET_TIME_GET(x) (((uint32_t)(x) & ESC_PDI_BUF_CET_TIME_MASK) >> ESC_PDI_BUF_CET_TIME_SHIFT)
3243 
3244 /* Bitfield definition for register: PID */
3245 /*
3246  * PID (RO)
3247  *
3248  * Product ID
3249  */
3250 #define ESC_PID_PID_MASK (0xFFFFFFFFFFFFFFFFULL)
3251 #define ESC_PID_PID_SHIFT (0U)
3252 #define ESC_PID_PID_GET(x) (((uint64_t)(x) & ESC_PID_PID_MASK) >> ESC_PID_PID_SHIFT)
3253 
3254 /* Bitfield definition for register: VID */
3255 /*
3256  * VID (RO)
3257  *
3258  * Vendor ID:
3259  * 23-0: Company
3260  * 31-24: Department
3261  * NOTE:Test Vendor IDs have [31:28]=0xE
3262  */
3263 #define ESC_VID_VID_MASK (0xFFFFFFFFFFFFFFFFULL)
3264 #define ESC_VID_VID_SHIFT (0U)
3265 #define ESC_VID_VID_GET(x) (((uint64_t)(x) & ESC_VID_VID_MASK) >> ESC_VID_VID_SHIFT)
3266 
3267 /* Bitfield definition for register: DIO_OUT_DATA */
3268 /*
3269  * OD (RO)
3270  *
3271  * Output Data
3272  */
3273 #define ESC_DIO_OUT_DATA_OD_MASK (0xFFFFFFFFUL)
3274 #define ESC_DIO_OUT_DATA_OD_SHIFT (0U)
3275 #define ESC_DIO_OUT_DATA_OD_GET(x) (((uint32_t)(x) & ESC_DIO_OUT_DATA_OD_MASK) >> ESC_DIO_OUT_DATA_OD_SHIFT)
3276 
3277 /* Bitfield definition for register: GPO */
3278 /*
3279  * GPOD (RW)
3280  *
3281  * General Purpose Output Data
3282  */
3283 #define ESC_GPO_GPOD_MASK (0xFFFFFFFFFFFFFFFFULL)
3284 #define ESC_GPO_GPOD_SHIFT (0U)
3285 #define ESC_GPO_GPOD_SET(x) (((uint64_t)(x) << ESC_GPO_GPOD_SHIFT) & ESC_GPO_GPOD_MASK)
3286 #define ESC_GPO_GPOD_GET(x) (((uint64_t)(x) & ESC_GPO_GPOD_MASK) >> ESC_GPO_GPOD_SHIFT)
3287 
3288 /* Bitfield definition for register: GPI */
3289 /*
3290  * GPID (RO)
3291  *
3292  * General Purpose Input Data
3293  */
3294 #define ESC_GPI_GPID_MASK (0xFFFFFFFFFFFFFFFFULL)
3295 #define ESC_GPI_GPID_SHIFT (0U)
3296 #define ESC_GPI_GPID_GET(x) (((uint64_t)(x) & ESC_GPI_GPID_MASK) >> ESC_GPI_GPID_SHIFT)
3297 
3298 /* Bitfield definition for register: USER_RAM_BYTE0 */
3299 /*
3300  * EXTF (RW)
3301  *
3302  * Number of extended feature bits
3303  */
3304 #define ESC_USER_RAM_BYTE0_EXTF_MASK (0xFFU)
3305 #define ESC_USER_RAM_BYTE0_EXTF_SHIFT (0U)
3306 #define ESC_USER_RAM_BYTE0_EXTF_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE0_EXTF_SHIFT) & ESC_USER_RAM_BYTE0_EXTF_MASK)
3307 #define ESC_USER_RAM_BYTE0_EXTF_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE0_EXTF_MASK) >> ESC_USER_RAM_BYTE0_EXTF_SHIFT)
3308 
3309 /* Bitfield definition for register: USER_RAM_BYTE1 */
3310 /*
3311  * PRWO (RW)
3312  *
3313  * Physical Read/Write Offset (0x0108:0x0109)
3314  */
3315 #define ESC_USER_RAM_BYTE1_PRWO_MASK (0x80U)
3316 #define ESC_USER_RAM_BYTE1_PRWO_SHIFT (7U)
3317 #define ESC_USER_RAM_BYTE1_PRWO_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE1_PRWO_SHIFT) & ESC_USER_RAM_BYTE1_PRWO_MASK)
3318 #define ESC_USER_RAM_BYTE1_PRWO_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE1_PRWO_MASK) >> ESC_USER_RAM_BYTE1_PRWO_SHIFT)
3319 
3320 /*
3321  * AEMW (RW)
3322  *
3323  * AL Event Mask writable (0x0204:0x0207)
3324  */
3325 #define ESC_USER_RAM_BYTE1_AEMW_MASK (0x40U)
3326 #define ESC_USER_RAM_BYTE1_AEMW_SHIFT (6U)
3327 #define ESC_USER_RAM_BYTE1_AEMW_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE1_AEMW_SHIFT) & ESC_USER_RAM_BYTE1_AEMW_MASK)
3328 #define ESC_USER_RAM_BYTE1_AEMW_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE1_AEMW_MASK) >> ESC_USER_RAM_BYTE1_AEMW_SHIFT)
3329 
3330 /*
3331  * GPO (RW)
3332  *
3333  * General Purpose Outputs (0x0F10:0x0F17)
3334  */
3335 #define ESC_USER_RAM_BYTE1_GPO_MASK (0x20U)
3336 #define ESC_USER_RAM_BYTE1_GPO_SHIFT (5U)
3337 #define ESC_USER_RAM_BYTE1_GPO_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE1_GPO_SHIFT) & ESC_USER_RAM_BYTE1_GPO_MASK)
3338 #define ESC_USER_RAM_BYTE1_GPO_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE1_GPO_MASK) >> ESC_USER_RAM_BYTE1_GPO_SHIFT)
3339 
3340 /*
3341  * GPI (RW)
3342  *
3343  * General Purpose Inputs (0x0F18:0x0F1F)
3344  */
3345 #define ESC_USER_RAM_BYTE1_GPI_MASK (0x10U)
3346 #define ESC_USER_RAM_BYTE1_GPI_SHIFT (4U)
3347 #define ESC_USER_RAM_BYTE1_GPI_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE1_GPI_SHIFT) & ESC_USER_RAM_BYTE1_GPI_MASK)
3348 #define ESC_USER_RAM_BYTE1_GPI_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE1_GPI_MASK) >> ESC_USER_RAM_BYTE1_GPI_SHIFT)
3349 
3350 /*
3351  * CSA (RW)
3352  *
3353  * Configured Station Alias (0x0012:0x0013)
3354  */
3355 #define ESC_USER_RAM_BYTE1_CSA_MASK (0x8U)
3356 #define ESC_USER_RAM_BYTE1_CSA_SHIFT (3U)
3357 #define ESC_USER_RAM_BYTE1_CSA_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE1_CSA_SHIFT) & ESC_USER_RAM_BYTE1_CSA_MASK)
3358 #define ESC_USER_RAM_BYTE1_CSA_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE1_CSA_MASK) >> ESC_USER_RAM_BYTE1_CSA_SHIFT)
3359 
3360 /*
3361  * EIM (RW)
3362  *
3363  * ECAT Interrupt Mask (0x0200:0x0201)
3364  */
3365 #define ESC_USER_RAM_BYTE1_EIM_MASK (0x4U)
3366 #define ESC_USER_RAM_BYTE1_EIM_SHIFT (2U)
3367 #define ESC_USER_RAM_BYTE1_EIM_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE1_EIM_SHIFT) & ESC_USER_RAM_BYTE1_EIM_MASK)
3368 #define ESC_USER_RAM_BYTE1_EIM_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE1_EIM_MASK) >> ESC_USER_RAM_BYTE1_EIM_SHIFT)
3369 
3370 /*
3371  * ALSCR (RW)
3372  *
3373  * AL Status Code Register (0x0134:0x0135)
3374  */
3375 #define ESC_USER_RAM_BYTE1_ALSCR_MASK (0x2U)
3376 #define ESC_USER_RAM_BYTE1_ALSCR_SHIFT (1U)
3377 #define ESC_USER_RAM_BYTE1_ALSCR_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE1_ALSCR_SHIFT) & ESC_USER_RAM_BYTE1_ALSCR_MASK)
3378 #define ESC_USER_RAM_BYTE1_ALSCR_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE1_ALSCR_MASK) >> ESC_USER_RAM_BYTE1_ALSCR_SHIFT)
3379 
3380 /*
3381  * EDLCR (RW)
3382  *
3383  * Extended DL Control Register (0x0102:0x0103)
3384  */
3385 #define ESC_USER_RAM_BYTE1_EDLCR_MASK (0x1U)
3386 #define ESC_USER_RAM_BYTE1_EDLCR_SHIFT (0U)
3387 #define ESC_USER_RAM_BYTE1_EDLCR_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE1_EDLCR_SHIFT) & ESC_USER_RAM_BYTE1_EDLCR_MASK)
3388 #define ESC_USER_RAM_BYTE1_EDLCR_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE1_EDLCR_MASK) >> ESC_USER_RAM_BYTE1_EDLCR_SHIFT)
3389 
3390 /* Bitfield definition for register: USER_RAM_BYTE2 */
3391 /*
3392  * ESCFG (RW)
3393  *
3394  * EEPROM Size configurable (0x0502[7]):
3395  * 0:EEPROM Size fixed to sizes up to 16 Kbit
3396  * 1:EEPROM Size configurable
3397  */
3398 #define ESC_USER_RAM_BYTE2_ESCFG_MASK (0x80U)
3399 #define ESC_USER_RAM_BYTE2_ESCFG_SHIFT (7U)
3400 #define ESC_USER_RAM_BYTE2_ESCFG_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE2_ESCFG_SHIFT) & ESC_USER_RAM_BYTE2_ESCFG_MASK)
3401 #define ESC_USER_RAM_BYTE2_ESCFG_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE2_ESCFG_MASK) >> ESC_USER_RAM_BYTE2_ESCFG_SHIFT)
3402 
3403 /*
3404  * EPUPEC (RW)
3405  *
3406  * ECAT Processing Unit/PDI Error Counter
3407  * (0x030C:0x030D)
3408  */
3409 #define ESC_USER_RAM_BYTE2_EPUPEC_MASK (0x40U)
3410 #define ESC_USER_RAM_BYTE2_EPUPEC_SHIFT (6U)
3411 #define ESC_USER_RAM_BYTE2_EPUPEC_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE2_EPUPEC_SHIFT) & ESC_USER_RAM_BYTE2_EPUPEC_MASK)
3412 #define ESC_USER_RAM_BYTE2_EPUPEC_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE2_EPUPEC_MASK) >> ESC_USER_RAM_BYTE2_EPUPEC_SHIFT)
3413 
3414 /*
3415  * DCSMET (RW)
3416  *
3417  * DC SyncManager Event Times (0x09F0:0x09FF)
3418  */
3419 #define ESC_USER_RAM_BYTE2_DCSMET_MASK (0x20U)
3420 #define ESC_USER_RAM_BYTE2_DCSMET_SHIFT (5U)
3421 #define ESC_USER_RAM_BYTE2_DCSMET_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE2_DCSMET_SHIFT) & ESC_USER_RAM_BYTE2_DCSMET_MASK)
3422 #define ESC_USER_RAM_BYTE2_DCSMET_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE2_DCSMET_MASK) >> ESC_USER_RAM_BYTE2_DCSMET_SHIFT)
3423 
3424 /*
3425  * RESET (RW)
3426  *
3427  * Reset (0x0040:0x0041)
3428  */
3429 #define ESC_USER_RAM_BYTE2_RESET_MASK (0x8U)
3430 #define ESC_USER_RAM_BYTE2_RESET_SHIFT (3U)
3431 #define ESC_USER_RAM_BYTE2_RESET_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE2_RESET_SHIFT) & ESC_USER_RAM_BYTE2_RESET_MASK)
3432 #define ESC_USER_RAM_BYTE2_RESET_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE2_RESET_MASK) >> ESC_USER_RAM_BYTE2_RESET_SHIFT)
3433 
3434 /*
3435  * WP (RW)
3436  *
3437  * Write Protection (0x0020:0x0031)
3438  */
3439 #define ESC_USER_RAM_BYTE2_WP_MASK (0x4U)
3440 #define ESC_USER_RAM_BYTE2_WP_SHIFT (2U)
3441 #define ESC_USER_RAM_BYTE2_WP_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE2_WP_SHIFT) & ESC_USER_RAM_BYTE2_WP_MASK)
3442 #define ESC_USER_RAM_BYTE2_WP_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE2_WP_MASK) >> ESC_USER_RAM_BYTE2_WP_SHIFT)
3443 
3444 /*
3445  * WDGCNT (RW)
3446  *
3447  * Watchdog counters (0x0442:0x0443)
3448  */
3449 #define ESC_USER_RAM_BYTE2_WDGCNT_MASK (0x2U)
3450 #define ESC_USER_RAM_BYTE2_WDGCNT_SHIFT (1U)
3451 #define ESC_USER_RAM_BYTE2_WDGCNT_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE2_WDGCNT_SHIFT) & ESC_USER_RAM_BYTE2_WDGCNT_MASK)
3452 #define ESC_USER_RAM_BYTE2_WDGCNT_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE2_WDGCNT_MASK) >> ESC_USER_RAM_BYTE2_WDGCNT_SHIFT)
3453 
3454 /*
3455  * WDW (RW)
3456  *
3457  * Watchdog divider writable (0x0400:0x0401) and
3458  * Watchdog PDI (0x0410:0x0411)
3459  */
3460 #define ESC_USER_RAM_BYTE2_WDW_MASK (0x1U)
3461 #define ESC_USER_RAM_BYTE2_WDW_SHIFT (0U)
3462 #define ESC_USER_RAM_BYTE2_WDW_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE2_WDW_SHIFT) & ESC_USER_RAM_BYTE2_WDW_MASK)
3463 #define ESC_USER_RAM_BYTE2_WDW_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE2_WDW_MASK) >> ESC_USER_RAM_BYTE2_WDW_SHIFT)
3464 
3465 /* Bitfield definition for register: USER_RAM_BYTE3 */
3466 /*
3467  * RLED (RW)
3468  *
3469  * Run LED (DEV_STATE LED)
3470  */
3471 #define ESC_USER_RAM_BYTE3_RLED_MASK (0x80U)
3472 #define ESC_USER_RAM_BYTE3_RLED_SHIFT (7U)
3473 #define ESC_USER_RAM_BYTE3_RLED_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE3_RLED_SHIFT) & ESC_USER_RAM_BYTE3_RLED_MASK)
3474 #define ESC_USER_RAM_BYTE3_RLED_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE3_RLED_MASK) >> ESC_USER_RAM_BYTE3_RLED_SHIFT)
3475 
3476 /*
3477  * ELDE (RW)
3478  *
3479  * Enhanced Link Detection EBUS
3480  */
3481 #define ESC_USER_RAM_BYTE3_ELDE_MASK (0x40U)
3482 #define ESC_USER_RAM_BYTE3_ELDE_SHIFT (6U)
3483 #define ESC_USER_RAM_BYTE3_ELDE_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE3_ELDE_SHIFT) & ESC_USER_RAM_BYTE3_ELDE_MASK)
3484 #define ESC_USER_RAM_BYTE3_ELDE_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE3_ELDE_MASK) >> ESC_USER_RAM_BYTE3_ELDE_SHIFT)
3485 
3486 /*
3487  * ELDM (RW)
3488  *
3489  * Enhanced Link Detection MII
3490  */
3491 #define ESC_USER_RAM_BYTE3_ELDM_MASK (0x20U)
3492 #define ESC_USER_RAM_BYTE3_ELDM_SHIFT (5U)
3493 #define ESC_USER_RAM_BYTE3_ELDM_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE3_ELDM_SHIFT) & ESC_USER_RAM_BYTE3_ELDM_MASK)
3494 #define ESC_USER_RAM_BYTE3_ELDM_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE3_ELDM_MASK) >> ESC_USER_RAM_BYTE3_ELDM_SHIFT)
3495 
3496 /*
3497  * MMI (RW)
3498  *
3499  * MII Management Interface (0x0510:0x0515)
3500  */
3501 #define ESC_USER_RAM_BYTE3_MMI_MASK (0x10U)
3502 #define ESC_USER_RAM_BYTE3_MMI_SHIFT (4U)
3503 #define ESC_USER_RAM_BYTE3_MMI_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE3_MMI_SHIFT) & ESC_USER_RAM_BYTE3_MMI_MASK)
3504 #define ESC_USER_RAM_BYTE3_MMI_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE3_MMI_MASK) >> ESC_USER_RAM_BYTE3_MMI_SHIFT)
3505 
3506 /*
3507  * LLC (RW)
3508  *
3509  * Lost Link Counter (0x0310:0x0313)
3510  */
3511 #define ESC_USER_RAM_BYTE3_LLC_MASK (0x8U)
3512 #define ESC_USER_RAM_BYTE3_LLC_SHIFT (3U)
3513 #define ESC_USER_RAM_BYTE3_LLC_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE3_LLC_SHIFT) & ESC_USER_RAM_BYTE3_LLC_MASK)
3514 #define ESC_USER_RAM_BYTE3_LLC_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE3_LLC_MASK) >> ESC_USER_RAM_BYTE3_LLC_SHIFT)
3515 
3516 /* Bitfield definition for register: USER_RAM_BYTE4 */
3517 /*
3518  * LDCM (RW)
3519  *
3520  * Link detection and configuration by MI
3521  */
3522 #define ESC_USER_RAM_BYTE4_LDCM_MASK (0x80U)
3523 #define ESC_USER_RAM_BYTE4_LDCM_SHIFT (7U)
3524 #define ESC_USER_RAM_BYTE4_LDCM_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE4_LDCM_SHIFT) & ESC_USER_RAM_BYTE4_LDCM_MASK)
3525 #define ESC_USER_RAM_BYTE4_LDCM_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE4_LDCM_MASK) >> ESC_USER_RAM_BYTE4_LDCM_SHIFT)
3526 
3527 /*
3528  * DTLC (RW)
3529  *
3530  * DC Time loop control assigned to PDI
3531  */
3532 #define ESC_USER_RAM_BYTE4_DTLC_MASK (0x40U)
3533 #define ESC_USER_RAM_BYTE4_DTLC_SHIFT (6U)
3534 #define ESC_USER_RAM_BYTE4_DTLC_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE4_DTLC_SHIFT) & ESC_USER_RAM_BYTE4_DTLC_MASK)
3535 #define ESC_USER_RAM_BYTE4_DTLC_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE4_DTLC_MASK) >> ESC_USER_RAM_BYTE4_DTLC_SHIFT)
3536 
3537 /*
3538  * DSOU (RW)
3539  *
3540  * DC Sync Out Unit
3541  */
3542 #define ESC_USER_RAM_BYTE4_DSOU_MASK (0x20U)
3543 #define ESC_USER_RAM_BYTE4_DSOU_SHIFT (5U)
3544 #define ESC_USER_RAM_BYTE4_DSOU_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE4_DSOU_SHIFT) & ESC_USER_RAM_BYTE4_DSOU_MASK)
3545 #define ESC_USER_RAM_BYTE4_DSOU_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE4_DSOU_MASK) >> ESC_USER_RAM_BYTE4_DSOU_SHIFT)
3546 
3547 /*
3548  * DLIU (RW)
3549  *
3550  * DC Latch In Unit
3551  */
3552 #define ESC_USER_RAM_BYTE4_DLIU_MASK (0x8U)
3553 #define ESC_USER_RAM_BYTE4_DLIU_SHIFT (3U)
3554 #define ESC_USER_RAM_BYTE4_DLIU_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE4_DLIU_SHIFT) & ESC_USER_RAM_BYTE4_DLIU_MASK)
3555 #define ESC_USER_RAM_BYTE4_DLIU_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE4_DLIU_MASK) >> ESC_USER_RAM_BYTE4_DLIU_SHIFT)
3556 
3557 /*
3558  * LALED (RW)
3559  *
3560  * Link/Activity LED
3561  */
3562 #define ESC_USER_RAM_BYTE4_LALED_MASK (0x1U)
3563 #define ESC_USER_RAM_BYTE4_LALED_SHIFT (0U)
3564 #define ESC_USER_RAM_BYTE4_LALED_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE4_LALED_SHIFT) & ESC_USER_RAM_BYTE4_LALED_MASK)
3565 #define ESC_USER_RAM_BYTE4_LALED_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE4_LALED_MASK) >> ESC_USER_RAM_BYTE4_LALED_SHIFT)
3566 
3567 /* Bitfield definition for register: USER_RAM_BYTE5 */
3568 /*
3569  * DDIOR (RW)
3570  *
3571  * Disable Digital I/O register (0x0F00:0x0F03)
3572  */
3573 #define ESC_USER_RAM_BYTE5_DDIOR_MASK (0x20U)
3574 #define ESC_USER_RAM_BYTE5_DDIOR_SHIFT (5U)
3575 #define ESC_USER_RAM_BYTE5_DDIOR_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE5_DDIOR_SHIFT) & ESC_USER_RAM_BYTE5_DDIOR_MASK)
3576 #define ESC_USER_RAM_BYTE5_DDIOR_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE5_DDIOR_MASK) >> ESC_USER_RAM_BYTE5_DDIOR_SHIFT)
3577 
3578 /*
3579  * EEU (RW)
3580  *
3581  * EEPROM emulation by µController
3582  */
3583 #define ESC_USER_RAM_BYTE5_EEU_MASK (0x4U)
3584 #define ESC_USER_RAM_BYTE5_EEU_SHIFT (2U)
3585 #define ESC_USER_RAM_BYTE5_EEU_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE5_EEU_SHIFT) & ESC_USER_RAM_BYTE5_EEU_MASK)
3586 #define ESC_USER_RAM_BYTE5_EEU_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE5_EEU_MASK) >> ESC_USER_RAM_BYTE5_EEU_SHIFT)
3587 
3588 /*
3589  * ATS (RW)
3590  *
3591  * Automatic TX shift
3592  */
3593 #define ESC_USER_RAM_BYTE5_ATS_MASK (0x2U)
3594 #define ESC_USER_RAM_BYTE5_ATS_SHIFT (1U)
3595 #define ESC_USER_RAM_BYTE5_ATS_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE5_ATS_SHIFT) & ESC_USER_RAM_BYTE5_ATS_MASK)
3596 #define ESC_USER_RAM_BYTE5_ATS_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE5_ATS_MASK) >> ESC_USER_RAM_BYTE5_ATS_SHIFT)
3597 
3598 /*
3599  * MCPP (RW)
3600  *
3601  * MI control by PDI possible
3602  */
3603 #define ESC_USER_RAM_BYTE5_MCPP_MASK (0x1U)
3604 #define ESC_USER_RAM_BYTE5_MCPP_SHIFT (0U)
3605 #define ESC_USER_RAM_BYTE5_MCPP_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE5_MCPP_SHIFT) & ESC_USER_RAM_BYTE5_MCPP_MASK)
3606 #define ESC_USER_RAM_BYTE5_MCPP_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE5_MCPP_MASK) >> ESC_USER_RAM_BYTE5_MCPP_SHIFT)
3607 
3608 /* Bitfield definition for register: USER_RAM_BYTE6 */
3609 /*
3610  * RELEDOR (RW)
3611  *
3612  * RUN/ERR LED Override (0x0138:0x0139)
3613  */
3614 #define ESC_USER_RAM_BYTE6_RELEDOR_MASK (0x4U)
3615 #define ESC_USER_RAM_BYTE6_RELEDOR_SHIFT (2U)
3616 #define ESC_USER_RAM_BYTE6_RELEDOR_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE6_RELEDOR_SHIFT) & ESC_USER_RAM_BYTE6_RELEDOR_MASK)
3617 #define ESC_USER_RAM_BYTE6_RELEDOR_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE6_RELEDOR_MASK) >> ESC_USER_RAM_BYTE6_RELEDOR_SHIFT)
3618 
3619 /* Bitfield definition for register: USER_RAM_BYTE7 */
3620 /*
3621  * DCST (RW)
3622  *
3623  * DC System Time (0x0910:0x0936)
3624  */
3625 #define ESC_USER_RAM_BYTE7_DCST_MASK (0x80U)
3626 #define ESC_USER_RAM_BYTE7_DCST_SHIFT (7U)
3627 #define ESC_USER_RAM_BYTE7_DCST_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE7_DCST_SHIFT) & ESC_USER_RAM_BYTE7_DCST_MASK)
3628 #define ESC_USER_RAM_BYTE7_DCST_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE7_DCST_MASK) >> ESC_USER_RAM_BYTE7_DCST_SHIFT)
3629 
3630 /*
3631  * DCRT (RW)
3632  *
3633  * DC Receive Times (0x0900:0x090F)
3634  */
3635 #define ESC_USER_RAM_BYTE7_DCRT_MASK (0x40U)
3636 #define ESC_USER_RAM_BYTE7_DCRT_SHIFT (6U)
3637 #define ESC_USER_RAM_BYTE7_DCRT_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE7_DCRT_SHIFT) & ESC_USER_RAM_BYTE7_DCRT_MASK)
3638 #define ESC_USER_RAM_BYTE7_DCRT_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE7_DCRT_MASK) >> ESC_USER_RAM_BYTE7_DCRT_SHIFT)
3639 
3640 /*
3641  * DCS1D (RW)
3642  *
3643  * DC Sync1 disable
3644  */
3645 #define ESC_USER_RAM_BYTE7_DCS1D_MASK (0x8U)
3646 #define ESC_USER_RAM_BYTE7_DCS1D_SHIFT (3U)
3647 #define ESC_USER_RAM_BYTE7_DCS1D_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE7_DCS1D_SHIFT) & ESC_USER_RAM_BYTE7_DCS1D_MASK)
3648 #define ESC_USER_RAM_BYTE7_DCS1D_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE7_DCS1D_MASK) >> ESC_USER_RAM_BYTE7_DCS1D_SHIFT)
3649 
3650 /* Bitfield definition for register: USER_RAM_BYTE8 */
3651 /*
3652  * PPDI (RW)
3653  *
3654  * PLB PDI
3655  */
3656 #define ESC_USER_RAM_BYTE8_PPDI_MASK (0x20U)
3657 #define ESC_USER_RAM_BYTE8_PPDI_SHIFT (5U)
3658 #define ESC_USER_RAM_BYTE8_PPDI_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE8_PPDI_SHIFT) & ESC_USER_RAM_BYTE8_PPDI_MASK)
3659 #define ESC_USER_RAM_BYTE8_PPDI_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE8_PPDI_MASK) >> ESC_USER_RAM_BYTE8_PPDI_SHIFT)
3660 
3661 /*
3662  * OPDI (RW)
3663  *
3664  * OPB PDI
3665  */
3666 #define ESC_USER_RAM_BYTE8_OPDI_MASK (0x10U)
3667 #define ESC_USER_RAM_BYTE8_OPDI_SHIFT (4U)
3668 #define ESC_USER_RAM_BYTE8_OPDI_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE8_OPDI_SHIFT) & ESC_USER_RAM_BYTE8_OPDI_MASK)
3669 #define ESC_USER_RAM_BYTE8_OPDI_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE8_OPDI_MASK) >> ESC_USER_RAM_BYTE8_OPDI_SHIFT)
3670 
3671 /*
3672  * APDI (RW)
3673  *
3674  * Avalon PDI
3675  */
3676 #define ESC_USER_RAM_BYTE8_APDI_MASK (0x8U)
3677 #define ESC_USER_RAM_BYTE8_APDI_SHIFT (3U)
3678 #define ESC_USER_RAM_BYTE8_APDI_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE8_APDI_SHIFT) & ESC_USER_RAM_BYTE8_APDI_MASK)
3679 #define ESC_USER_RAM_BYTE8_APDI_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE8_APDI_MASK) >> ESC_USER_RAM_BYTE8_APDI_SHIFT)
3680 
3681 /*
3682  * PDICEC (RW)
3683  *
3684  * PDI clears error counter
3685  */
3686 #define ESC_USER_RAM_BYTE8_PDICEC_MASK (0x4U)
3687 #define ESC_USER_RAM_BYTE8_PDICEC_SHIFT (2U)
3688 #define ESC_USER_RAM_BYTE8_PDICEC_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE8_PDICEC_SHIFT) & ESC_USER_RAM_BYTE8_PDICEC_MASK)
3689 #define ESC_USER_RAM_BYTE8_PDICEC_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE8_PDICEC_MASK) >> ESC_USER_RAM_BYTE8_PDICEC_SHIFT)
3690 
3691 /*
3692  * DC64 (RW)
3693  *
3694  * DC 64 bit
3695  */
3696 #define ESC_USER_RAM_BYTE8_DC64_MASK (0x1U)
3697 #define ESC_USER_RAM_BYTE8_DC64_SHIFT (0U)
3698 #define ESC_USER_RAM_BYTE8_DC64_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE8_DC64_SHIFT) & ESC_USER_RAM_BYTE8_DC64_MASK)
3699 #define ESC_USER_RAM_BYTE8_DC64_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE8_DC64_MASK) >> ESC_USER_RAM_BYTE8_DC64_SHIFT)
3700 
3701 /* Bitfield definition for register: USER_RAM_BYTE9 */
3702 /*
3703  * DR (RW)
3704  *
3705  * Direct RESET
3706  */
3707 #define ESC_USER_RAM_BYTE9_DR_MASK (0x80U)
3708 #define ESC_USER_RAM_BYTE9_DR_SHIFT (7U)
3709 #define ESC_USER_RAM_BYTE9_DR_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE9_DR_SHIFT) & ESC_USER_RAM_BYTE9_DR_MASK)
3710 #define ESC_USER_RAM_BYTE9_DR_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE9_DR_MASK) >> ESC_USER_RAM_BYTE9_DR_SHIFT)
3711 
3712 /* Bitfield definition for register: USER_RAM_BYTE10 */
3713 /*
3714  * PDIIR (RW)
3715  *
3716  * PDI Information register (0x014E:0x014F)
3717  */
3718 #define ESC_USER_RAM_BYTE10_PDIIR_MASK (0x80U)
3719 #define ESC_USER_RAM_BYTE10_PDIIR_SHIFT (7U)
3720 #define ESC_USER_RAM_BYTE10_PDIIR_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE10_PDIIR_SHIFT) & ESC_USER_RAM_BYTE10_PDIIR_MASK)
3721 #define ESC_USER_RAM_BYTE10_PDIIR_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE10_PDIIR_MASK) >> ESC_USER_RAM_BYTE10_PDIIR_SHIFT)
3722 
3723 /*
3724  * PDIFA (RW)
3725  *
3726  * PDI function acknowledge by PDI write
3727  */
3728 #define ESC_USER_RAM_BYTE10_PDIFA_MASK (0x40U)
3729 #define ESC_USER_RAM_BYTE10_PDIFA_SHIFT (6U)
3730 #define ESC_USER_RAM_BYTE10_PDIFA_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE10_PDIFA_SHIFT) & ESC_USER_RAM_BYTE10_PDIFA_MASK)
3731 #define ESC_USER_RAM_BYTE10_PDIFA_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE10_PDIFA_MASK) >> ESC_USER_RAM_BYTE10_PDIFA_SHIFT)
3732 
3733 /*
3734  * APDI (RW)
3735  *
3736  * AXI PDI
3737  */
3738 #define ESC_USER_RAM_BYTE10_APDI_MASK (0x8U)
3739 #define ESC_USER_RAM_BYTE10_APDI_SHIFT (3U)
3740 #define ESC_USER_RAM_BYTE10_APDI_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE10_APDI_SHIFT) & ESC_USER_RAM_BYTE10_APDI_MASK)
3741 #define ESC_USER_RAM_BYTE10_APDI_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE10_APDI_MASK) >> ESC_USER_RAM_BYTE10_APDI_SHIFT)
3742 
3743 /*
3744  * DCL1D (RW)
3745  *
3746  * DC Latch1 disable
3747  */
3748 #define ESC_USER_RAM_BYTE10_DCL1D_MASK (0x4U)
3749 #define ESC_USER_RAM_BYTE10_DCL1D_SHIFT (2U)
3750 #define ESC_USER_RAM_BYTE10_DCL1D_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE10_DCL1D_SHIFT) & ESC_USER_RAM_BYTE10_DCL1D_MASK)
3751 #define ESC_USER_RAM_BYTE10_DCL1D_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE10_DCL1D_MASK) >> ESC_USER_RAM_BYTE10_DCL1D_SHIFT)
3752 
3753 /* Bitfield definition for register: USER_RAM_BYTE11 */
3754 /*
3755  * LEDTST (RW)
3756  *
3757  * LED test
3758  */
3759 #define ESC_USER_RAM_BYTE11_LEDTST_MASK (0x8U)
3760 #define ESC_USER_RAM_BYTE11_LEDTST_SHIFT (3U)
3761 #define ESC_USER_RAM_BYTE11_LEDTST_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE11_LEDTST_SHIFT) & ESC_USER_RAM_BYTE11_LEDTST_MASK)
3762 #define ESC_USER_RAM_BYTE11_LEDTST_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE11_LEDTST_MASK) >> ESC_USER_RAM_BYTE11_LEDTST_SHIFT)
3763 
3764 /* Bitfield definition for register: USER_RAM_BYTE14 */
3765 /*
3766  * DIOBS (RW)
3767  *
3768  * Digital I/O PDI byte size
3769  */
3770 #define ESC_USER_RAM_BYTE14_DIOBS_MASK (0xC0U)
3771 #define ESC_USER_RAM_BYTE14_DIOBS_SHIFT (6U)
3772 #define ESC_USER_RAM_BYTE14_DIOBS_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE14_DIOBS_SHIFT) & ESC_USER_RAM_BYTE14_DIOBS_MASK)
3773 #define ESC_USER_RAM_BYTE14_DIOBS_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE14_DIOBS_MASK) >> ESC_USER_RAM_BYTE14_DIOBS_SHIFT)
3774 
3775 /* Bitfield definition for register: USER_RAM_BYTE15 */
3776 /*
3777  * AUCPDI (RW)
3778  *
3779  * Asynchronous µC PDI
3780  */
3781 #define ESC_USER_RAM_BYTE15_AUCPDI_MASK (0x10U)
3782 #define ESC_USER_RAM_BYTE15_AUCPDI_SHIFT (4U)
3783 #define ESC_USER_RAM_BYTE15_AUCPDI_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE15_AUCPDI_SHIFT) & ESC_USER_RAM_BYTE15_AUCPDI_MASK)
3784 #define ESC_USER_RAM_BYTE15_AUCPDI_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE15_AUCPDI_MASK) >> ESC_USER_RAM_BYTE15_AUCPDI_SHIFT)
3785 
3786 /*
3787  * SSPDI (RW)
3788  *
3789  * SPI Slave PDI
3790  */
3791 #define ESC_USER_RAM_BYTE15_SSPDI_MASK (0x8U)
3792 #define ESC_USER_RAM_BYTE15_SSPDI_SHIFT (3U)
3793 #define ESC_USER_RAM_BYTE15_SSPDI_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE15_SSPDI_SHIFT) & ESC_USER_RAM_BYTE15_SSPDI_MASK)
3794 #define ESC_USER_RAM_BYTE15_SSPDI_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE15_SSPDI_MASK) >> ESC_USER_RAM_BYTE15_SSPDI_SHIFT)
3795 
3796 /*
3797  * DIOPDI (RW)
3798  *
3799  * Digital I/O PDI
3800  */
3801 #define ESC_USER_RAM_BYTE15_DIOPDI_MASK (0x4U)
3802 #define ESC_USER_RAM_BYTE15_DIOPDI_SHIFT (2U)
3803 #define ESC_USER_RAM_BYTE15_DIOPDI_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE15_DIOPDI_SHIFT) & ESC_USER_RAM_BYTE15_DIOPDI_MASK)
3804 #define ESC_USER_RAM_BYTE15_DIOPDI_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE15_DIOPDI_MASK) >> ESC_USER_RAM_BYTE15_DIOPDI_SHIFT)
3805 
3806 /* Bitfield definition for register: USER_RAM_BYTE19 */
3807 /*
3808  * SCP (RW)
3809  *
3810  * Security CPLD protection
3811  */
3812 #define ESC_USER_RAM_BYTE19_SCP_MASK (0x40U)
3813 #define ESC_USER_RAM_BYTE19_SCP_SHIFT (6U)
3814 #define ESC_USER_RAM_BYTE19_SCP_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE19_SCP_SHIFT) & ESC_USER_RAM_BYTE19_SCP_MASK)
3815 #define ESC_USER_RAM_BYTE19_SCP_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE19_SCP_MASK) >> ESC_USER_RAM_BYTE19_SCP_SHIFT)
3816 
3817 /*
3818  * RMII (RW)
3819  *
3820  * RMII
3821  */
3822 #define ESC_USER_RAM_BYTE19_RMII_MASK (0x20U)
3823 #define ESC_USER_RAM_BYTE19_RMII_SHIFT (5U)
3824 #define ESC_USER_RAM_BYTE19_RMII_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE19_RMII_SHIFT) & ESC_USER_RAM_BYTE19_RMII_MASK)
3825 #define ESC_USER_RAM_BYTE19_RMII_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE19_RMII_MASK) >> ESC_USER_RAM_BYTE19_RMII_SHIFT)
3826 
3827 /*
3828  * URGP (RW)
3829  *
3830  * Use RGMII GTX_CLK phase shifted clock input
3831  */
3832 #define ESC_USER_RAM_BYTE19_URGP_MASK (0x10U)
3833 #define ESC_USER_RAM_BYTE19_URGP_SHIFT (4U)
3834 #define ESC_USER_RAM_BYTE19_URGP_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE19_URGP_SHIFT) & ESC_USER_RAM_BYTE19_URGP_MASK)
3835 #define ESC_USER_RAM_BYTE19_URGP_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE19_URGP_MASK) >> ESC_USER_RAM_BYTE19_URGP_SHIFT)
3836 
3837 /*
3838  * CIA (RW)
3839  *
3840  * CLK_PDI_EXT is asynchronous
3841  */
3842 #define ESC_USER_RAM_BYTE19_CIA_MASK (0x4U)
3843 #define ESC_USER_RAM_BYTE19_CIA_SHIFT (2U)
3844 #define ESC_USER_RAM_BYTE19_CIA_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE19_CIA_SHIFT) & ESC_USER_RAM_BYTE19_CIA_MASK)
3845 #define ESC_USER_RAM_BYTE19_CIA_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE19_CIA_MASK) >> ESC_USER_RAM_BYTE19_CIA_SHIFT)
3846 
3847 /*
3848  * IPARO (RW)
3849  *
3850  * Individual PHY address read out (0x0510[7:3])
3851  */
3852 #define ESC_USER_RAM_BYTE19_IPARO_MASK (0x2U)
3853 #define ESC_USER_RAM_BYTE19_IPARO_SHIFT (1U)
3854 #define ESC_USER_RAM_BYTE19_IPARO_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE19_IPARO_SHIFT) & ESC_USER_RAM_BYTE19_IPARO_MASK)
3855 #define ESC_USER_RAM_BYTE19_IPARO_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE19_IPARO_MASK) >> ESC_USER_RAM_BYTE19_IPARO_SHIFT)
3856 
3857 /*
3858  * RGMII (RW)
3859  *
3860  * RGMII
3861  */
3862 #define ESC_USER_RAM_BYTE19_RGMII_MASK (0x1U)
3863 #define ESC_USER_RAM_BYTE19_RGMII_SHIFT (0U)
3864 #define ESC_USER_RAM_BYTE19_RGMII_SET(x) (((uint8_t)(x) << ESC_USER_RAM_BYTE19_RGMII_SHIFT) & ESC_USER_RAM_BYTE19_RGMII_MASK)
3865 #define ESC_USER_RAM_BYTE19_RGMII_GET(x) (((uint8_t)(x) & ESC_USER_RAM_BYTE19_RGMII_MASK) >> ESC_USER_RAM_BYTE19_RGMII_SHIFT)
3866 
3867 /* Bitfield definition for register: PDRAM */
3868 /*
3869  * DATA (RW)
3870  *
3871  * Input Data
3872  */
3873 #define ESC_PDRAM_DATA_MASK (0xFFFFFFFFUL)
3874 #define ESC_PDRAM_DATA_SHIFT (0U)
3875 #define ESC_PDRAM_DATA_SET(x) (((uint32_t)(x) << ESC_PDRAM_DATA_SHIFT) & ESC_PDRAM_DATA_MASK)
3876 #define ESC_PDRAM_DATA_GET(x) (((uint32_t)(x) & ESC_PDRAM_DATA_MASK) >> ESC_PDRAM_DATA_SHIFT)
3877 
3878 /* Bitfield definition for register: PDRAM_ALS */
3879 /*
3880  * DATA (RW)
3881  *
3882  */
3883 #define ESC_PDRAM_ALS_DATA_MASK (0xFFFFFFFFUL)
3884 #define ESC_PDRAM_ALS_DATA_SHIFT (0U)
3885 #define ESC_PDRAM_ALS_DATA_SET(x) (((uint32_t)(x) << ESC_PDRAM_ALS_DATA_SHIFT) & ESC_PDRAM_ALS_DATA_MASK)
3886 #define ESC_PDRAM_ALS_DATA_GET(x) (((uint32_t)(x) & ESC_PDRAM_ALS_DATA_MASK) >> ESC_PDRAM_ALS_DATA_SHIFT)
3887 
3888 /* Bitfield definition for register: GPR_CFG0 */
3889 /*
3890  * PORT2_DIS (RW)
3891  *
3892  * set to disable related port(read data 00 in core reigster Port Descriptor (0x0007)
3893  */
3894 #define ESC_GPR_CFG0_PORT2_DIS_MASK (0x40000UL)
3895 #define ESC_GPR_CFG0_PORT2_DIS_SHIFT (18U)
3896 #define ESC_GPR_CFG0_PORT2_DIS_SET(x) (((uint32_t)(x) << ESC_GPR_CFG0_PORT2_DIS_SHIFT) & ESC_GPR_CFG0_PORT2_DIS_MASK)
3897 #define ESC_GPR_CFG0_PORT2_DIS_GET(x) (((uint32_t)(x) & ESC_GPR_CFG0_PORT2_DIS_MASK) >> ESC_GPR_CFG0_PORT2_DIS_SHIFT)
3898 
3899 /*
3900  * PORT1_DIS (RW)
3901  *
3902  * set to disable related port(read data 00 in core reigster Port Descriptor (0x0007)
3903  */
3904 #define ESC_GPR_CFG0_PORT1_DIS_MASK (0x20000UL)
3905 #define ESC_GPR_CFG0_PORT1_DIS_SHIFT (17U)
3906 #define ESC_GPR_CFG0_PORT1_DIS_SET(x) (((uint32_t)(x) << ESC_GPR_CFG0_PORT1_DIS_SHIFT) & ESC_GPR_CFG0_PORT1_DIS_MASK)
3907 #define ESC_GPR_CFG0_PORT1_DIS_GET(x) (((uint32_t)(x) & ESC_GPR_CFG0_PORT1_DIS_MASK) >> ESC_GPR_CFG0_PORT1_DIS_SHIFT)
3908 
3909 /*
3910  * PORT0_DIS (RW)
3911  *
3912  * set to disable related port(read data 00 in core reigster Port Descriptor (0x0007)
3913  */
3914 #define ESC_GPR_CFG0_PORT0_DIS_MASK (0x10000UL)
3915 #define ESC_GPR_CFG0_PORT0_DIS_SHIFT (16U)
3916 #define ESC_GPR_CFG0_PORT0_DIS_SET(x) (((uint32_t)(x) << ESC_GPR_CFG0_PORT0_DIS_SHIFT) & ESC_GPR_CFG0_PORT0_DIS_MASK)
3917 #define ESC_GPR_CFG0_PORT0_DIS_GET(x) (((uint32_t)(x) & ESC_GPR_CFG0_PORT0_DIS_MASK) >> ESC_GPR_CFG0_PORT0_DIS_SHIFT)
3918 
3919 /*
3920  * CLK100_EN (RW)
3921  *
3922  */
3923 #define ESC_GPR_CFG0_CLK100_EN_MASK (0x2000U)
3924 #define ESC_GPR_CFG0_CLK100_EN_SHIFT (13U)
3925 #define ESC_GPR_CFG0_CLK100_EN_SET(x) (((uint32_t)(x) << ESC_GPR_CFG0_CLK100_EN_SHIFT) & ESC_GPR_CFG0_CLK100_EN_MASK)
3926 #define ESC_GPR_CFG0_CLK100_EN_GET(x) (((uint32_t)(x) & ESC_GPR_CFG0_CLK100_EN_MASK) >> ESC_GPR_CFG0_CLK100_EN_SHIFT)
3927 
3928 /*
3929  * EEPROM_EMU (RW)
3930  *
3931  * 1 is EEPROM emulation mode (default)
3932  */
3933 #define ESC_GPR_CFG0_EEPROM_EMU_MASK (0x1000U)
3934 #define ESC_GPR_CFG0_EEPROM_EMU_SHIFT (12U)
3935 #define ESC_GPR_CFG0_EEPROM_EMU_SET(x) (((uint32_t)(x) << ESC_GPR_CFG0_EEPROM_EMU_SHIFT) & ESC_GPR_CFG0_EEPROM_EMU_MASK)
3936 #define ESC_GPR_CFG0_EEPROM_EMU_GET(x) (((uint32_t)(x) & ESC_GPR_CFG0_EEPROM_EMU_MASK) >> ESC_GPR_CFG0_EEPROM_EMU_SHIFT)
3937 
3938 /*
3939  * SYNC1_PDI_IRQEN (RW)
3940  *
3941  * set to enable SYNC1 generate PDI interrupt, also set PDI_SL_CFG.SYNC1_MAER(0x151.bit7)
3942  */
3943 #define ESC_GPR_CFG0_SYNC1_PDI_IRQEN_MASK (0x20U)
3944 #define ESC_GPR_CFG0_SYNC1_PDI_IRQEN_SHIFT (5U)
3945 #define ESC_GPR_CFG0_SYNC1_PDI_IRQEN_SET(x) (((uint32_t)(x) << ESC_GPR_CFG0_SYNC1_PDI_IRQEN_SHIFT) & ESC_GPR_CFG0_SYNC1_PDI_IRQEN_MASK)
3946 #define ESC_GPR_CFG0_SYNC1_PDI_IRQEN_GET(x) (((uint32_t)(x) & ESC_GPR_CFG0_SYNC1_PDI_IRQEN_MASK) >> ESC_GPR_CFG0_SYNC1_PDI_IRQEN_SHIFT)
3947 
3948 /*
3949  * SYNC0_PDI_IRQEN (RW)
3950  *
3951  * set to enable SYNC0 generate PDI interrupt, also set PDI_SL_CFG.SYNC1_MAER(0x151.bit3)
3952  */
3953 #define ESC_GPR_CFG0_SYNC0_PDI_IRQEN_MASK (0x10U)
3954 #define ESC_GPR_CFG0_SYNC0_PDI_IRQEN_SHIFT (4U)
3955 #define ESC_GPR_CFG0_SYNC0_PDI_IRQEN_SET(x) (((uint32_t)(x) << ESC_GPR_CFG0_SYNC0_PDI_IRQEN_SHIFT) & ESC_GPR_CFG0_SYNC0_PDI_IRQEN_MASK)
3956 #define ESC_GPR_CFG0_SYNC0_PDI_IRQEN_GET(x) (((uint32_t)(x) & ESC_GPR_CFG0_SYNC0_PDI_IRQEN_MASK) >> ESC_GPR_CFG0_SYNC0_PDI_IRQEN_SHIFT)
3957 
3958 /*
3959  * I2C_SCLK_EN (RW)
3960  *
3961  */
3962 #define ESC_GPR_CFG0_I2C_SCLK_EN_MASK (0x8U)
3963 #define ESC_GPR_CFG0_I2C_SCLK_EN_SHIFT (3U)
3964 #define ESC_GPR_CFG0_I2C_SCLK_EN_SET(x) (((uint32_t)(x) << ESC_GPR_CFG0_I2C_SCLK_EN_SHIFT) & ESC_GPR_CFG0_I2C_SCLK_EN_MASK)
3965 #define ESC_GPR_CFG0_I2C_SCLK_EN_GET(x) (((uint32_t)(x) & ESC_GPR_CFG0_I2C_SCLK_EN_MASK) >> ESC_GPR_CFG0_I2C_SCLK_EN_SHIFT)
3966 
3967 /*
3968  * PROM_SIZE (RW)
3969  *
3970  * Sets EEPROM size:
3971  * 0:up to 16 kbit EEPROM
3972  * 1:32 kbit-4Mbit EEPROM
3973  */
3974 #define ESC_GPR_CFG0_PROM_SIZE_MASK (0x1U)
3975 #define ESC_GPR_CFG0_PROM_SIZE_SHIFT (0U)
3976 #define ESC_GPR_CFG0_PROM_SIZE_SET(x) (((uint32_t)(x) << ESC_GPR_CFG0_PROM_SIZE_SHIFT) & ESC_GPR_CFG0_PROM_SIZE_MASK)
3977 #define ESC_GPR_CFG0_PROM_SIZE_GET(x) (((uint32_t)(x) & ESC_GPR_CFG0_PROM_SIZE_MASK) >> ESC_GPR_CFG0_PROM_SIZE_SHIFT)
3978 
3979 /* Bitfield definition for register: GPR_CFG1 */
3980 /*
3981  * SYNC1_IRQ_EN (RW)
3982  *
3983  */
3984 #define ESC_GPR_CFG1_SYNC1_IRQ_EN_MASK (0x80000000UL)
3985 #define ESC_GPR_CFG1_SYNC1_IRQ_EN_SHIFT (31U)
3986 #define ESC_GPR_CFG1_SYNC1_IRQ_EN_SET(x) (((uint32_t)(x) << ESC_GPR_CFG1_SYNC1_IRQ_EN_SHIFT) & ESC_GPR_CFG1_SYNC1_IRQ_EN_MASK)
3987 #define ESC_GPR_CFG1_SYNC1_IRQ_EN_GET(x) (((uint32_t)(x) & ESC_GPR_CFG1_SYNC1_IRQ_EN_MASK) >> ESC_GPR_CFG1_SYNC1_IRQ_EN_SHIFT)
3988 
3989 /*
3990  * SYNC0_IRQ_EN (RW)
3991  *
3992  */
3993 #define ESC_GPR_CFG1_SYNC0_IRQ_EN_MASK (0x40000000UL)
3994 #define ESC_GPR_CFG1_SYNC0_IRQ_EN_SHIFT (30U)
3995 #define ESC_GPR_CFG1_SYNC0_IRQ_EN_SET(x) (((uint32_t)(x) << ESC_GPR_CFG1_SYNC0_IRQ_EN_SHIFT) & ESC_GPR_CFG1_SYNC0_IRQ_EN_MASK)
3996 #define ESC_GPR_CFG1_SYNC0_IRQ_EN_GET(x) (((uint32_t)(x) & ESC_GPR_CFG1_SYNC0_IRQ_EN_MASK) >> ESC_GPR_CFG1_SYNC0_IRQ_EN_SHIFT)
3997 
3998 /*
3999  * RSTO_IRQ_EN (RW)
4000  *
4001  */
4002 #define ESC_GPR_CFG1_RSTO_IRQ_EN_MASK (0x20000000UL)
4003 #define ESC_GPR_CFG1_RSTO_IRQ_EN_SHIFT (29U)
4004 #define ESC_GPR_CFG1_RSTO_IRQ_EN_SET(x) (((uint32_t)(x) << ESC_GPR_CFG1_RSTO_IRQ_EN_SHIFT) & ESC_GPR_CFG1_RSTO_IRQ_EN_MASK)
4005 #define ESC_GPR_CFG1_RSTO_IRQ_EN_GET(x) (((uint32_t)(x) & ESC_GPR_CFG1_RSTO_IRQ_EN_MASK) >> ESC_GPR_CFG1_RSTO_IRQ_EN_SHIFT)
4006 
4007 /*
4008  * SYNC1_DMA_EN (RW)
4009  *
4010  */
4011 #define ESC_GPR_CFG1_SYNC1_DMA_EN_MASK (0x2000U)
4012 #define ESC_GPR_CFG1_SYNC1_DMA_EN_SHIFT (13U)
4013 #define ESC_GPR_CFG1_SYNC1_DMA_EN_SET(x) (((uint32_t)(x) << ESC_GPR_CFG1_SYNC1_DMA_EN_SHIFT) & ESC_GPR_CFG1_SYNC1_DMA_EN_MASK)
4014 #define ESC_GPR_CFG1_SYNC1_DMA_EN_GET(x) (((uint32_t)(x) & ESC_GPR_CFG1_SYNC1_DMA_EN_MASK) >> ESC_GPR_CFG1_SYNC1_DMA_EN_SHIFT)
4015 
4016 /*
4017  * SYNC0_DMA_EN (RW)
4018  *
4019  */
4020 #define ESC_GPR_CFG1_SYNC0_DMA_EN_MASK (0x1000U)
4021 #define ESC_GPR_CFG1_SYNC0_DMA_EN_SHIFT (12U)
4022 #define ESC_GPR_CFG1_SYNC0_DMA_EN_SET(x) (((uint32_t)(x) << ESC_GPR_CFG1_SYNC0_DMA_EN_SHIFT) & ESC_GPR_CFG1_SYNC0_DMA_EN_MASK)
4023 #define ESC_GPR_CFG1_SYNC0_DMA_EN_GET(x) (((uint32_t)(x) & ESC_GPR_CFG1_SYNC0_DMA_EN_MASK) >> ESC_GPR_CFG1_SYNC0_DMA_EN_SHIFT)
4024 
4025 /*
4026  * LATCH1_FROM_IO (RW)
4027  *
4028  * 0:from NTM
4029  */
4030 #define ESC_GPR_CFG1_LATCH1_FROM_IO_MASK (0x200U)
4031 #define ESC_GPR_CFG1_LATCH1_FROM_IO_SHIFT (9U)
4032 #define ESC_GPR_CFG1_LATCH1_FROM_IO_SET(x) (((uint32_t)(x) << ESC_GPR_CFG1_LATCH1_FROM_IO_SHIFT) & ESC_GPR_CFG1_LATCH1_FROM_IO_MASK)
4033 #define ESC_GPR_CFG1_LATCH1_FROM_IO_GET(x) (((uint32_t)(x) & ESC_GPR_CFG1_LATCH1_FROM_IO_MASK) >> ESC_GPR_CFG1_LATCH1_FROM_IO_SHIFT)
4034 
4035 /*
4036  * LATCH0_FROM_IO (RW)
4037  *
4038  * 0:from TRIGGER_MUX
4039  */
4040 #define ESC_GPR_CFG1_LATCH0_FROM_IO_MASK (0x100U)
4041 #define ESC_GPR_CFG1_LATCH0_FROM_IO_SHIFT (8U)
4042 #define ESC_GPR_CFG1_LATCH0_FROM_IO_SET(x) (((uint32_t)(x) << ESC_GPR_CFG1_LATCH0_FROM_IO_SHIFT) & ESC_GPR_CFG1_LATCH0_FROM_IO_MASK)
4043 #define ESC_GPR_CFG1_LATCH0_FROM_IO_GET(x) (((uint32_t)(x) & ESC_GPR_CFG1_LATCH0_FROM_IO_MASK) >> ESC_GPR_CFG1_LATCH0_FROM_IO_SHIFT)
4044 
4045 /*
4046  * RSTO_OVRD (RW)
4047  *
4048  */
4049 #define ESC_GPR_CFG1_RSTO_OVRD_MASK (0x80U)
4050 #define ESC_GPR_CFG1_RSTO_OVRD_SHIFT (7U)
4051 #define ESC_GPR_CFG1_RSTO_OVRD_SET(x) (((uint32_t)(x) << ESC_GPR_CFG1_RSTO_OVRD_SHIFT) & ESC_GPR_CFG1_RSTO_OVRD_MASK)
4052 #define ESC_GPR_CFG1_RSTO_OVRD_GET(x) (((uint32_t)(x) & ESC_GPR_CFG1_RSTO_OVRD_MASK) >> ESC_GPR_CFG1_RSTO_OVRD_SHIFT)
4053 
4054 /*
4055  * RSTO_OVRD_ENJ (RW)
4056  *
4057  */
4058 #define ESC_GPR_CFG1_RSTO_OVRD_ENJ_MASK (0x40U)
4059 #define ESC_GPR_CFG1_RSTO_OVRD_ENJ_SHIFT (6U)
4060 #define ESC_GPR_CFG1_RSTO_OVRD_ENJ_SET(x) (((uint32_t)(x) << ESC_GPR_CFG1_RSTO_OVRD_ENJ_SHIFT) & ESC_GPR_CFG1_RSTO_OVRD_ENJ_MASK)
4061 #define ESC_GPR_CFG1_RSTO_OVRD_ENJ_GET(x) (((uint32_t)(x) & ESC_GPR_CFG1_RSTO_OVRD_ENJ_MASK) >> ESC_GPR_CFG1_RSTO_OVRD_ENJ_SHIFT)
4062 
4063 /* Bitfield definition for register: GPR_CFG2 */
4064 /*
4065  * NMII_LINK2_FROM_IO (RW)
4066  *
4067  */
4068 #define ESC_GPR_CFG2_NMII_LINK2_FROM_IO_MASK (0x20000000UL)
4069 #define ESC_GPR_CFG2_NMII_LINK2_FROM_IO_SHIFT (29U)
4070 #define ESC_GPR_CFG2_NMII_LINK2_FROM_IO_SET(x) (((uint32_t)(x) << ESC_GPR_CFG2_NMII_LINK2_FROM_IO_SHIFT) & ESC_GPR_CFG2_NMII_LINK2_FROM_IO_MASK)
4071 #define ESC_GPR_CFG2_NMII_LINK2_FROM_IO_GET(x) (((uint32_t)(x) & ESC_GPR_CFG2_NMII_LINK2_FROM_IO_MASK) >> ESC_GPR_CFG2_NMII_LINK2_FROM_IO_SHIFT)
4072 
4073 /*
4074  * NMII_LINK2_GPR (RW)
4075  *
4076  */
4077 #define ESC_GPR_CFG2_NMII_LINK2_GPR_MASK (0x10000000UL)
4078 #define ESC_GPR_CFG2_NMII_LINK2_GPR_SHIFT (28U)
4079 #define ESC_GPR_CFG2_NMII_LINK2_GPR_SET(x) (((uint32_t)(x) << ESC_GPR_CFG2_NMII_LINK2_GPR_SHIFT) & ESC_GPR_CFG2_NMII_LINK2_GPR_MASK)
4080 #define ESC_GPR_CFG2_NMII_LINK2_GPR_GET(x) (((uint32_t)(x) & ESC_GPR_CFG2_NMII_LINK2_GPR_MASK) >> ESC_GPR_CFG2_NMII_LINK2_GPR_SHIFT)
4081 
4082 /*
4083  * NMII_LINK1_FROM_IO (RW)
4084  *
4085  */
4086 #define ESC_GPR_CFG2_NMII_LINK1_FROM_IO_MASK (0x2000000UL)
4087 #define ESC_GPR_CFG2_NMII_LINK1_FROM_IO_SHIFT (25U)
4088 #define ESC_GPR_CFG2_NMII_LINK1_FROM_IO_SET(x) (((uint32_t)(x) << ESC_GPR_CFG2_NMII_LINK1_FROM_IO_SHIFT) & ESC_GPR_CFG2_NMII_LINK1_FROM_IO_MASK)
4089 #define ESC_GPR_CFG2_NMII_LINK1_FROM_IO_GET(x) (((uint32_t)(x) & ESC_GPR_CFG2_NMII_LINK1_FROM_IO_MASK) >> ESC_GPR_CFG2_NMII_LINK1_FROM_IO_SHIFT)
4090 
4091 /*
4092  * NMII_LINK1_GPR (RW)
4093  *
4094  */
4095 #define ESC_GPR_CFG2_NMII_LINK1_GPR_MASK (0x1000000UL)
4096 #define ESC_GPR_CFG2_NMII_LINK1_GPR_SHIFT (24U)
4097 #define ESC_GPR_CFG2_NMII_LINK1_GPR_SET(x) (((uint32_t)(x) << ESC_GPR_CFG2_NMII_LINK1_GPR_SHIFT) & ESC_GPR_CFG2_NMII_LINK1_GPR_MASK)
4098 #define ESC_GPR_CFG2_NMII_LINK1_GPR_GET(x) (((uint32_t)(x) & ESC_GPR_CFG2_NMII_LINK1_GPR_MASK) >> ESC_GPR_CFG2_NMII_LINK1_GPR_SHIFT)
4099 
4100 /*
4101  * NMII_LINK0_FROM_IO (RW)
4102  *
4103  */
4104 #define ESC_GPR_CFG2_NMII_LINK0_FROM_IO_MASK (0x200000UL)
4105 #define ESC_GPR_CFG2_NMII_LINK0_FROM_IO_SHIFT (21U)
4106 #define ESC_GPR_CFG2_NMII_LINK0_FROM_IO_SET(x) (((uint32_t)(x) << ESC_GPR_CFG2_NMII_LINK0_FROM_IO_SHIFT) & ESC_GPR_CFG2_NMII_LINK0_FROM_IO_MASK)
4107 #define ESC_GPR_CFG2_NMII_LINK0_FROM_IO_GET(x) (((uint32_t)(x) & ESC_GPR_CFG2_NMII_LINK0_FROM_IO_MASK) >> ESC_GPR_CFG2_NMII_LINK0_FROM_IO_SHIFT)
4108 
4109 /*
4110  * NMII_LINK0_GPR (RW)
4111  *
4112  */
4113 #define ESC_GPR_CFG2_NMII_LINK0_GPR_MASK (0x100000UL)
4114 #define ESC_GPR_CFG2_NMII_LINK0_GPR_SHIFT (20U)
4115 #define ESC_GPR_CFG2_NMII_LINK0_GPR_SET(x) (((uint32_t)(x) << ESC_GPR_CFG2_NMII_LINK0_GPR_SHIFT) & ESC_GPR_CFG2_NMII_LINK0_GPR_MASK)
4116 #define ESC_GPR_CFG2_NMII_LINK0_GPR_GET(x) (((uint32_t)(x) & ESC_GPR_CFG2_NMII_LINK0_GPR_MASK) >> ESC_GPR_CFG2_NMII_LINK0_GPR_SHIFT)
4117 
4118 /* Bitfield definition for register: PHY_CFG0 */
4119 /*
4120  * MAC_SPEED (RW)
4121  *
4122  * 1:100M
4123  */
4124 #define ESC_PHY_CFG0_MAC_SPEED_MASK (0x40000000UL)
4125 #define ESC_PHY_CFG0_MAC_SPEED_SHIFT (30U)
4126 #define ESC_PHY_CFG0_MAC_SPEED_SET(x) (((uint32_t)(x) << ESC_PHY_CFG0_MAC_SPEED_SHIFT) & ESC_PHY_CFG0_MAC_SPEED_MASK)
4127 #define ESC_PHY_CFG0_MAC_SPEED_GET(x) (((uint32_t)(x) & ESC_PHY_CFG0_MAC_SPEED_MASK) >> ESC_PHY_CFG0_MAC_SPEED_SHIFT)
4128 
4129 /*
4130  * PHY_OFFSET_VAL (RW)
4131  *
4132  */
4133 #define ESC_PHY_CFG0_PHY_OFFSET_VAL_MASK (0x1F000000UL)
4134 #define ESC_PHY_CFG0_PHY_OFFSET_VAL_SHIFT (24U)
4135 #define ESC_PHY_CFG0_PHY_OFFSET_VAL_SET(x) (((uint32_t)(x) << ESC_PHY_CFG0_PHY_OFFSET_VAL_SHIFT) & ESC_PHY_CFG0_PHY_OFFSET_VAL_MASK)
4136 #define ESC_PHY_CFG0_PHY_OFFSET_VAL_GET(x) (((uint32_t)(x) & ESC_PHY_CFG0_PHY_OFFSET_VAL_MASK) >> ESC_PHY_CFG0_PHY_OFFSET_VAL_SHIFT)
4137 
4138 /*
4139  * PORT2_RMII_EN (RW)
4140  *
4141  */
4142 #define ESC_PHY_CFG0_PORT2_RMII_EN_MASK (0x800000UL)
4143 #define ESC_PHY_CFG0_PORT2_RMII_EN_SHIFT (23U)
4144 #define ESC_PHY_CFG0_PORT2_RMII_EN_SET(x) (((uint32_t)(x) << ESC_PHY_CFG0_PORT2_RMII_EN_SHIFT) & ESC_PHY_CFG0_PORT2_RMII_EN_MASK)
4145 #define ESC_PHY_CFG0_PORT2_RMII_EN_GET(x) (((uint32_t)(x) & ESC_PHY_CFG0_PORT2_RMII_EN_MASK) >> ESC_PHY_CFG0_PORT2_RMII_EN_SHIFT)
4146 
4147 /*
4148  * PORT1_RMII_EN (RW)
4149  *
4150  */
4151 #define ESC_PHY_CFG0_PORT1_RMII_EN_MASK (0x8000U)
4152 #define ESC_PHY_CFG0_PORT1_RMII_EN_SHIFT (15U)
4153 #define ESC_PHY_CFG0_PORT1_RMII_EN_SET(x) (((uint32_t)(x) << ESC_PHY_CFG0_PORT1_RMII_EN_SHIFT) & ESC_PHY_CFG0_PORT1_RMII_EN_MASK)
4154 #define ESC_PHY_CFG0_PORT1_RMII_EN_GET(x) (((uint32_t)(x) & ESC_PHY_CFG0_PORT1_RMII_EN_MASK) >> ESC_PHY_CFG0_PORT1_RMII_EN_SHIFT)
4155 
4156 /*
4157  * PORT0_RMII_EN (RW)
4158  *
4159  */
4160 #define ESC_PHY_CFG0_PORT0_RMII_EN_MASK (0x80U)
4161 #define ESC_PHY_CFG0_PORT0_RMII_EN_SHIFT (7U)
4162 #define ESC_PHY_CFG0_PORT0_RMII_EN_SET(x) (((uint32_t)(x) << ESC_PHY_CFG0_PORT0_RMII_EN_SHIFT) & ESC_PHY_CFG0_PORT0_RMII_EN_MASK)
4163 #define ESC_PHY_CFG0_PORT0_RMII_EN_GET(x) (((uint32_t)(x) & ESC_PHY_CFG0_PORT0_RMII_EN_MASK) >> ESC_PHY_CFG0_PORT0_RMII_EN_SHIFT)
4164 
4165 /* Bitfield definition for register: PHY_CFG1 */
4166 /*
4167  * RMII_REFCLK_SEL (RW)
4168  *
4169  * 0:use RXCK as 50M refclk. 1:use TXCK as 50M refclk
4170  */
4171 #define ESC_PHY_CFG1_RMII_REFCLK_SEL_MASK (0x700U)
4172 #define ESC_PHY_CFG1_RMII_REFCLK_SEL_SHIFT (8U)
4173 #define ESC_PHY_CFG1_RMII_REFCLK_SEL_SET(x) (((uint32_t)(x) << ESC_PHY_CFG1_RMII_REFCLK_SEL_SHIFT) & ESC_PHY_CFG1_RMII_REFCLK_SEL_MASK)
4174 #define ESC_PHY_CFG1_RMII_REFCLK_SEL_GET(x) (((uint32_t)(x) & ESC_PHY_CFG1_RMII_REFCLK_SEL_MASK) >> ESC_PHY_CFG1_RMII_REFCLK_SEL_SHIFT)
4175 
4176 /*
4177  * REFCK_25M_INV (RW)
4178  *
4179  */
4180 #define ESC_PHY_CFG1_REFCK_25M_INV_MASK (0x80U)
4181 #define ESC_PHY_CFG1_REFCK_25M_INV_SHIFT (7U)
4182 #define ESC_PHY_CFG1_REFCK_25M_INV_SET(x) (((uint32_t)(x) << ESC_PHY_CFG1_REFCK_25M_INV_SHIFT) & ESC_PHY_CFG1_REFCK_25M_INV_MASK)
4183 #define ESC_PHY_CFG1_REFCK_25M_INV_GET(x) (((uint32_t)(x) & ESC_PHY_CFG1_REFCK_25M_INV_MASK) >> ESC_PHY_CFG1_REFCK_25M_INV_SHIFT)
4184 
4185 /*
4186  * RMII_P2_TXCK_REFCLK_OE (RW)
4187  *
4188  */
4189 #define ESC_PHY_CFG1_RMII_P2_TXCK_REFCLK_OE_MASK (0x40U)
4190 #define ESC_PHY_CFG1_RMII_P2_TXCK_REFCLK_OE_SHIFT (6U)
4191 #define ESC_PHY_CFG1_RMII_P2_TXCK_REFCLK_OE_SET(x) (((uint32_t)(x) << ESC_PHY_CFG1_RMII_P2_TXCK_REFCLK_OE_SHIFT) & ESC_PHY_CFG1_RMII_P2_TXCK_REFCLK_OE_MASK)
4192 #define ESC_PHY_CFG1_RMII_P2_TXCK_REFCLK_OE_GET(x) (((uint32_t)(x) & ESC_PHY_CFG1_RMII_P2_TXCK_REFCLK_OE_MASK) >> ESC_PHY_CFG1_RMII_P2_TXCK_REFCLK_OE_SHIFT)
4193 
4194 /*
4195  * RMII_P1_TXCK_REFCLK_OE (RW)
4196  *
4197  */
4198 #define ESC_PHY_CFG1_RMII_P1_TXCK_REFCLK_OE_MASK (0x20U)
4199 #define ESC_PHY_CFG1_RMII_P1_TXCK_REFCLK_OE_SHIFT (5U)
4200 #define ESC_PHY_CFG1_RMII_P1_TXCK_REFCLK_OE_SET(x) (((uint32_t)(x) << ESC_PHY_CFG1_RMII_P1_TXCK_REFCLK_OE_SHIFT) & ESC_PHY_CFG1_RMII_P1_TXCK_REFCLK_OE_MASK)
4201 #define ESC_PHY_CFG1_RMII_P1_TXCK_REFCLK_OE_GET(x) (((uint32_t)(x) & ESC_PHY_CFG1_RMII_P1_TXCK_REFCLK_OE_MASK) >> ESC_PHY_CFG1_RMII_P1_TXCK_REFCLK_OE_SHIFT)
4202 
4203 /*
4204  * RMII_P0_TXCK_REFCLK_OE (RW)
4205  *
4206  */
4207 #define ESC_PHY_CFG1_RMII_P0_TXCK_REFCLK_OE_MASK (0x10U)
4208 #define ESC_PHY_CFG1_RMII_P0_TXCK_REFCLK_OE_SHIFT (4U)
4209 #define ESC_PHY_CFG1_RMII_P0_TXCK_REFCLK_OE_SET(x) (((uint32_t)(x) << ESC_PHY_CFG1_RMII_P0_TXCK_REFCLK_OE_SHIFT) & ESC_PHY_CFG1_RMII_P0_TXCK_REFCLK_OE_MASK)
4210 #define ESC_PHY_CFG1_RMII_P0_TXCK_REFCLK_OE_GET(x) (((uint32_t)(x) & ESC_PHY_CFG1_RMII_P0_TXCK_REFCLK_OE_MASK) >> ESC_PHY_CFG1_RMII_P0_TXCK_REFCLK_OE_SHIFT)
4211 
4212 /*
4213  * REFCK_25M_OE (RW)
4214  *
4215  */
4216 #define ESC_PHY_CFG1_REFCK_25M_OE_MASK (0x8U)
4217 #define ESC_PHY_CFG1_REFCK_25M_OE_SHIFT (3U)
4218 #define ESC_PHY_CFG1_REFCK_25M_OE_SET(x) (((uint32_t)(x) << ESC_PHY_CFG1_REFCK_25M_OE_SHIFT) & ESC_PHY_CFG1_REFCK_25M_OE_MASK)
4219 #define ESC_PHY_CFG1_REFCK_25M_OE_GET(x) (((uint32_t)(x) & ESC_PHY_CFG1_REFCK_25M_OE_MASK) >> ESC_PHY_CFG1_REFCK_25M_OE_SHIFT)
4220 
4221 /*
4222  * RMII_P2_RXCK_REFCLK_OE (RW)
4223  *
4224  */
4225 #define ESC_PHY_CFG1_RMII_P2_RXCK_REFCLK_OE_MASK (0x4U)
4226 #define ESC_PHY_CFG1_RMII_P2_RXCK_REFCLK_OE_SHIFT (2U)
4227 #define ESC_PHY_CFG1_RMII_P2_RXCK_REFCLK_OE_SET(x) (((uint32_t)(x) << ESC_PHY_CFG1_RMII_P2_RXCK_REFCLK_OE_SHIFT) & ESC_PHY_CFG1_RMII_P2_RXCK_REFCLK_OE_MASK)
4228 #define ESC_PHY_CFG1_RMII_P2_RXCK_REFCLK_OE_GET(x) (((uint32_t)(x) & ESC_PHY_CFG1_RMII_P2_RXCK_REFCLK_OE_MASK) >> ESC_PHY_CFG1_RMII_P2_RXCK_REFCLK_OE_SHIFT)
4229 
4230 /*
4231  * RMII_P1_RXCK_REFCLK_OE (RW)
4232  *
4233  */
4234 #define ESC_PHY_CFG1_RMII_P1_RXCK_REFCLK_OE_MASK (0x2U)
4235 #define ESC_PHY_CFG1_RMII_P1_RXCK_REFCLK_OE_SHIFT (1U)
4236 #define ESC_PHY_CFG1_RMII_P1_RXCK_REFCLK_OE_SET(x) (((uint32_t)(x) << ESC_PHY_CFG1_RMII_P1_RXCK_REFCLK_OE_SHIFT) & ESC_PHY_CFG1_RMII_P1_RXCK_REFCLK_OE_MASK)
4237 #define ESC_PHY_CFG1_RMII_P1_RXCK_REFCLK_OE_GET(x) (((uint32_t)(x) & ESC_PHY_CFG1_RMII_P1_RXCK_REFCLK_OE_MASK) >> ESC_PHY_CFG1_RMII_P1_RXCK_REFCLK_OE_SHIFT)
4238 
4239 /*
4240  * RMII_P0_RXCK_REFCLK_OE (RW)
4241  *
4242  */
4243 #define ESC_PHY_CFG1_RMII_P0_RXCK_REFCLK_OE_MASK (0x1U)
4244 #define ESC_PHY_CFG1_RMII_P0_RXCK_REFCLK_OE_SHIFT (0U)
4245 #define ESC_PHY_CFG1_RMII_P0_RXCK_REFCLK_OE_SET(x) (((uint32_t)(x) << ESC_PHY_CFG1_RMII_P0_RXCK_REFCLK_OE_SHIFT) & ESC_PHY_CFG1_RMII_P0_RXCK_REFCLK_OE_MASK)
4246 #define ESC_PHY_CFG1_RMII_P0_RXCK_REFCLK_OE_GET(x) (((uint32_t)(x) & ESC_PHY_CFG1_RMII_P0_RXCK_REFCLK_OE_MASK) >> ESC_PHY_CFG1_RMII_P0_RXCK_REFCLK_OE_SHIFT)
4247 
4248 /* Bitfield definition for register: GPIO_CTRL */
4249 /*
4250  * SW_LATCH_GPI (WO)
4251  *
4252  * if gpi_trig_sel is set to 4'b1001, setting this bit will latch GPI to gpi_reg0/1
4253  */
4254 #define ESC_GPIO_CTRL_SW_LATCH_GPI_MASK (0x80000000UL)
4255 #define ESC_GPIO_CTRL_SW_LATCH_GPI_SHIFT (31U)
4256 #define ESC_GPIO_CTRL_SW_LATCH_GPI_SET(x) (((uint32_t)(x) << ESC_GPIO_CTRL_SW_LATCH_GPI_SHIFT) & ESC_GPIO_CTRL_SW_LATCH_GPI_MASK)
4257 #define ESC_GPIO_CTRL_SW_LATCH_GPI_GET(x) (((uint32_t)(x) & ESC_GPIO_CTRL_SW_LATCH_GPI_MASK) >> ESC_GPIO_CTRL_SW_LATCH_GPI_SHIFT)
4258 
4259 /*
4260  * SW_LATCH_GPO (WO)
4261  *
4262  * if gpo_trig_sel is set to 4'b1001, setting this bit will latch GPO to gpo_reg0/1
4263  */
4264 #define ESC_GPIO_CTRL_SW_LATCH_GPO_MASK (0x40000000UL)
4265 #define ESC_GPIO_CTRL_SW_LATCH_GPO_SHIFT (30U)
4266 #define ESC_GPIO_CTRL_SW_LATCH_GPO_SET(x) (((uint32_t)(x) << ESC_GPIO_CTRL_SW_LATCH_GPO_SHIFT) & ESC_GPIO_CTRL_SW_LATCH_GPO_MASK)
4267 #define ESC_GPIO_CTRL_SW_LATCH_GPO_GET(x) (((uint32_t)(x) & ESC_GPIO_CTRL_SW_LATCH_GPO_MASK) >> ESC_GPIO_CTRL_SW_LATCH_GPO_SHIFT)
4268 
4269 /*
4270  * GPI_OVERRIDE_EN (RW)
4271  *
4272  * set this bit will use GPI from the software register gpi_override0/1
4273  * clr to use GPI from pad directly
4274  */
4275 #define ESC_GPIO_CTRL_GPI_OVERRIDE_EN_MASK (0x2000U)
4276 #define ESC_GPIO_CTRL_GPI_OVERRIDE_EN_SHIFT (13U)
4277 #define ESC_GPIO_CTRL_GPI_OVERRIDE_EN_SET(x) (((uint32_t)(x) << ESC_GPIO_CTRL_GPI_OVERRIDE_EN_SHIFT) & ESC_GPIO_CTRL_GPI_OVERRIDE_EN_MASK)
4278 #define ESC_GPIO_CTRL_GPI_OVERRIDE_EN_GET(x) (((uint32_t)(x) & ESC_GPIO_CTRL_GPI_OVERRIDE_EN_MASK) >> ESC_GPIO_CTRL_GPI_OVERRIDE_EN_SHIFT)
4279 
4280 /*
4281  * GPI_TRIG_EN (RW)
4282  *
4283  * use gpi_trig_sel can select the trigger event to latch GPI signal(from reg or pad)
4284  * set to use triggered signal;
4285  * clr to use signals direclty(from reg or pad)
4286  * assign pdi_gpi = gpi_trig_en ? gpi_reg :
4287  * (gpi_override_en ? gpi_override :pad_di_ecat_gpi);
4288  */
4289 #define ESC_GPIO_CTRL_GPI_TRIG_EN_MASK (0x1000U)
4290 #define ESC_GPIO_CTRL_GPI_TRIG_EN_SHIFT (12U)
4291 #define ESC_GPIO_CTRL_GPI_TRIG_EN_SET(x) (((uint32_t)(x) << ESC_GPIO_CTRL_GPI_TRIG_EN_SHIFT) & ESC_GPIO_CTRL_GPI_TRIG_EN_MASK)
4292 #define ESC_GPIO_CTRL_GPI_TRIG_EN_GET(x) (((uint32_t)(x) & ESC_GPIO_CTRL_GPI_TRIG_EN_MASK) >> ESC_GPIO_CTRL_GPI_TRIG_EN_SHIFT)
4293 
4294 /*
4295  * GPI_TRIG_SEL (RW)
4296  *
4297  * select the trigger signal to latch GPI.
4298  * 0000: SOF; 0001: EOF; 0010: pos of SYNC0; 0011: pos of SYNC1;
4299  * 0100: pos of LATCH0; 0101: pos of LATCH1; 0110: neg of LATCH0; 0111: neg of LATCH1
4300  * 1000: wdog trigger; 1001: sw set gpio_ctrl[31]; 1110: use gpi_trg_cfg for separate byte control
4301  * others no trigger
4302  */
4303 #define ESC_GPIO_CTRL_GPI_TRIG_SEL_MASK (0xF00U)
4304 #define ESC_GPIO_CTRL_GPI_TRIG_SEL_SHIFT (8U)
4305 #define ESC_GPIO_CTRL_GPI_TRIG_SEL_SET(x) (((uint32_t)(x) << ESC_GPIO_CTRL_GPI_TRIG_SEL_SHIFT) & ESC_GPIO_CTRL_GPI_TRIG_SEL_MASK)
4306 #define ESC_GPIO_CTRL_GPI_TRIG_SEL_GET(x) (((uint32_t)(x) & ESC_GPIO_CTRL_GPI_TRIG_SEL_MASK) >> ESC_GPIO_CTRL_GPI_TRIG_SEL_SHIFT)
4307 
4308 /*
4309  * GPO_TRIG_EN (RW)
4310  *
4311  * use gpo_trig_sel can select the trigger event to latch GPO signal(from core)
4312  * set to use triggered signal;
4313  * clr to use GPO signals direclty(from reg or pad)
4314  */
4315 #define ESC_GPIO_CTRL_GPO_TRIG_EN_MASK (0x10U)
4316 #define ESC_GPIO_CTRL_GPO_TRIG_EN_SHIFT (4U)
4317 #define ESC_GPIO_CTRL_GPO_TRIG_EN_SET(x) (((uint32_t)(x) << ESC_GPIO_CTRL_GPO_TRIG_EN_SHIFT) & ESC_GPIO_CTRL_GPO_TRIG_EN_MASK)
4318 #define ESC_GPIO_CTRL_GPO_TRIG_EN_GET(x) (((uint32_t)(x) & ESC_GPIO_CTRL_GPO_TRIG_EN_MASK) >> ESC_GPIO_CTRL_GPO_TRIG_EN_SHIFT)
4319 
4320 /*
4321  * GPO_TRIG_SEL (RW)
4322  *
4323  * select the trigger signal to latch GPO.
4324  * 0000: SOF; 0001: EOF; 0010: pos of SYNC0; 0011: pos of SYNC1;
4325  * 0100: pos of LATCH0; 0101: pos of LATCH1; 0110: neg of LATCH0; 0111: neg of LATCH1
4326  * 1000: wdog trigger; 1001: sw set gpio_ctrl[30]; 1110: use gpo_trg_cfg for separate byte control
4327  * others no trigger
4328  */
4329 #define ESC_GPIO_CTRL_GPO_TRIG_SEL_MASK (0xFU)
4330 #define ESC_GPIO_CTRL_GPO_TRIG_SEL_SHIFT (0U)
4331 #define ESC_GPIO_CTRL_GPO_TRIG_SEL_SET(x) (((uint32_t)(x) << ESC_GPIO_CTRL_GPO_TRIG_SEL_SHIFT) & ESC_GPIO_CTRL_GPO_TRIG_SEL_MASK)
4332 #define ESC_GPIO_CTRL_GPO_TRIG_SEL_GET(x) (((uint32_t)(x) & ESC_GPIO_CTRL_GPO_TRIG_SEL_MASK) >> ESC_GPIO_CTRL_GPO_TRIG_SEL_SHIFT)
4333 
4334 /* Bitfield definition for register: GPI_TRIG_CFG */
4335 /*
4336  * GPI_TRIG_CFG (RW)
4337  *
4338  * separage GPI trigger control for latch GPI, 0000~1001 are same as gpi_trig_sel, just 4bit for one byte.
4339  * Bit3:0 to control GPI[7:0], bit7:4 to control GPI[15:8]… bit31:28 to control GPI[63:56]
4340  */
4341 #define ESC_GPI_TRIG_CFG_GPI_TRIG_CFG_MASK (0xFFFFFFFFUL)
4342 #define ESC_GPI_TRIG_CFG_GPI_TRIG_CFG_SHIFT (0U)
4343 #define ESC_GPI_TRIG_CFG_GPI_TRIG_CFG_SET(x) (((uint32_t)(x) << ESC_GPI_TRIG_CFG_GPI_TRIG_CFG_SHIFT) & ESC_GPI_TRIG_CFG_GPI_TRIG_CFG_MASK)
4344 #define ESC_GPI_TRIG_CFG_GPI_TRIG_CFG_GET(x) (((uint32_t)(x) & ESC_GPI_TRIG_CFG_GPI_TRIG_CFG_MASK) >> ESC_GPI_TRIG_CFG_GPI_TRIG_CFG_SHIFT)
4345 
4346 /* Bitfield definition for register: GPO_TRIG_CFG */
4347 /*
4348  * GPO_TRIG_CFG (RW)
4349  *
4350  * separage GPO trigger control for latch GPO, 0000~1001 are same as gpo_trig_sel, just 4bit for one byte.
4351  * Bit3:0 to control GPO[7:0], bit7:4 to control GPO[15:8]… bit31:28 to control GPO[63:56]
4352  */
4353 #define ESC_GPO_TRIG_CFG_GPO_TRIG_CFG_MASK (0xFFFFFFFFUL)
4354 #define ESC_GPO_TRIG_CFG_GPO_TRIG_CFG_SHIFT (0U)
4355 #define ESC_GPO_TRIG_CFG_GPO_TRIG_CFG_SET(x) (((uint32_t)(x) << ESC_GPO_TRIG_CFG_GPO_TRIG_CFG_SHIFT) & ESC_GPO_TRIG_CFG_GPO_TRIG_CFG_MASK)
4356 #define ESC_GPO_TRIG_CFG_GPO_TRIG_CFG_GET(x) (((uint32_t)(x) & ESC_GPO_TRIG_CFG_GPO_TRIG_CFG_MASK) >> ESC_GPO_TRIG_CFG_GPO_TRIG_CFG_SHIFT)
4357 
4358 /* Bitfield definition for register: GPI_OVERRIDE0 */
4359 /*
4360  * GPR_OVERRIDE_LOW (RW)
4361  *
4362  */
4363 #define ESC_GPI_OVERRIDE0_GPR_OVERRIDE_LOW_MASK (0xFFFFFFFFUL)
4364 #define ESC_GPI_OVERRIDE0_GPR_OVERRIDE_LOW_SHIFT (0U)
4365 #define ESC_GPI_OVERRIDE0_GPR_OVERRIDE_LOW_SET(x) (((uint32_t)(x) << ESC_GPI_OVERRIDE0_GPR_OVERRIDE_LOW_SHIFT) & ESC_GPI_OVERRIDE0_GPR_OVERRIDE_LOW_MASK)
4366 #define ESC_GPI_OVERRIDE0_GPR_OVERRIDE_LOW_GET(x) (((uint32_t)(x) & ESC_GPI_OVERRIDE0_GPR_OVERRIDE_LOW_MASK) >> ESC_GPI_OVERRIDE0_GPR_OVERRIDE_LOW_SHIFT)
4367 
4368 /* Bitfield definition for register: GPI_OVERRIDE1 */
4369 /*
4370  * GPR_OVERRIDE_HIGH (RW)
4371  *
4372  */
4373 #define ESC_GPI_OVERRIDE1_GPR_OVERRIDE_HIGH_MASK (0xFFFFFFFFUL)
4374 #define ESC_GPI_OVERRIDE1_GPR_OVERRIDE_HIGH_SHIFT (0U)
4375 #define ESC_GPI_OVERRIDE1_GPR_OVERRIDE_HIGH_SET(x) (((uint32_t)(x) << ESC_GPI_OVERRIDE1_GPR_OVERRIDE_HIGH_SHIFT) & ESC_GPI_OVERRIDE1_GPR_OVERRIDE_HIGH_MASK)
4376 #define ESC_GPI_OVERRIDE1_GPR_OVERRIDE_HIGH_GET(x) (((uint32_t)(x) & ESC_GPI_OVERRIDE1_GPR_OVERRIDE_HIGH_MASK) >> ESC_GPI_OVERRIDE1_GPR_OVERRIDE_HIGH_SHIFT)
4377 
4378 /* Bitfield definition for register: GPO_REG0 */
4379 /*
4380  * VALUE (RO)
4381  *
4382  */
4383 #define ESC_GPO_REG0_VALUE_MASK (0xFFFFFFFFUL)
4384 #define ESC_GPO_REG0_VALUE_SHIFT (0U)
4385 #define ESC_GPO_REG0_VALUE_GET(x) (((uint32_t)(x) & ESC_GPO_REG0_VALUE_MASK) >> ESC_GPO_REG0_VALUE_SHIFT)
4386 
4387 /* Bitfield definition for register: GPO_REG1 */
4388 /*
4389  * VALUE (RO)
4390  *
4391  */
4392 #define ESC_GPO_REG1_VALUE_MASK (0xFFFFFFFFUL)
4393 #define ESC_GPO_REG1_VALUE_SHIFT (0U)
4394 #define ESC_GPO_REG1_VALUE_GET(x) (((uint32_t)(x) & ESC_GPO_REG1_VALUE_MASK) >> ESC_GPO_REG1_VALUE_SHIFT)
4395 
4396 /* Bitfield definition for register: GPI_REG0 */
4397 /*
4398  * VALUE (RO)
4399  *
4400  */
4401 #define ESC_GPI_REG0_VALUE_MASK (0xFFFFFFFFUL)
4402 #define ESC_GPI_REG0_VALUE_SHIFT (0U)
4403 #define ESC_GPI_REG0_VALUE_GET(x) (((uint32_t)(x) & ESC_GPI_REG0_VALUE_MASK) >> ESC_GPI_REG0_VALUE_SHIFT)
4404 
4405 /* Bitfield definition for register: GPI_REG1 */
4406 /*
4407  * VALUE (RO)
4408  *
4409  */
4410 #define ESC_GPI_REG1_VALUE_MASK (0xFFFFFFFFUL)
4411 #define ESC_GPI_REG1_VALUE_SHIFT (0U)
4412 #define ESC_GPI_REG1_VALUE_GET(x) (((uint32_t)(x) & ESC_GPI_REG1_VALUE_MASK) >> ESC_GPI_REG1_VALUE_SHIFT)
4413 
4414 /* Bitfield definition for register: GPR_STATUS */
4415 /*
4416  * NLINK2_PADSEL (RO)
4417  *
4418  */
4419 #define ESC_GPR_STATUS_NLINK2_PADSEL_MASK (0xF0000000UL)
4420 #define ESC_GPR_STATUS_NLINK2_PADSEL_SHIFT (28U)
4421 #define ESC_GPR_STATUS_NLINK2_PADSEL_GET(x) (((uint32_t)(x) & ESC_GPR_STATUS_NLINK2_PADSEL_MASK) >> ESC_GPR_STATUS_NLINK2_PADSEL_SHIFT)
4422 
4423 /*
4424  * NLINK1_PADSEL (RO)
4425  *
4426  */
4427 #define ESC_GPR_STATUS_NLINK1_PADSEL_MASK (0xF000000UL)
4428 #define ESC_GPR_STATUS_NLINK1_PADSEL_SHIFT (24U)
4429 #define ESC_GPR_STATUS_NLINK1_PADSEL_GET(x) (((uint32_t)(x) & ESC_GPR_STATUS_NLINK1_PADSEL_MASK) >> ESC_GPR_STATUS_NLINK1_PADSEL_SHIFT)
4430 
4431 /*
4432  * NLINK0_PADSEL (RO)
4433  *
4434  */
4435 #define ESC_GPR_STATUS_NLINK0_PADSEL_MASK (0xF00000UL)
4436 #define ESC_GPR_STATUS_NLINK0_PADSEL_SHIFT (20U)
4437 #define ESC_GPR_STATUS_NLINK0_PADSEL_GET(x) (((uint32_t)(x) & ESC_GPR_STATUS_NLINK0_PADSEL_MASK) >> ESC_GPR_STATUS_NLINK0_PADSEL_SHIFT)
4438 
4439 /*
4440  * PDI_SOF (RO)
4441  *
4442  */
4443 #define ESC_GPR_STATUS_PDI_SOF_MASK (0x80000UL)
4444 #define ESC_GPR_STATUS_PDI_SOF_SHIFT (19U)
4445 #define ESC_GPR_STATUS_PDI_SOF_GET(x) (((uint32_t)(x) & ESC_GPR_STATUS_PDI_SOF_MASK) >> ESC_GPR_STATUS_PDI_SOF_SHIFT)
4446 
4447 /*
4448  * PDI_EOF (RO)
4449  *
4450  */
4451 #define ESC_GPR_STATUS_PDI_EOF_MASK (0x40000UL)
4452 #define ESC_GPR_STATUS_PDI_EOF_SHIFT (18U)
4453 #define ESC_GPR_STATUS_PDI_EOF_GET(x) (((uint32_t)(x) & ESC_GPR_STATUS_PDI_EOF_MASK) >> ESC_GPR_STATUS_PDI_EOF_SHIFT)
4454 
4455 /*
4456  * PDI_WD_TRIGGER (RO)
4457  *
4458  */
4459 #define ESC_GPR_STATUS_PDI_WD_TRIGGER_MASK (0x20000UL)
4460 #define ESC_GPR_STATUS_PDI_WD_TRIGGER_SHIFT (17U)
4461 #define ESC_GPR_STATUS_PDI_WD_TRIGGER_GET(x) (((uint32_t)(x) & ESC_GPR_STATUS_PDI_WD_TRIGGER_MASK) >> ESC_GPR_STATUS_PDI_WD_TRIGGER_SHIFT)
4462 
4463 /*
4464  * PDI_WD_STATE (RO)
4465  *
4466  */
4467 #define ESC_GPR_STATUS_PDI_WD_STATE_MASK (0x10000UL)
4468 #define ESC_GPR_STATUS_PDI_WD_STATE_SHIFT (16U)
4469 #define ESC_GPR_STATUS_PDI_WD_STATE_GET(x) (((uint32_t)(x) & ESC_GPR_STATUS_PDI_WD_STATE_MASK) >> ESC_GPR_STATUS_PDI_WD_STATE_SHIFT)
4470 
4471 /*
4472  * SYNC_OUT1 (RO)
4473  *
4474  */
4475 #define ESC_GPR_STATUS_SYNC_OUT1_MASK (0x200U)
4476 #define ESC_GPR_STATUS_SYNC_OUT1_SHIFT (9U)
4477 #define ESC_GPR_STATUS_SYNC_OUT1_GET(x) (((uint32_t)(x) & ESC_GPR_STATUS_SYNC_OUT1_MASK) >> ESC_GPR_STATUS_SYNC_OUT1_SHIFT)
4478 
4479 /*
4480  * SYNC_OUT0 (RO)
4481  *
4482  */
4483 #define ESC_GPR_STATUS_SYNC_OUT0_MASK (0x100U)
4484 #define ESC_GPR_STATUS_SYNC_OUT0_SHIFT (8U)
4485 #define ESC_GPR_STATUS_SYNC_OUT0_GET(x) (((uint32_t)(x) & ESC_GPR_STATUS_SYNC_OUT0_MASK) >> ESC_GPR_STATUS_SYNC_OUT0_SHIFT)
4486 
4487 /*
4488  * LED_STATE_RUN (RO)
4489  *
4490  */
4491 #define ESC_GPR_STATUS_LED_STATE_RUN_MASK (0x40U)
4492 #define ESC_GPR_STATUS_LED_STATE_RUN_SHIFT (6U)
4493 #define ESC_GPR_STATUS_LED_STATE_RUN_GET(x) (((uint32_t)(x) & ESC_GPR_STATUS_LED_STATE_RUN_MASK) >> ESC_GPR_STATUS_LED_STATE_RUN_SHIFT)
4494 
4495 /*
4496  * LED_ERR (RO)
4497  *
4498  */
4499 #define ESC_GPR_STATUS_LED_ERR_MASK (0x20U)
4500 #define ESC_GPR_STATUS_LED_ERR_SHIFT (5U)
4501 #define ESC_GPR_STATUS_LED_ERR_GET(x) (((uint32_t)(x) & ESC_GPR_STATUS_LED_ERR_MASK) >> ESC_GPR_STATUS_LED_ERR_SHIFT)
4502 
4503 /*
4504  * LED_RUN (RO)
4505  *
4506  */
4507 #define ESC_GPR_STATUS_LED_RUN_MASK (0x10U)
4508 #define ESC_GPR_STATUS_LED_RUN_SHIFT (4U)
4509 #define ESC_GPR_STATUS_LED_RUN_GET(x) (((uint32_t)(x) & ESC_GPR_STATUS_LED_RUN_MASK) >> ESC_GPR_STATUS_LED_RUN_SHIFT)
4510 
4511 /*
4512  * DEV_STATE (RO)
4513  *
4514  */
4515 #define ESC_GPR_STATUS_DEV_STATE_MASK (0x8U)
4516 #define ESC_GPR_STATUS_DEV_STATE_SHIFT (3U)
4517 #define ESC_GPR_STATUS_DEV_STATE_GET(x) (((uint32_t)(x) & ESC_GPR_STATUS_DEV_STATE_MASK) >> ESC_GPR_STATUS_DEV_STATE_SHIFT)
4518 
4519 /*
4520  * LINK_ACT (RO)
4521  *
4522  */
4523 #define ESC_GPR_STATUS_LINK_ACT_MASK (0x7U)
4524 #define ESC_GPR_STATUS_LINK_ACT_SHIFT (0U)
4525 #define ESC_GPR_STATUS_LINK_ACT_GET(x) (((uint32_t)(x) & ESC_GPR_STATUS_LINK_ACT_MASK) >> ESC_GPR_STATUS_LINK_ACT_SHIFT)
4526 
4527 /* Bitfield definition for register array: IO_CFG */
4528 /*
4529  * INVERT (RW)
4530  *
4531  * 1:invert the IO
4532  */
4533 #define ESC_IO_CFG_INVERT_MASK (0x10U)
4534 #define ESC_IO_CFG_INVERT_SHIFT (4U)
4535 #define ESC_IO_CFG_INVERT_SET(x) (((uint32_t)(x) << ESC_IO_CFG_INVERT_SHIFT) & ESC_IO_CFG_INVERT_MASK)
4536 #define ESC_IO_CFG_INVERT_GET(x) (((uint32_t)(x) & ESC_IO_CFG_INVERT_MASK) >> ESC_IO_CFG_INVERT_SHIFT)
4537 
4538 /*
4539  * FUNC_ALT (RW)
4540  *
4541  * IO usage:
4542  * 0:NMII_LINK0
4543  * 1:NMII_LINK1
4544  * 2:NMII_LINK2
4545  * 3:LINK_ACT0
4546  * 4:LINK_ACT1
4547  * 5:LINK_ACT2
4548  * 6:LED_RUN
4549  * 7:LED_ERR
4550  * 8:RESET_OUT
4551  */
4552 #define ESC_IO_CFG_FUNC_ALT_MASK (0xFU)
4553 #define ESC_IO_CFG_FUNC_ALT_SHIFT (0U)
4554 #define ESC_IO_CFG_FUNC_ALT_SET(x) (((uint32_t)(x) << ESC_IO_CFG_FUNC_ALT_SHIFT) & ESC_IO_CFG_FUNC_ALT_MASK)
4555 #define ESC_IO_CFG_FUNC_ALT_GET(x) (((uint32_t)(x) & ESC_IO_CFG_FUNC_ALT_MASK) >> ESC_IO_CFG_FUNC_ALT_SHIFT)
4556 
4557 
4558 
4559 /* RX_ERR_CNT register group index macro definition */
4560 #define ESC_RX_ERR_CNT_PORT0 (0UL)
4561 #define ESC_RX_ERR_CNT_PORT1 (1UL)
4562 #define ESC_RX_ERR_CNT_PORT2 (2UL)
4563 #define ESC_RX_ERR_CNT_PORT3 (3UL)
4564 
4565 /* FWD_RX_ERR_CNT register group index macro definition */
4566 #define ESC_FWD_RX_ERR_CNT_PORT0 (0UL)
4567 #define ESC_FWD_RX_ERR_CNT_PORT1 (1UL)
4568 #define ESC_FWD_RX_ERR_CNT_PORT2 (2UL)
4569 #define ESC_FWD_RX_ERR_CNT_PORT3 (3UL)
4570 
4571 /* LOST_LINK_CNT register group index macro definition */
4572 #define ESC_LOST_LINK_CNT_PORT0 (0UL)
4573 #define ESC_LOST_LINK_CNT_PORT1 (1UL)
4574 #define ESC_LOST_LINK_CNT_PORT2 (2UL)
4575 #define ESC_LOST_LINK_CNT_PORT3 (3UL)
4576 
4577 /* PHY_STAT register group index macro definition */
4578 #define ESC_PHY_STAT_PORT0 (0UL)
4579 #define ESC_PHY_STAT_PORT1 (1UL)
4580 #define ESC_PHY_STAT_PORT2 (2UL)
4581 #define ESC_PHY_STAT_PORT3 (3UL)
4582 
4583 /* FMMU register group index macro definition */
4584 #define ESC_FMMU_0 (0UL)
4585 #define ESC_FMMU_1 (1UL)
4586 #define ESC_FMMU_2 (2UL)
4587 #define ESC_FMMU_3 (3UL)
4588 #define ESC_FMMU_4 (4UL)
4589 #define ESC_FMMU_5 (5UL)
4590 #define ESC_FMMU_6 (6UL)
4591 #define ESC_FMMU_7 (7UL)
4592 
4593 /* SYNCM register group index macro definition */
4594 #define ESC_SYNCM_0 (0UL)
4595 #define ESC_SYNCM_1 (1UL)
4596 #define ESC_SYNCM_2 (2UL)
4597 #define ESC_SYNCM_3 (3UL)
4598 #define ESC_SYNCM_4 (4UL)
4599 #define ESC_SYNCM_5 (5UL)
4600 #define ESC_SYNCM_6 (6UL)
4601 #define ESC_SYNCM_7 (7UL)
4602 
4603 /* RCV_TIME register group index macro definition */
4604 #define ESC_RCV_TIME_PORT0 (0UL)
4605 #define ESC_RCV_TIME_PORT1 (1UL)
4606 #define ESC_RCV_TIME_PORT2 (2UL)
4607 #define ESC_RCV_TIME_PORT3 (3UL)
4608 
4609 /* IO_CFG register group index macro definition */
4610 #define ESC_IO_CFG_CTR0 (0UL)
4611 #define ESC_IO_CFG_CTR1 (1UL)
4612 #define ESC_IO_CFG_CTR2 (2UL)
4613 #define ESC_IO_CFG_CTR3 (3UL)
4614 #define ESC_IO_CFG_CTR4 (4UL)
4615 #define ESC_IO_CFG_CTR5 (5UL)
4616 #define ESC_IO_CFG_CTR6 (6UL)
4617 #define ESC_IO_CFG_CTR7 (7UL)
4618 #define ESC_IO_CFG_CTR8 (8UL)
4619 
4620 
4621 #endif /* HPM_ESC_H */
#define PID
Definition: hpm_ov7725.h:62
Definition: hpm_esc_regs.h:12