soc/arm/st_stm32: stm32wb: Remove stack reset from shutdown
BLE stack reset should now be done in hci close function. Remove from shutdown procedure. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
045c986314
commit
ed6cc6dce3
1 changed files with 0 additions and 33 deletions
|
@ -16,8 +16,6 @@
|
||||||
#include <clock_control/clock_stm32_ll_common.h>
|
#include <clock_control/clock_stm32_ll_common.h>
|
||||||
#include "stm32_hsem.h"
|
#include "stm32_hsem.h"
|
||||||
|
|
||||||
#include <bluetooth/hci.h>
|
|
||||||
|
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
LOG_MODULE_DECLARE(soc, CONFIG_SOC_LOG_LEVEL);
|
LOG_MODULE_DECLARE(soc, CONFIG_SOC_LOG_LEVEL);
|
||||||
|
|
||||||
|
@ -57,41 +55,10 @@ static void lpm_hsem_lock(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ACI_HAL_STACK_RESET 0xFC3B
|
|
||||||
|
|
||||||
static void send_stack_reset(void)
|
|
||||||
{
|
|
||||||
struct net_buf *rsp;
|
|
||||||
int err = 0;
|
|
||||||
|
|
||||||
err = bt_hci_cmd_send_sync(ACI_HAL_STACK_RESET, NULL, &rsp);
|
|
||||||
|
|
||||||
net_buf_unref(rsp);
|
|
||||||
|
|
||||||
if (err) {
|
|
||||||
LOG_ERR("M0 BLE stack reset issue");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void shutdown_ble_stack(void)
|
|
||||||
{
|
|
||||||
send_stack_reset();
|
|
||||||
|
|
||||||
/* Wait till C2DS set */
|
|
||||||
while (LL_PWR_IsActiveFlag_C2DS() == 0) {
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Invoke Low Power/System Off specific Tasks */
|
/* Invoke Low Power/System Off specific Tasks */
|
||||||
__weak void pm_state_set(enum pm_state state, uint8_t substate_id)
|
__weak void pm_state_set(enum pm_state state, uint8_t substate_id)
|
||||||
{
|
{
|
||||||
if (state == PM_STATE_SOFT_OFF) {
|
if (state == PM_STATE_SOFT_OFF) {
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT)) {
|
|
||||||
shutdown_ble_stack();
|
|
||||||
}
|
|
||||||
|
|
||||||
lpm_hsem_lock();
|
lpm_hsem_lock();
|
||||||
|
|
||||||
/* Clear all Wake-Up flags */
|
/* Clear all Wake-Up flags */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue