timer_group_struct.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789
  1. /**
  2. * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include <stdint.h>
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. /** Group: Configuration and Control Register */
  12. /** Type of txconfig register
  13. * Timer x configuration register
  14. */
  15. typedef union {
  16. struct {
  17. uint32_t reserved_0:9;
  18. /** tx_use_xtal : R/W; bitpos: [9]; default: 0;
  19. * 1: Use XTAL_CLK as the source clock of timer group. 0: Use APB_CLK as the source
  20. * clock of timer group.
  21. */
  22. uint32_t tx_use_xtal:1;
  23. /** tx_alarm_en : R/W; bitpos: [10]; default: 0;
  24. * When set, the alarm is enabled. This bit is automatically cleared once an
  25. *
  26. * alarm occurs.
  27. */
  28. uint32_t tx_alarm_en:1;
  29. /** tx_level_int_en : R/W; bitpos: [11]; default: 0;
  30. * When set, an alarm will generate a level type interrupt.
  31. */
  32. uint32_t tx_level_int_en:1;
  33. /** tx_edge_int_en : R/W; bitpos: [12]; default: 0;
  34. * When set, an alarm will generate an edge type interrupt.
  35. */
  36. uint32_t tx_edge_int_en:1;
  37. /** tx_divider : R/W; bitpos: [28:13]; default: 1;
  38. * Timer x clock (Tx_clk) prescaler value.
  39. */
  40. uint32_t tx_divider:16;
  41. /** tx_autoreload : R/W; bitpos: [29]; default: 1;
  42. * When set, timer x auto-reload at alarm is enabled.
  43. */
  44. uint32_t tx_autoreload:1;
  45. /** tx_increase : R/W; bitpos: [30]; default: 1;
  46. * When set, the timer x time-base counter will increment every clock tick. When
  47. *
  48. * cleared, the timer x time-base counter will decrement.
  49. */
  50. uint32_t tx_increase:1;
  51. /** tx_en : R/W; bitpos: [31]; default: 0;
  52. * When set, the timer x time-base counter is enabled.
  53. */
  54. uint32_t tx_en:1;
  55. };
  56. uint32_t val;
  57. } timg_txconfig_reg_t;
  58. /** Type of txlo register
  59. * Timer x current value, low 32 bits
  60. */
  61. typedef union {
  62. struct {
  63. /** tx_lo : RO; bitpos: [31:0]; default: 0;
  64. * After writing to TIMG_TxUPDATE_REG, the low 32 bits of the time-base counter
  65. *
  66. * of timer x can be read here.
  67. */
  68. uint32_t tx_lo:32;
  69. };
  70. uint32_t val;
  71. } timg_txlo_reg_t;
  72. /** Type of txhi register
  73. * Timer x current value, high 32 bits
  74. */
  75. typedef union {
  76. struct {
  77. /** tx_hi : RO; bitpos: [31:0]; default: 0;
  78. * After writing to TIMG_TxUPDATE_REG, the high 32 bits of the time-base counter
  79. *
  80. * of timer x can be read here.
  81. */
  82. uint32_t tx_hi:32;
  83. };
  84. uint32_t val;
  85. } timg_txhi_reg_t;
  86. /** Type of txupdate register
  87. * Write to copy current timer value to TIMGn_Tx_(LO/HI)_REG
  88. */
  89. typedef union {
  90. struct {
  91. uint32_t reserved_0:31;
  92. /** tx_update : R/W; bitpos: [31]; default: 0;
  93. * After writing 0 or 1 to TIMG_TxUPDATE_REG, the counter value is latched.
  94. */
  95. uint32_t tx_update:1;
  96. };
  97. uint32_t val;
  98. } timg_txupdate_reg_t;
  99. /** Type of txalarmlo register
  100. * Timer x alarm value, low 32 bits
  101. */
  102. typedef union {
  103. struct {
  104. /** tx_alarm_lo : R/W; bitpos: [31:0]; default: 0;
  105. * Timer x alarm trigger time-base counter value, low 32 bits.
  106. */
  107. uint32_t tx_alarm_lo:32;
  108. };
  109. uint32_t val;
  110. } timg_txalarmlo_reg_t;
  111. /** Type of txalarmhi register
  112. * Timer x alarm value, high bits
  113. */
  114. typedef union {
  115. struct {
  116. /** tx_alarm_hi : R/W; bitpos: [31:0]; default: 0;
  117. *
  118. *
  119. * Timer x alarm trigger time-base counter value, high 32 bits.
  120. */
  121. uint32_t tx_alarm_hi:32;
  122. };
  123. uint32_t val;
  124. } timg_txalarmhi_reg_t;
  125. /** Type of txloadlo register
  126. * Timer x reload value, low 32 bits
  127. */
  128. typedef union {
  129. struct {
  130. /** tx_load_lo : R/W; bitpos: [31:0]; default: 0;
  131. *
  132. *
  133. * Low 32 bits of the value that a reload will load onto timer x time-base
  134. *
  135. * Counter.
  136. */
  137. uint32_t tx_load_lo:32;
  138. };
  139. uint32_t val;
  140. } timg_txloadlo_reg_t;
  141. /** Type of txloadhi register
  142. * Timer x reload value, high 32 bits
  143. */
  144. typedef union {
  145. struct {
  146. /** tx_load_hi : R/W; bitpos: [31:0]; default: 0;
  147. *
  148. *
  149. * High 32 bits of the value that a reload will load onto timer x time-base
  150. *
  151. * counter.
  152. */
  153. uint32_t tx_load_hi:32;
  154. };
  155. uint32_t val;
  156. } timg_txloadhi_reg_t;
  157. /** Type of txload register
  158. * Write to reload timer from TIMG_T0_(LOADLOLOADHI)_REG
  159. */
  160. typedef union {
  161. struct {
  162. /** tx_load : WO; bitpos: [31:0]; default: 0;
  163. *
  164. *
  165. * Write any value to trigger a timer x time-base counter reload.
  166. */
  167. uint32_t tx_load:32;
  168. };
  169. uint32_t val;
  170. } timg_txload_reg_t;
  171. /** Group: Configuration and Control Register for WDT */
  172. /** Type of wdtconfig0 register
  173. * Watchdog timer configuration register
  174. */
  175. typedef union {
  176. struct {
  177. uint32_t reserved_0:12;
  178. /** wdt_appcpu_reset_en : R/W; bitpos: [12]; default: 0;
  179. * Reserved
  180. */
  181. uint32_t wdt_appcpu_reset_en:1;
  182. /** wdt_procpu_reset_en : R/W; bitpos: [13]; default: 0;
  183. * WDT reset CPU enable.
  184. */
  185. uint32_t wdt_procpu_reset_en:1;
  186. /** wdt_flashboot_mod_en : R/W; bitpos: [14]; default: 1;
  187. * When set, Flash boot protection is enabled.
  188. */
  189. uint32_t wdt_flashboot_mod_en:1;
  190. /** wdt_sys_reset_length : R/W; bitpos: [17:15]; default: 1;
  191. * System reset signal length selection. 0: 100 ns, 1: 200 ns,
  192. *
  193. * 2: 300 ns, 3: 400 ns, 4: 500 ns, 5: 800 ns, 6: 1.6 us, 7: 3.2 us.
  194. */
  195. uint32_t wdt_sys_reset_length:3;
  196. /** wdt_cpu_reset_length : R/W; bitpos: [20:18]; default: 1;
  197. * CPU reset signal length selection. 0: 100 ns, 1: 200 ns,
  198. *
  199. * 2: 300 ns, 3: 400 ns, 4: 500 ns, 5: 800 ns, 6: 1.6 us, 7: 3.2 us.
  200. */
  201. uint32_t wdt_cpu_reset_length:3;
  202. /** wdt_level_int_en : R/W; bitpos: [21]; default: 0;
  203. * When set, a level type interrupt will occur at the timeout of a stage
  204. *
  205. * configured to generate an interrupt.
  206. */
  207. uint32_t wdt_level_int_en:1;
  208. /** wdt_edge_int_en : R/W; bitpos: [22]; default: 0;
  209. * When set, an edge type interrupt will occur at the timeout of a stage
  210. *
  211. * configured to generate an interrupt.
  212. */
  213. uint32_t wdt_edge_int_en:1;
  214. /** wdt_stg3 : R/W; bitpos: [24:23]; default: 0;
  215. * Stage 3 configuration. 0: off, 1: interrupt, 2: reset CPU, 3: reset system.
  216. *
  217. */
  218. uint32_t wdt_stg3:2;
  219. /** wdt_stg2 : R/W; bitpos: [26:25]; default: 0;
  220. * Stage 2 configuration. 0: off, 1: interrupt, 2: reset CPU, 3: reset system.
  221. *
  222. */
  223. uint32_t wdt_stg2:2;
  224. /** wdt_stg1 : R/W; bitpos: [28:27]; default: 0;
  225. * Stage 1 configuration. 0: off, 1: interrupt, 2: reset CPU, 3: reset system.
  226. *
  227. */
  228. uint32_t wdt_stg1:2;
  229. /** wdt_stg0 : R/W; bitpos: [30:29]; default: 0;
  230. * Stage 0 configuration. 0: off, 1: interrupt, 2: reset CPU, 3: reset system.
  231. *
  232. */
  233. uint32_t wdt_stg0:2;
  234. /** wdt_en : R/W; bitpos: [31]; default: 0;
  235. * When set, MWDT is enabled.
  236. */
  237. uint32_t wdt_en:1;
  238. };
  239. uint32_t val;
  240. } timg_wdtconfig0_reg_t;
  241. /** Type of wdtconfig1 register
  242. * Watchdog timer prescaler register
  243. */
  244. typedef union {
  245. struct {
  246. uint32_t reserved_0:16;
  247. /** wdt_clk_prescaler : R/W; bitpos: [31:16]; default: 1;
  248. * MWDT clock prescaler value. MWDT clock period = 12.5 ns *
  249. *
  250. * TIMG_WDT_CLK_PRESCALE.
  251. */
  252. uint32_t wdt_clk_prescaler:16;
  253. };
  254. uint32_t val;
  255. } timg_wdtconfig1_reg_t;
  256. /** Type of wdtconfig2 register
  257. * Watchdog timer stage 0 timeout value
  258. */
  259. typedef union {
  260. struct {
  261. /** wdt_stg0_hold : R/W; bitpos: [31:0]; default: 26000000;
  262. * Stage 0 timeout value, in MWDT clock cycles.
  263. */
  264. uint32_t wdt_stg0_hold:32;
  265. };
  266. uint32_t val;
  267. } timg_wdtconfig2_reg_t;
  268. /** Type of wdtconfig3 register
  269. * Watchdog timer stage 1 timeout value
  270. */
  271. typedef union {
  272. struct {
  273. /** wdt_stg1_hold : R/W; bitpos: [31:0]; default: 134217727;
  274. * Stage 1 timeout value, in MWDT clock cycles.
  275. */
  276. uint32_t wdt_stg1_hold:32;
  277. };
  278. uint32_t val;
  279. } timg_wdtconfig3_reg_t;
  280. /** Type of wdtconfig4 register
  281. * Watchdog timer stage 2 timeout value
  282. */
  283. typedef union {
  284. struct {
  285. /** wdt_stg2_hold : R/W; bitpos: [31:0]; default: 1048575;
  286. * Stage 2 timeout value, in MWDT clock cycles.
  287. */
  288. uint32_t wdt_stg2_hold:32;
  289. };
  290. uint32_t val;
  291. } timg_wdtconfig4_reg_t;
  292. /** Type of wdtconfig5 register
  293. * Watchdog timer stage 3 timeout value
  294. */
  295. typedef union {
  296. struct {
  297. /** wdt_stg3_hold : R/W; bitpos: [31:0]; default: 1048575;
  298. * Stage 3 timeout value, in MWDT clock cycles.
  299. */
  300. uint32_t wdt_stg3_hold:32;
  301. };
  302. uint32_t val;
  303. } timg_wdtconfig5_reg_t;
  304. /** Type of wdtfeed register
  305. * Write to feed the watchdog timer
  306. */
  307. typedef union {
  308. struct {
  309. /** wdt_feed : WO; bitpos: [31:0]; default: 0;
  310. * Write any value to feed the MWDT. (WO)
  311. */
  312. uint32_t wdt_feed:32;
  313. };
  314. uint32_t val;
  315. } timg_wdtfeed_reg_t;
  316. /** Type of wdtwprotect register
  317. * Watchdog write protect register
  318. */
  319. typedef union {
  320. struct {
  321. /** wdt_wkey : R/W; bitpos: [31:0]; default: 1356348065;
  322. * If the register contains a different value than its reset value, write
  323. *
  324. * protection is enabled.
  325. */
  326. uint32_t wdt_wkey:32;
  327. };
  328. uint32_t val;
  329. } timg_wdtwprotect_reg_t;
  330. /** Group: Configuration and Control Register for RTC CALI */
  331. /** Type of rtccalicfg register
  332. * RTC calibration configuration register
  333. */
  334. typedef union {
  335. struct {
  336. uint32_t reserved_0:12;
  337. /** rtc_cali_start_cycling : R/W; bitpos: [12]; default: 1;
  338. * Reserved
  339. */
  340. uint32_t rtc_cali_start_cycling:1;
  341. /** rtc_cali_clk_sel : R/W; bitpos: [14:13]; default: 1;
  342. * 0:rtcslowclock. 1:clk_80m. 2:xtal_32k.
  343. */
  344. uint32_t rtc_cali_clk_sel:2;
  345. /** rtc_cali_rdy : RO; bitpos: [15]; default: 0;
  346. * Reserved
  347. */
  348. uint32_t rtc_cali_rdy:1;
  349. /** rtc_cali_max : R/W; bitpos: [30:16]; default: 1;
  350. * Reserved
  351. */
  352. uint32_t rtc_cali_max:15;
  353. /** rtc_cali_start : R/W; bitpos: [31]; default: 0;
  354. * Reserved
  355. */
  356. uint32_t rtc_cali_start:1;
  357. };
  358. uint32_t val;
  359. } timg_rtccalicfg_reg_t;
  360. /** Type of rtccalicfg1 register
  361. * RTC calibration configuration1 register
  362. */
  363. typedef union {
  364. struct {
  365. /** rtc_cali_cycling_data_vld : RO; bitpos: [0]; default: 0;
  366. * Reserved
  367. */
  368. uint32_t rtc_cali_cycling_data_vld:1;
  369. uint32_t reserved_1:6;
  370. /** rtc_cali_value : RO; bitpos: [31:7]; default: 0;
  371. * Reserved
  372. */
  373. uint32_t rtc_cali_value:25;
  374. };
  375. uint32_t val;
  376. } timg_rtccalicfg1_reg_t;
  377. /** Type of rtccalicfg2 register
  378. * Timer group calibration register
  379. */
  380. typedef union {
  381. struct {
  382. /** rtc_cali_timeout : RO; bitpos: [0]; default: 0;
  383. * RTC calibration timeout indicator
  384. */
  385. uint32_t rtc_cali_timeout:1;
  386. uint32_t reserved_1:2;
  387. /** rtc_cali_timeout_rst_cnt : R/W; bitpos: [6:3]; default: 3;
  388. * Cycles that release calibration timeout reset
  389. */
  390. uint32_t rtc_cali_timeout_rst_cnt:4;
  391. /** rtc_cali_timeout_thres : R/W; bitpos: [31:7]; default: 33554431;
  392. * Threshold value for the RTC calibration timer. If the calibration timer's value
  393. * exceeds this threshold, a timeout is triggered.
  394. */
  395. uint32_t rtc_cali_timeout_thres:25;
  396. };
  397. uint32_t val;
  398. } timg_rtccalicfg2_reg_t;
  399. /** Group: Configuration and Control Register for LACT */
  400. /** Type of lactconfig register
  401. * LACT configuration register
  402. */
  403. typedef union {
  404. struct {
  405. uint32_t reserved_0:6;
  406. /** lact_use_reftick : R/W; bitpos: [6]; default: 0;
  407. * Reserved
  408. */
  409. uint32_t lact_use_reftick:1;
  410. /** lact_rtc_only : R/W; bitpos: [7]; default: 0;
  411. * Reserved
  412. */
  413. uint32_t lact_rtc_only:1;
  414. /** lact_cpst_en : R/W; bitpos: [8]; default: 1;
  415. * Reserved
  416. */
  417. uint32_t lact_cpst_en:1;
  418. /** lact_lac_en : R/W; bitpos: [9]; default: 1;
  419. * Reserved
  420. */
  421. uint32_t lact_lac_en:1;
  422. /** lact_alarm_en : R/W; bitpos: [10]; default: 0;
  423. * Reserved
  424. */
  425. uint32_t lact_alarm_en:1;
  426. /** lact_level_int_en : R/W; bitpos: [11]; default: 0;
  427. * Reserved
  428. */
  429. uint32_t lact_level_int_en:1;
  430. /** lact_edge_int_en : R/W; bitpos: [12]; default: 0;
  431. * Reserved
  432. */
  433. uint32_t lact_edge_int_en:1;
  434. /** lact_divider : R/W; bitpos: [28:13]; default: 1;
  435. * Reserved
  436. */
  437. uint32_t lact_divider:16;
  438. /** lact_autoreload : R/W; bitpos: [29]; default: 1;
  439. * Reserved
  440. */
  441. uint32_t lact_autoreload:1;
  442. /** lact_increase : R/W; bitpos: [30]; default: 1;
  443. * Reserved
  444. */
  445. uint32_t lact_increase:1;
  446. /** lact_en : R/W; bitpos: [31]; default: 0;
  447. * Reserved
  448. */
  449. uint32_t lact_en:1;
  450. };
  451. uint32_t val;
  452. } timg_lactconfig_reg_t;
  453. /** Type of lactrtc register
  454. * LACT RTC register
  455. */
  456. typedef union {
  457. struct {
  458. uint32_t reserved_0:6;
  459. /** lact_rtc_step_len : R/W; bitpos: [31:6]; default: 0;
  460. * Reserved
  461. */
  462. uint32_t lact_rtc_step_len:26;
  463. };
  464. uint32_t val;
  465. } timg_lactrtc_reg_t;
  466. /** Type of lactlo register
  467. * LACT low register
  468. */
  469. typedef union {
  470. struct {
  471. /** lact_lo : RO; bitpos: [31:0]; default: 0;
  472. * Reserved
  473. */
  474. uint32_t lact_lo:32;
  475. };
  476. uint32_t val;
  477. } timg_lactlo_reg_t;
  478. /** Type of lacthi register
  479. * LACT high register
  480. */
  481. typedef union {
  482. struct {
  483. /** lact_hi : RO; bitpos: [31:0]; default: 0;
  484. * Reserved
  485. */
  486. uint32_t lact_hi:32;
  487. };
  488. uint32_t val;
  489. } timg_lacthi_reg_t;
  490. /** Type of lactupdate register
  491. * LACT update register
  492. */
  493. typedef union {
  494. struct {
  495. /** lact_update : WO; bitpos: [31:0]; default: 0;
  496. * Reserved
  497. */
  498. uint32_t lact_update:32;
  499. };
  500. uint32_t val;
  501. } timg_lactupdate_reg_t;
  502. /** Type of lactalarmlo register
  503. * LACT alarm low register
  504. */
  505. typedef union {
  506. struct {
  507. /** lact_alarm_lo : R/W; bitpos: [31:0]; default: 0;
  508. * Reserved
  509. */
  510. uint32_t lact_alarm_lo:32;
  511. };
  512. uint32_t val;
  513. } timg_lactalarmlo_reg_t;
  514. /** Type of lactalarmhi register
  515. * LACT alarm high register
  516. */
  517. typedef union {
  518. struct {
  519. /** lact_alarm_hi : R/W; bitpos: [31:0]; default: 0;
  520. * Reserved
  521. */
  522. uint32_t lact_alarm_hi:32;
  523. };
  524. uint32_t val;
  525. } timg_lactalarmhi_reg_t;
  526. /** Type of lactloadlo register
  527. * LACT load low register
  528. */
  529. typedef union {
  530. struct {
  531. /** lact_load_lo : R/W; bitpos: [31:0]; default: 0;
  532. * Reserved
  533. */
  534. uint32_t lact_load_lo:32;
  535. };
  536. uint32_t val;
  537. } timg_lactloadlo_reg_t;
  538. /** Type of lactloadhi register
  539. * Timer LACT load high register
  540. */
  541. typedef union {
  542. struct {
  543. /** lact_load_hi : R/W; bitpos: [31:0]; default: 0;
  544. * Reserved
  545. */
  546. uint32_t lact_load_hi:32;
  547. };
  548. uint32_t val;
  549. } timg_lactloadhi_reg_t;
  550. /** Type of lactload register
  551. * Timer LACT load register
  552. */
  553. typedef union {
  554. struct {
  555. /** lact_load : WO; bitpos: [31:0]; default: 0;
  556. * Reserved
  557. */
  558. uint32_t lact_load:32;
  559. };
  560. uint32_t val;
  561. } timg_lactload_reg_t;
  562. /** Group: Interrupt Register */
  563. /** Type of int_ena_timers register
  564. * Interrupt enable bits
  565. */
  566. typedef union {
  567. struct {
  568. /** tx_int_ena : R/W; bitpos: [0]; default: 0;
  569. * The interrupt enable bit for the TIMG_T0_INT interrupt.
  570. */
  571. uint32_t tx_int_ena:1;
  572. /** t1_int_ena : R/W; bitpos: [1]; default: 0;
  573. * The interrupt enable bit for the TIMG_T1_INT interrupt.
  574. */
  575. uint32_t t1_int_ena:1;
  576. /** wdt_int_ena : R/W; bitpos: [2]; default: 0;
  577. * The interrupt enable bit for the TIMG_WDT_INT interrupt.
  578. */
  579. uint32_t wdt_int_ena:1;
  580. /** lact_int_ena : R/W; bitpos: [3]; default: 0;
  581. * The interrupt enable bit for the TIMG_LACT_INT interrupt.
  582. */
  583. uint32_t lact_int_ena:1;
  584. uint32_t reserved_4:28;
  585. };
  586. uint32_t val;
  587. } timg_int_ena_timers_reg_t;
  588. /** Type of int_raw_timers register
  589. * Raw interrupt status
  590. */
  591. typedef union {
  592. struct {
  593. /** t0_int_raw : RO; bitpos: [0]; default: 0;
  594. * The raw interrupt status bit for the TIMG_T0_INT interrupt.
  595. */
  596. uint32_t t0_int_raw:1;
  597. /** t1_int_raw : RO; bitpos: [1]; default: 0;
  598. * The raw interrupt status bit for the TIMG_T1_INT interrupt.
  599. */
  600. uint32_t t1_int_raw:1;
  601. /** wdt_int_raw : RO; bitpos: [2]; default: 0;
  602. * The raw interrupt status bit for the TIMG_WDT_INT interrupt.
  603. */
  604. uint32_t wdt_int_raw:1;
  605. /** lact_int_raw : RO; bitpos: [3]; default: 0;
  606. * The raw interrupt status bit for the TIMG_LACT_INT interrupt.
  607. */
  608. uint32_t lact_int_raw:1;
  609. uint32_t reserved_4:28;
  610. };
  611. uint32_t val;
  612. } timg_int_raw_timers_reg_t;
  613. /** Type of int_st_timers register
  614. * Masked interrupt status
  615. */
  616. typedef union {
  617. struct {
  618. /** t0_int_st : RO; bitpos: [0]; default: 0;
  619. * The masked interrupt status bit for the TIMG_T0_INT interrupt.
  620. */
  621. uint32_t t0_int_st:1;
  622. /** t1_int_st : RO; bitpos: [1]; default: 0;
  623. * The masked interrupt status bit for the TIMG_T1_INT interrupt.
  624. */
  625. uint32_t t1_int_st:1;
  626. /** wdt_int_st : RO; bitpos: [2]; default: 0;
  627. * The masked interrupt status bit for the TIMG_WDT_INT interrupt.
  628. */
  629. uint32_t wdt_int_st:1;
  630. /** lact_int_st : RO; bitpos: [3]; default: 0;
  631. * The masked interrupt status bit for the TIMG_LACT_INT interrupt.
  632. */
  633. uint32_t lact_int_st:1;
  634. uint32_t reserved_4:28;
  635. };
  636. uint32_t val;
  637. } timg_int_st_timers_reg_t;
  638. /** Type of int_clr_timers register
  639. * Interrupt clear bits
  640. */
  641. typedef union {
  642. struct {
  643. /** t0_int_clr : WO; bitpos: [0]; default: 0;
  644. * Set this bit to clear the TIMG_T0_INT interrupt.
  645. */
  646. uint32_t t0_int_clr:1;
  647. /** t1_int_clr : WO; bitpos: [1]; default: 0;
  648. * Set this bit to clear the TIMG_T1_INT interrupt.
  649. */
  650. uint32_t t1_int_clr:1;
  651. /** wdt_int_clr : WO; bitpos: [2]; default: 0;
  652. * Set this bit to clear the TIMG_WDT_INT interrupt.
  653. */
  654. uint32_t wdt_int_clr:1;
  655. /** lact_int_clr : WO; bitpos: [3]; default: 0;
  656. * Set this bit to clear the TIMG_LACT_INT interrupt.
  657. */
  658. uint32_t lact_int_clr:1;
  659. uint32_t reserved_4:28;
  660. };
  661. uint32_t val;
  662. } timg_int_clr_timers_reg_t;
  663. /** Group: Version Register */
  664. /** Type of timers_date register
  665. * Version control register
  666. */
  667. typedef union {
  668. struct {
  669. /** timers_date : R/W; bitpos: [27:0]; default: 26243681;
  670. * Version control register.
  671. */
  672. uint32_t timers_date:28;
  673. uint32_t reserved_28:4;
  674. };
  675. uint32_t val;
  676. } timg_timers_date_reg_t;
  677. /** Group: Configuration Register */
  678. /** Type of regclk register
  679. * Timer group clock gate register
  680. */
  681. typedef union {
  682. struct {
  683. uint32_t reserved_0:31;
  684. /** clk_en : R/W; bitpos: [31]; default: 0;
  685. * Register clock gate signal. 1: Registers can be read and written to by software. 0:
  686. * Registers can not be read or written to by software.
  687. */
  688. uint32_t clk_en:1;
  689. };
  690. uint32_t val;
  691. } timg_regclk_reg_t;
  692. typedef struct {
  693. volatile timg_txconfig_reg_t config;
  694. volatile timg_txlo_reg_t lo;
  695. volatile timg_txhi_reg_t hi;
  696. volatile timg_txupdate_reg_t update;
  697. volatile timg_txalarmlo_reg_t alarmlo;
  698. volatile timg_txalarmhi_reg_t alarmhi;
  699. volatile timg_txloadlo_reg_t loadlo;
  700. volatile timg_txloadhi_reg_t loadhi;
  701. volatile timg_txload_reg_t load;
  702. } timg_hwtimer_reg_t;
  703. typedef struct {
  704. volatile timg_hwtimer_reg_t hw_timer[2];
  705. volatile timg_wdtconfig0_reg_t wdtconfig0;
  706. volatile timg_wdtconfig1_reg_t wdtconfig1;
  707. volatile timg_wdtconfig2_reg_t wdtconfig2;
  708. volatile timg_wdtconfig3_reg_t wdtconfig3;
  709. volatile timg_wdtconfig4_reg_t wdtconfig4;
  710. volatile timg_wdtconfig5_reg_t wdtconfig5;
  711. volatile timg_wdtfeed_reg_t wdtfeed;
  712. volatile timg_wdtwprotect_reg_t wdtwprotect;
  713. volatile timg_rtccalicfg_reg_t rtccalicfg;
  714. volatile timg_rtccalicfg1_reg_t rtccalicfg1;
  715. volatile timg_lactconfig_reg_t lactconfig;
  716. volatile timg_lactrtc_reg_t lactrtc;
  717. volatile timg_lactlo_reg_t lactlo;
  718. volatile timg_lacthi_reg_t lacthi;
  719. volatile timg_lactupdate_reg_t lactupdate;
  720. volatile timg_lactalarmlo_reg_t lactalarmlo;
  721. volatile timg_lactalarmhi_reg_t lactalarmhi;
  722. volatile timg_lactloadlo_reg_t lactloadlo;
  723. volatile timg_lactloadhi_reg_t lactloadhi;
  724. volatile timg_lactload_reg_t lactload;
  725. volatile timg_int_ena_timers_reg_t int_ena_timers;
  726. volatile timg_int_raw_timers_reg_t int_raw_timers;
  727. volatile timg_int_st_timers_reg_t int_st_timers;
  728. volatile timg_int_clr_timers_reg_t int_clr_timers;
  729. volatile timg_rtccalicfg2_reg_t rtccalicfg2;
  730. uint32_t reserved_0ac[19];
  731. volatile timg_timers_date_reg_t timers_date;
  732. volatile timg_regclk_reg_t regclk;
  733. } timg_dev_t;
  734. extern timg_dev_t TIMERG0;
  735. extern timg_dev_t TIMERG1;
  736. #ifndef __cplusplus
  737. _Static_assert(sizeof(timg_dev_t) == 0x100, "Invalid size of timg_dev_t structure");
  738. #endif
  739. #ifdef __cplusplus
  740. }
  741. #endif