Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jeff Gough
firmware
Commits
b43f20b5
Commit
b43f20b5
authored
5 years ago
by
Jeff Gough
Browse files
Options
Downloads
Patches
Plain Diff
Ran code-format.sh
parent
4b77f64c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#2949
passed
5 years ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
epicardium/main.c
+1
-1
1 addition, 1 deletion
epicardium/main.c
epicardium/modules/hardware.c
+6
-6
6 additions, 6 deletions
epicardium/modules/hardware.c
epicardium/modules/watchdog.c
+10
-11
10 additions, 11 deletions
epicardium/modules/watchdog.c
with
17 additions
and
18 deletions
epicardium/main.c
+
1
−
1
View file @
b43f20b5
...
@@ -98,7 +98,7 @@ int main(void)
...
@@ -98,7 +98,7 @@ int main(void)
}
}
/* Watchdog petting */
/* Watchdog petting */
watchdog_clearer_init
();
watchdog_clearer_init
();
LOG_DEBUG
(
"startup"
,
"Starting FreeRTOS ..."
);
LOG_DEBUG
(
"startup"
,
"Starting FreeRTOS ..."
);
vTaskStartScheduler
();
vTaskStartScheduler
();
...
...
This diff is collapsed.
Click to expand it.
epicardium/modules/hardware.c
+
6
−
6
View file @
b43f20b5
...
@@ -35,15 +35,15 @@ int hardware_early_init(void)
...
@@ -35,15 +35,15 @@ int hardware_early_init(void)
sys_cfg_wdt_t
wdt_cfg
=
NULL
;
sys_cfg_wdt_t
wdt_cfg
=
NULL
;
WDT_Init
(
MXC_WDT0
,
wdt_cfg
);
WDT_Init
(
MXC_WDT0
,
wdt_cfg
);
if
(
WDT_GetResetFlag
(
MXC_WDT0
))
{
if
(
WDT_GetResetFlag
(
MXC_WDT0
))
{
WDT_ClearResetFlag
(
MXC_WDT0
);
WDT_ClearResetFlag
(
MXC_WDT0
);
LOG_INFO
(
"watchdog"
,
"Reset due to watchdog timeout"
);
LOG_INFO
(
"watchdog"
,
"Reset due to watchdog timeout"
);
}
}
WDT_Enable
(
MXC_WDT0
,
1
);
WDT_Enable
(
MXC_WDT0
,
1
);
WDT_SetResetPeriod
(
WDT_SetResetPeriod
(
MXC_WDT0
,
MXC_WDT0
,
WDT_PERIOD_2_27
);
/* Clocked by PCLK at 50MHz, reset at 2^27 ticks = 2.7 seconds */
WDT_PERIOD_2_27
);
/* Clocked by PCLK at 50MHz, reset at 2^27 ticks = 2.7 seconds */
WDT_EnableReset
(
MXC_WDT0
,
1
);
WDT_EnableReset
(
MXC_WDT0
,
1
);
/*
/*
...
...
This diff is collapsed.
Click to expand it.
epicardium/modules/watchdog.c
+
10
−
11
View file @
b43f20b5
...
@@ -11,20 +11,19 @@ static StaticTimer_t clearer_timer_buffer;
...
@@ -11,20 +11,19 @@ static StaticTimer_t clearer_timer_buffer;
static
void
watchdog_clearer_callback
()
static
void
watchdog_clearer_callback
()
{
{
LOG_INFO
(
"watchdog"
,
"bees"
);
LOG_INFO
(
"watchdog"
,
"bees"
);
WDT_ResetTimer
(
MXC_WDT0
);
WDT_ResetTimer
(
MXC_WDT0
);
}
}
void
watchdog_clearer_init
()
void
watchdog_clearer_init
()
{
{
clearer_timer
=
xTimerCreateStatic
(
clearer_timer
=
xTimerCreateStatic
(
"watchdog_clearer_timer"
,
"watchdog_clearer_timer"
,
CLEAR_PERIOD
,
CLEAR_PERIOD
,
pdTRUE
,
pdTRUE
,
NULL
,
NULL
,
watchdog_clearer_callback
,
watchdog_clearer_callback
,
&
clearer_timer_buffer
&
clearer_timer_buffer
);
);
xTimerStart
(
clearer_timer
,
0
);
xTimerStart
(
clearer_timer
,
0
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment