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
External 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
fleur
firmware
Commits
fe96f8b0
Commit
fe96f8b0
authored
5 years ago
by
schneider
Committed by
Tobias Schneider
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(ble): Use a reserved interrupt to dispatch FreeRTOS functions
parent
1bb2b9f0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
epicardium/ble/ble.c
+12
-7
12 additions, 7 deletions
epicardium/ble/ble.c
epicardium/modules/hardware.c
+3
-0
3 additions, 0 deletions
epicardium/modules/hardware.c
with
15 additions
and
7 deletions
epicardium/ble/ble.c
+
12
−
7
View file @
fe96f8b0
...
...
@@ -161,12 +161,17 @@ void WsfTimerNotify(void)
//printf("WsfTimerNotify\n");
// TODO: Can we do this without waking up the task?
// xTimerChangePeriodFromISR exists
notify
()
;
NVIC
->
STIR
=
RSV11_IRQn
;
}
/*************************************************************************************************/
void
wsf_ble_signal_event
(
void
)
{
//printf("wsf_ble_signal_event\n");
NVIC
->
STIR
=
RSV11_IRQn
;
}
/*************************************************************************************************/
void
RSV11_IRQHandler
(
void
)
{
notify
();
}
/*************************************************************************************************/
...
...
@@ -243,6 +248,12 @@ void vBleTask(void *pvParameters)
*/
vTaskDelay
(
pdMS_TO_TICKS
(
500
));
/* We are going to execute FreeRTOS functions from callbacks
* coming from this interrupt. Its priority needs to be
* reduced to allow this. */
NVIC_SetPriority
(
RSV11_IRQn
,
2
);
NVIC_EnableIRQ
(
RSV11_IRQn
);
WsfInit
();
taskENTER_CRITICAL
();
/* Critical section to prevent a loop in iq_capture2 / meas_freq in
...
...
@@ -253,12 +264,6 @@ void vBleTask(void *pvParameters)
BbBleDrvSetTxPower
(
0
);
setAddress
();
/* We are going to execute FreeRTOS functions from callbacks
* coming from these interrupts. Their priority needs to be
* reduced to allow this. */
NVIC_SetPriority
(
BTLE_SFD_TO_IRQn
,
2
);
NVIC_SetPriority
(
BTLE_TX_DONE_IRQn
,
2
);
NVIC_SetPriority
(
BTLE_RX_RCVD_IRQn
,
2
);
AppInit
();
BleStart
();
AttsDynInit
();
...
...
This diff is collapsed.
Click to expand it.
epicardium/modules/hardware.c
+
3
−
0
View file @
fe96f8b0
...
...
@@ -194,6 +194,9 @@ int hardware_early_init(void)
*/
max30001_mutex_init
();
/* Allow user space to trigger interrupts.
* Used for BLE, not sure if needed. */
SCB
->
CCR
|=
SCB_CCR_USERSETMPEND_Msk
;
return
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