Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
François Revol
firmware
Commits
4882da8a
Commit
4882da8a
authored
Sep 04, 2020
by
schneider
Browse files
fix(ble): Reduce scope of cricitcal section when initializing
Closes #203
parent
4de2d241
Changes
2
Hide whitespace changes
Inline
Side-by-side
epicardium/ble/ble.c
View file @
4882da8a
...
@@ -64,6 +64,7 @@ static bool log_enabled = false;
...
@@ -64,6 +64,7 @@ static bool log_enabled = false;
static
int
log_lastflushtick
=
0
;
static
int
log_lastflushtick
=
0
;
/*! \brief Stack initialization for app. */
/*! \brief Stack initialization for app. */
extern
void
LlStackInit
(
void
);
extern
void
StackInit
(
void
);
extern
void
StackInit
(
void
);
extern
void
bleuart_init
(
void
);
extern
void
bleuart_init
(
void
);
extern
void
bleFileTransfer_init
(
void
);
extern
void
bleFileTransfer_init
(
void
);
...
@@ -431,12 +432,15 @@ void vBleTask(void *pvParameters)
...
@@ -431,12 +432,15 @@ void vBleTask(void *pvParameters)
NVIC_EnableIRQ
(
RSV11_IRQn
);
NVIC_EnableIRQ
(
RSV11_IRQn
);
WsfInit
();
WsfInit
();
taskENTER_CRITICAL
();
taskENTER_CRITICAL
();
/* Critical section to prevent a loop in iq_capture2 / meas_freq in
/* Critical section to prevent a loop in iq_capture2 / meas_freq in
* /home/maxim/Documents/src/BLE/mcbusw/Hardware/Micro/ME14/Firmware/trunk/NDALibraries/BTLE/phy/dbb/prot/ble/pan2g5/afe/max32665/board_config.c:275
* /home/maxim/Documents/src/BLE/mcbusw/Hardware/Micro/ME14/Firmware/trunk/NDALibraries/BTLE/phy/dbb/prot/ble/pan2g5/afe/max32665/board_config.c:275
* if BHI160 and -Ddebug_prints=true is enabled*/
* if BHI160 and -Ddebug_prints=true is enabled
. See #115.
*/
StackInit
();
Ll
StackInit
();
taskEXIT_CRITICAL
();
taskEXIT_CRITICAL
();
StackInit
();
BbBleDrvSetTxPower
(
0
);
BbBleDrvSetTxPower
(
0
);
setAddress
();
setAddress
();
...
...
epicardium/ble/stack.c
View file @
4882da8a
...
@@ -105,16 +105,13 @@ const BbRtCfg_t _bb_cfg = {
...
@@ -105,16 +105,13 @@ const BbRtCfg_t _bb_cfg = {
/*************************************************************************************************/
/*************************************************************************************************/
/*!
/*!
* \brief Initialize stack.
* \brief Initialize
link layer part of the
stack.
*
*
* \return None.
* \return None.
*/
*/
/*************************************************************************************************/
/*************************************************************************************************/
void
StackInit
(
void
)
void
Ll
StackInit
()
{
{
wsfHandlerId_t
handlerId
;
/* card10: We do not use the SDMA HCI at the moment. The block below is not compiled. */
#ifndef ENABLE_SDMA
#ifndef ENABLE_SDMA
uint32_t
memUsed
;
uint32_t
memUsed
;
...
@@ -137,6 +134,18 @@ void StackInit(void)
...
@@ -137,6 +134,18 @@ void StackInit(void)
(
unsigned
int
)
LL_MEMORY_FOOTPRINT
);
(
unsigned
int
)
LL_MEMORY_FOOTPRINT
);
}
}
#endif
#endif
}
/*************************************************************************************************/
/*!
* \brief Initialize stack.
*
* \return None.
*/
/*************************************************************************************************/
void
StackInit
(
void
)
{
wsfHandlerId_t
handlerId
;
SecInit
();
SecInit
();
SecRandInit
();
SecRandInit
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment