Skip to content

Commit ca7735c

Browse files
etienne-lmserwango
authored andcommitted
lib/stm32: update stm32wb to cube version V1.24.0
Update Cube version for STM32WBxx series on https://github.com/STMicroelectronics from version v1.23.0 to version v1.24.0 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
1 parent 7c55642 commit ca7735c

File tree

6 files changed

+92
-43
lines changed

6 files changed

+92
-43
lines changed

lib/stm32wb/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Purpose
1111
| and a controller BLE firmware running on the Cortex-M0 core.
1212
1313
Status:
14-
version v1.23.0
14+
version v1.24.0
1515

1616
Coprocessor Binaries
1717
--------------------
@@ -78,7 +78,7 @@ URL
7878
https://github.com/STMicroelectronics/STM32CubeWB
7979

8080
Commit:
81-
24e69da13336e90cccce4fccf5b8fddfcd4959fc
81+
7c5aa7dcd2c0abe787f922bb06a6213c724d08e4
8282

8383
Maintained-by
8484
-------------

lib/stm32wb/hci/app_conf.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@
6666
* Define IO Authentication
6767
*/
6868
#define CFG_BONDING_MODE (1)
69-
#define CFG_FIXED_PIN (111111)
70-
#define CFG_USED_FIXED_PIN (0)
69+
7170
#define CFG_ENCRYPTION_KEY_SIZE_MAX (16)
7271
#define CFG_ENCRYPTION_KEY_SIZE_MIN (8)
7372

lib/stm32wb/hci/ble_bufsize.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@
105105
#elif (SLAVE_ONLY != 0)
106106
#define BLE_FIXED_BUFFER_SIZE_BYTES 6408 /* Peripheral only */
107107
#elif (BASIC_FEATURES != 0)
108-
#define BLE_FIXED_BUFFER_SIZE_BYTES 7184 /* Basic Features */
108+
#define BLE_FIXED_BUFFER_SIZE_BYTES 6928 /* Basic Features */
109109
#else
110-
#define BLE_FIXED_BUFFER_SIZE_BYTES 7468 /* Full stack */
110+
#define BLE_FIXED_BUFFER_SIZE_BYTES 7212 /* Full stack */
111111
#endif
112112

