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
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
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
card10
firmware
Commits
f886e755
Commit
f886e755
authored
3 years ago
by
schneider
Browse files
Options
Downloads
Patches
Plain Diff
clock: Raise clock speed for BLE to work while sleeping
parent
3f1c3b98
No related branches found
No related tags found
1 merge request
!499
clock: Raise clock speed for BLE to work while sleeping
Pipeline
#5342
passed
3 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
epicardium/main.c
+5
-0
5 additions, 0 deletions
epicardium/main.c
epicardium/support.c
+0
-2
0 additions, 2 deletions
epicardium/support.c
with
5 additions
and
2 deletions
epicardium/main.c
+
5
−
0
View file @
f886e755
...
@@ -98,6 +98,11 @@ int main(void)
...
@@ -98,6 +98,11 @@ int main(void)
disp_ctx_reinit
();
disp_ctx_reinit
();
#endif
#endif
epic_gpio_set_pin_mode
(
EPIC_GPIO_WRISTBAND_1
,
EPIC_GPIO_MODE_OUT
);
epic_gpio_set_pin_mode
(
EPIC_GPIO_WRISTBAND_2
,
EPIC_GPIO_MODE_OUT
);
epic_gpio_set_pin_mode
(
EPIC_GPIO_WRISTBAND_3
,
EPIC_GPIO_MODE_OUT
);
epic_gpio_set_pin_mode
(
EPIC_GPIO_WRISTBAND_4
,
EPIC_GPIO_MODE_OUT
);
epic_leds_clear_all
(
0
,
0
,
0
);
epic_leds_clear_all
(
0
,
0
,
0
);
LOG_DEBUG
(
"startup"
,
"Initializing tasks ..."
);
LOG_DEBUG
(
"startup"
,
"Initializing tasks ..."
);
...
...
This diff is collapsed.
Click to expand it.
epicardium/support.c
+
0
−
2
View file @
f886e755
...
@@ -61,7 +61,6 @@ void pre_idle_sleep(TickType_t xExpectedIdleTime)
...
@@ -61,7 +61,6 @@ void pre_idle_sleep(TickType_t xExpectedIdleTime)
if
(
usb_get_status
()
&
MAXUSB_STATUS_VBUS_ON
)
{
if
(
usb_get_status
()
&
MAXUSB_STATUS_VBUS_ON
)
{
SYS_Clock_Select
(
SYS_CLOCK_HIRC
,
NULL
);
SYS_Clock_Select
(
SYS_CLOCK_HIRC
,
NULL
);
}
else
{
}
else
{
MXC_GCR
->
clkcn
|=
MXC_S_GCR_CLKCN_PSC_DIV4
;
SYS_Clock_Select
(
SYS_CLOCK_HIRC
,
NULL
);
SYS_Clock_Select
(
SYS_CLOCK_HIRC
,
NULL
);
SYS_ClockSourceDisable
(
SYS_CLOCK_HIRC96
);
SYS_ClockSourceDisable
(
SYS_CLOCK_HIRC96
);
}
}
...
@@ -69,7 +68,6 @@ void pre_idle_sleep(TickType_t xExpectedIdleTime)
...
@@ -69,7 +68,6 @@ void pre_idle_sleep(TickType_t xExpectedIdleTime)
__asm
volatile
(
"dsb"
:::
"memory"
);
__asm
volatile
(
"dsb"
:::
"memory"
);
__asm
volatile
(
"wfe"
);
__asm
volatile
(
"wfe"
);
__asm
volatile
(
"isb"
);
__asm
volatile
(
"isb"
);
MXC_GCR
->
clkcn
&=
~
(
MXC_S_GCR_CLKCN_PSC_DIV4
);
SYS_Clock_Select
(
SYS_CLOCK_HIRC96
,
NULL
);
SYS_Clock_Select
(
SYS_CLOCK_HIRC96
,
NULL
);
disp_update_backlight_clock
();
disp_update_backlight_clock
();
SYS_ClockSourceDisable
(
SYS_CLOCK_HIRC
);
SYS_ClockSourceDisable
(
SYS_CLOCK_HIRC
);
...
...
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