File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
targets/TARGET_STM/TARGET_STM32WB Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 27
27
/* Family specific include for WB with HW semaphores */
28
28
#include "hw.h"
29
29
#include "hw_conf.h"
30
+ #if MBED_CONF_BLE_PRESENT
30
31
#include "shci.h"
32
+ #endif
31
33
32
34
/* Used in HCIDriver.cpp/stm32wb_start_ble() */
33
35
int BLE_inited = 0 ;
@@ -90,6 +92,7 @@ int32_t flash_erase_sector(flash_t *obj, uint32_t address)
90
92
return -1 ;
91
93
}
92
94
95
+ #if MBED_CONF_BLE_PRESENT
93
96
if (BLE_inited ) {
94
97
/*
95
98
* Notify the CPU2 that some flash erase activity may be executed
@@ -99,6 +102,7 @@ int32_t flash_erase_sector(flash_t *obj, uint32_t address)
99
102
*/
100
103
SHCI_C2_FLASH_EraseActivity (ERASE_ACTIVITY_ON );
101
104
}
105
+ #endif
102
106
103
107
do {
104
108
/* PESD bit mechanism used by M0+ to protect its timing */
@@ -137,13 +141,15 @@ int32_t flash_erase_sector(flash_t *obj, uint32_t address)
137
141
138
142
while (__HAL_FLASH_GET_FLAG (FLASH_FLAG_CFGBSY ));
139
143
144
+ #if MBED_CONF_BLE_PRESENT
140
145
if (BLE_inited ) {
141
146
/**
142
147
* Notify the CPU2 there will be no request anymore to erase the flash
143
148
* On reception of this command, the CPU2 disables the BLE timing protection versus flash erase processing
144
149
*/
145
150
SHCI_C2_FLASH_EraseActivity (ERASE_ACTIVITY_OFF );
146
151
}
152
+ #endif
147
153
148
154
/* Lock the Flash to disable the flash control register access (recommended
149
155
to protect the FLASH memory against possible unwanted operation) */
You can’t perform that action at this time.
0 commit comments