113113
/*

lib/stm32wb/hci/shci.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,24 @@ SHCI_CmdStatus_t SHCI_C2_FUS_FwDelete( void )
114114
return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]);
115115
}
116116

117+
SHCI_CmdStatus_t SHCI_C2_FUS_FwPurge( void )
118+
{
119+
/**
120+
* Buffer is large enough to hold command complete without payload
121+
*/
122+
uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE];
123+
TL_EvtPacket_t * p_rsp;
124+
125+
p_rsp = (TL_EvtPacket_t *)local_buffer;
126+
127+
shci_send( SHCI_OPCODE_C2_FUS_FW_PURGE,
128+
0,
129+
0,
130+
p_rsp );
131+
132+
return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]);
133+
}
134+
117135
SHCI_CmdStatus_t SHCI_C2_FUS_UpdateAuthKey( SHCI_C2_FUS_UpdateAuthKey_Cmd_Param_t *pParam )
118136
{
119137
/**

lib/stm32wb/hci/shci.h

Lines changed: 68 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ extern "C" {
3535
{
3636
WIRELESS_FW_RUNNING = 0x00,
3737
FUS_FW_RUNNING = 0x01,
38+
NVM_BACKUP_RUNNING = 0x10,
39+
NVM_RESTORE_RUNNING = 0x11
3840
} SHCI_SysEvt_Ready_Rsp_t;
3941

4042
/* ERROR CODES
@@ -197,7 +199,7 @@ extern "C" {
197199
SHCI_OCF_C2_FUS_STORE_USR_KEY,
198200
SHCI_OCF_C2_FUS_LOAD_USR_KEY,
199201
SHCI_OCF_C2_FUS_START_WS,
200-
SHCI_OCF_C2_FUS_RESERVED2,
202+
SHCI_OCF_C2_FUS_FW_PURGE,
201203
SHCI_OCF_C2_FUS_RESERVED3,
202204
SHCI_OCF_C2_FUS_LOCK_USR_KEY,
203205
SHCI_OCF_C2_FUS_UNLOAD_USR_KEY,
@@ -276,6 +278,10 @@ extern "C" {
276278
/** No command parameters */
277279
/** No response parameters*/
278280

281+
#define SHCI_OPCODE_C2_FUS_FW_PURGE (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_FW_PURGE)
282+
/** No command parameters */
283+
/** No response parameters*/
284+
279285
#define SHCI_OPCODE_C2_FUS_UPDATE_AUTH_KEY (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_UPDATE_AUTH_KEY)
280286
typedef PACKED_STRUCT{
281287
uint8_t KeySize;
@@ -304,6 +310,7 @@ extern "C" {
304310
{
305311
KEYSIZE_16 = 16,
306312
KEYSIZE_32 = 32,
313+
KEYSIZE_64 = 64
307314
};
308315

309316
typedef PACKED_STRUCT{
@@ -565,61 +572,74 @@ extern "C" {
565572
*/
566573
int8_t max_tx_power;
567574

568-
/**
569-
* RX model configuration
570-
* - bit 0: 1: agc_rssi model improved vs RF blockers 0: Legacy agc_rssi model
571-
* - other bits: reserved ( shall be set to 0)
572-
*/
575+
/**
576+
* RX model configuration
577+
* - bit 0: 1: agc_rssi model improved vs RF blockers 0: Legacy agc_rssi model
578+
* - other bits: reserved ( shall be set to 0)
579+
*/
573580
uint8_t rx_model_config;
574581

575-
/** Maximum number of advertising sets.
576-
* Range: 1 .. 8 with limitation:
577-
* This parameter is linked to max_adv_data_len such as both compliant with allocated Total memory computed with BLE_EXT_ADV_BUFFER_SIZE based
578-
* on Max Extended advertising configuration supported.
579-
* This parameter is considered by the CPU2 when Options has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set
580-
*/
582+
/* Maximum number of advertising sets.
583+
* Range: 1 .. 8 with limitation:
584+
* This parameter is linked to max_adv_data_len such as both compliant with allocated Total memory computed with BLE_EXT_ADV_BUFFER_SIZE based
585+
* on Max Extended advertising configuration supported.
586+
* This parameter is considered by the CPU2 when Options has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set
587+
*/
581588
uint8_t max_adv_set_nbr;
582589

583-
/** Maximum advertising data length (in bytes)
584-
* Range: 31 .. 1650 with limitation:
585-
* This parameter is linked to max_adv_set_nbr such as both compliant with allocated Total memory computed with BLE_EXT_ADV_BUFFER_SIZE based
586-
* on Max Extended advertising configuration supported.
587-
* This parameter is considered by the CPU2 when Options has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set
588-
*/
590+
/* Maximum advertising data length (in bytes)
591+
* Range: 31 .. 1650 with limitation:
592+
* This parameter is linked to max_adv_set_nbr such as both compliant with allocated Total memory computed with BLE_EXT_ADV_BUFFER_SIZE based
593+
* on Max Extended advertising configuration supported.
594+
* This parameter is considered by the CPU2 when Options has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set
595+
*/
589596
uint16_t max_adv_data_len;
590597

591-
/** RF TX Path Compensation Value (16-bit signed integer). Units: 0.1 dB.
592-
* Range: -1280 .. 1280
593-
*/
598+
/* RF TX Path Compensation Value (16-bit signed integer). Units: 0.1 dB.
599+
* Range: -1280 .. 1280
600+
*/
594601
int16_t tx_path_compens;
595602

596-
/** RF RX Path Compensation Value (16-bit signed integer). Units: 0.1 dB.
597-
* Range: -1280 .. 1280
598-
*/
603+
/* RF RX Path Compensation Value (16-bit signed integer). Units: 0.1 dB.
604+
* Range: -1280 .. 1280
605+
*/
599606
int16_t rx_path_compens;
600607

601-
/** BLE core specification version (8-bit unsigned integer).
602-
* values as: 11(5.2), 12(5.3), 13(5.4)
603-
*/
608+
/* BLE core specification version (8-bit unsigned integer).
609+
* values as: 11(5.2), 12(5.3), 13(5.4)
610+
*/
604611
uint8_t ble_core_version;
605612

606-
/**
607-
* Options flags extension
608-
* - bit 0: 1: appearance Writable 0: appearance Read-Only
609-
* - bit 1: 1: Enhanced ATT supported 0: Enhanced ATT not supported
610-
* - other bits: reserved ( shall be set to 0)
611-
*/
613+
/**
614+
* Options flags extension
615+
* - bit 0: 1: appearance Writable 0: appearance Read-Only
616+
* - bit 1: 1: Enhanced ATT supported 0: Enhanced ATT not supported
617+
* - other bits: reserved ( shall be set to 0)
618+
*/
612619
uint8_t Options_extension;
613620

614-
/**
615-
* MaxAddEattBearers
616-
*
621+
/**
622+
* MaxAddEattBearers
623+
*
617624
* Maximum number of bearers that can be created for Enhanced ATT
618625
* in addition to the number of links
619626
* - Range: 0 .. 4
620627
*/
621628
uint8_t MaxAddEattBearers;
622629

630+
/**
631+
* Address of the RAM buffer allocated for the extension of Host commands.
632+
* This buffer is referred as the "extra data" buffer in the BLE Wireless
633+
* Interface document. If the commands that need this extension are never
634+
* used, this parameter can be set to NULL.
635+
*/
636+
uint8_t* extra_data_buffer;
637+
638+
/**
639+
* Size of the RAM buffer allocated for the extension of Host commands.
640+
*/
641+
uint32_t extra_data_buffer_size;
642+
623643
} SHCI_C2_Ble_Init_Cmd_Param_t;
624644

625645
typedef PACKED_STRUCT{
@@ -1000,6 +1020,8 @@ extern "C" {
10001020
#define INFO_STACK_TYPE_BLE_ZIGBEE_RFD_DYNAMIC 0x79
10011021
#define INFO_STACK_TYPE_RLV 0x80
10021022
#define INFO_STACK_TYPE_BLE_MAC_STATIC 0x90
1023+
#define INFO_STACK_TYPE_NVM_BACKUP 0xF0
1024+
#define INFO_STACK_TYPE_NVM_RESTORE 0xF1
10031025

10041026
typedef struct {
10051027
/**
@@ -1065,6 +1087,16 @@ typedef struct {
10651087
*/
10661088
SHCI_CmdStatus_t SHCI_C2_FUS_FwDelete( void );
10671089

1090+
/**
1091+
* SHCI_C2_FUS_FwPurge
1092+
* @brief Delete the wireless stack on CPU2 and the NVM section (if any)
1093+
* Note: This command is only supported by the FUS.
1094+
*
1095+
* @param None
1096+
* @retval Status
1097+
*/
1098+
SHCI_CmdStatus_t SHCI_C2_FUS_FwPurge( void );
1099+
10681100
/**
10691101
* SHCI_C2_FUS_UpdateAuthKey
10701102
* @brief Request the FUS to update the authentication key

lib/stm32wb/hci/tl_mbox.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ static void OutputDbgTrace(TL_MB_PacketType_t packet_type, uint8_t* buffer)
742742
break;
743743

744744
case TL_MB_ACL_DATA_RSP:
745-
TL_HCI_CMD_DBG_MSG(" ACL Data Tx Ack received")
745+
TL_HCI_CMD_DBG_MSG(" ACL Data Tx Ack received");
746746
TL_HCI_CMD_DBG_MSG("\r\n");
747747
break;
748748

0 commit comments

Comments
 (0)