Hardware Libraries
20.1
Arria 10 SoC Hardware Manager
Main Page
Address Space
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
alt_watchdog.h
1
/******************************************************************************
2
*
3
* Copyright 2013 Altera Corporation. All Rights Reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are met:
7
*
8
* 1. Redistributions of source code must retain the above copyright notice,
9
* this list of conditions and the following disclaimer.
10
*
11
* 2. Redistributions in binary form must reproduce the above copyright notice,
12
* this list of conditions and the following disclaimer in the documentation
13
* and/or other materials provided with the distribution.
14
*
15
* 3. Neither the name of the copyright holder nor the names of its contributors
16
* may be used to endorse or promote products derived from this software without
17
* specific prior written permission.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
* POSSIBILITY OF SUCH DAMAGE.
30
*
31
******************************************************************************/
32
33
/*
34
* $Id: //acds/rel/20.1/embedded/ip/hps/altera_hps/hwlib/include/alt_watchdog.h#1 $
35
*/
36
37
#ifndef __ALT_WDOG_H__
38
#define __ALT_WDOG_H__
39
40
#include "hwlib.h"
41
42
#ifdef __cplusplus
43
extern
"C"
{
44
#endif
/* __cplusplus */
45
83
/******************************************************************************/
84
89
typedef
enum
ALT_WDOG_TIMER_e
{
90
/* OSC1 Clock Group */
98
ALT_WDOG_CPU
,
99
100
/* OSC1 Clock Group */
106
ALT_WDOG0
,
107
113
ALT_WDOG1
,
114
123
ALT_WDOG0_INIT
,
124
133
ALT_WDOG1_INIT
134
}
ALT_WDOG_TIMER_t
;
135
136
/******************************************************************************/
142
typedef
enum
ALT_WDOG_TIMEOUT_e
{
146
ALT_WDOG_TIMEOUT64K
,
147
151
ALT_WDOG_TIMEOUT128K
,
152
156
ALT_WDOG_TIMEOUT256K
,
157
161
ALT_WDOG_TIMEOUT512K
,
162
166
ALT_WDOG_TIMEOUT1M
,
167
171
ALT_WDOG_TIMEOUT2M
,
172
176
ALT_WDOG_TIMEOUT4M
,
177
181
ALT_WDOG_TIMEOUT8M
,
182
186
ALT_WDOG_TIMEOUT16M
,
187
191
ALT_WDOG_TIMEOUT32M
,
192
196
ALT_WDOG_TIMEOUT64M
,
197
201
ALT_WDOG_TIMEOUT128M
,
202
206
ALT_WDOG_TIMEOUT256M
,
207
211
ALT_WDOG_TIMEOUT512M
,
212
217
ALT_WDOG_TIMEOUT1G
,
218
222
ALT_WDOG_TIMEOUT2G
223
}
ALT_WDOG_TIMEOUT_t
;
224
225
/******************************************************************************/
230
typedef
enum
ALT_WDOG_RESET_TYPE_e
{
240
ALT_WDOG_WARM_RESET
,
241
253
ALT_WDOG_INT_THEN_RESET
,
254
266
ALT_WDOG_TIMER_MODE_ONESHOT
,
267
278
ALT_WDOG_TIMER_MODE_FREERUN
279
}
ALT_WDOG_RESET_TYPE_t
;
280
281
/******************************************************************************/
289
/******************************************************************************/
296
ALT_STATUS_CODE
alt_wdog_init
(
void
);
297
298
/******************************************************************************/
305
ALT_STATUS_CODE
alt_wdog_uninit
(
void
);
306
307
/******************************************************************************/
320
ALT_STATUS_CODE
alt_wdog_stop
(
ALT_WDOG_TIMER_t
tmr_id);
321
322
/******************************************************************************/
334
ALT_STATUS_CODE
alt_wdog_start
(
ALT_WDOG_TIMER_t
tmr_id);
335
336
/******************************************************************************/
347
bool
alt_wdog_tmr_is_enabled
(
ALT_WDOG_TIMER_t
tmr_id);
348
349
/******************************************************************************/
366
ALT_STATUS_CODE
alt_wdog_reset
(
ALT_WDOG_TIMER_t
tmr_id);
367
369
/******************************************************************************/
378
/******************************************************************************/
399
ALT_STATUS_CODE
alt_wdog_counter_set
(
ALT_WDOG_TIMER_t
tmr_id,
400
uint32_t val);
401
402
/******************************************************************************/
412
uint32_t
alt_wdog_counter_get_current
(
ALT_WDOG_TIMER_t
tmr_id);
413
414
/******************************************************************************/
426
uint32_t
alt_wdog_counter_get_curtime_millisecs
(
ALT_WDOG_TIMER_t
tmr_id);
427
428
/******************************************************************************/
443
uint32_t
alt_wdog_counter_get_init
(
ALT_WDOG_TIMER_t
tmr_id);
444
445
/******************************************************************************/
460
uint64_t
alt_wdog_counter_get_inittime_nanosecs
(
ALT_WDOG_TIMER_t
tmr_id);
461
462
/******************************************************************************/
477
uint32_t
alt_wdog_counter_get_inittime_millisecs
(
ALT_WDOG_TIMER_t
tmr_id);
478
479
/******************************************************************************/
491
ALT_STATUS_CODE
alt_wdog_core_prescaler_set
(uint32_t val);
492
493
/******************************************************************************/
502
uint32_t
alt_wdog_core_prescaler_get
(
void
);
503
504
/******************************************************************************/
517
uint32_t
alt_wdog_counter_get_max
(
ALT_WDOG_TIMER_t
tmr_id);
518
519
/******************************************************************************/
532
uint64_t
alt_wdog_counter_get_max_nanosecs
(
ALT_WDOG_TIMER_t
tmr_id);
533
534
535
/******************************************************************************/
548
uint32_t
alt_wdog_counter_get_max_millisecs
(
ALT_WDOG_TIMER_t
tmr_id);
549
551
/******************************************************************************/
560
/******************************************************************************/
574
ALT_STATUS_CODE
alt_wdog_int_disable
(
ALT_WDOG_TIMER_t
tmr_id);
575
576
/******************************************************************************/
590
ALT_STATUS_CODE
alt_wdog_int_enable
(
ALT_WDOG_TIMER_t
tmr_id);
591
592
/******************************************************************************/
604
bool
alt_wdog_int_is_pending
(
ALT_WDOG_TIMER_t
tmr_id);
605
606
/******************************************************************************/
622
bool
alt_wdog_int_is_enabled
(
ALT_WDOG_TIMER_t
tmr_id);
623
624
/******************************************************************************/
636
ALT_STATUS_CODE
alt_wdog_int_clear
(
ALT_WDOG_TIMER_t
tmr_id);
637
638
/******************************************************************************/
650
bool
alt_wdog_int_if_pending_clear
(
ALT_WDOG_TIMER_t
tmr_id);
651
653
#if ALTERA_INTERNAL_ONLY_DOCS
654
/******************************************************************************/
662
#else
663
/******************************************************************************/
671
#endif
672
/******************************************************************************/
706
ALT_STATUS_CODE
alt_wdog_response_mode_set
(
ALT_WDOG_TIMER_t
tmr_id,
707
ALT_WDOG_RESET_TYPE_t
type);
708
709
/******************************************************************************/
734
int32_t
alt_wdog_response_mode_get
(
ALT_WDOG_TIMER_t
tmr_id);
735
736
737
#if ALTERA_INTERNAL_ONLY_DOCS
738
739
/******************************************************************************/
754
uint32_t
alt_wdog_compcode_get
(
ALT_WDOG_TIMER_t
tmr_id);
755
756
/******************************************************************************/
772
uint32_t
alt_wdog_ver_get
(
ALT_WDOG_TIMER_t
tmr_id);
773
774
#else
775
776
/******************************************************************************/
777
/* Returns the component code of the watchdog timer module. Only valid
778
* for ALT_WATCHDOG0, ALT_WATCHDOG1, ALT_WATCHDOG0_INITIAL or ALT_WATCHDOG1_INITIAL.
779
*
780
* This is an Altera Internal Only function
781
*/
782
783
uint32_t
alt_wdog_compcode_get
(
ALT_WDOG_TIMER_t
tmr_id);
784
785
/******************************************************************************/
786
/* Returns the version code of the watchdog timer module. Only valid for
787
* ALT_WATCHDOG0, ALT_WATCHDOG1, ALT_WATCHDOG0_INITIAL or ALT_WATCHDOG1_INITIAL.
788
*
789
* This is an Altera Internal Only function
790
*/
791
792
uint32_t
alt_wdog_ver_get
(
ALT_WDOG_TIMER_t
tmr_id);
793
794
#endif
/* ALTERA_INTERNAL_ONLY_DOCS */
795
796
/******************************************************************************/
797
800
#ifdef __cplusplus
801
}
802
#endif
/* __cplusplus */
803
#endif
/* __ALT_WDOG_H__ */
include
alt_watchdog.h
Generated on Tue Oct 27 2020 08:37:29 for Hardware Libraries by
1.8.2