Skip to content

chore: update to STM32Cube_FW v1.17.0 #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/utility/STM32Cube_FW/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

## Source

[STMicroelectronics/STM32CubeWB Release v1.16.0](https://github.com/STMicroelectronics/STM32CubeWB/releases/tag/v1.16.0)
- Application: [BLE_TransparentMode](https://github.com/STMicroelectronics/STM32CubeWB/tree/v1.16.0/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_TransparentMode)
[STMicroelectronics/STM32CubeWB Release v1.17.0](https://github.com/STMicroelectronics/STM32CubeWB/releases/tag/v1.17.0)
- Application: [BLE_TransparentMode](https://github.com/STMicroelectronics/STM32CubeWB/tree/v1.17.0/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_TransparentMode)

1 change: 1 addition & 0 deletions src/utility/STM32Cube_FW/app_conf_default.h
Original file line number Diff line number Diff line change
Expand Up @@ -730,5 +730,6 @@ typedef enum
#define CFG_OTP_BASE_ADDRESS OTP_AREA_BASE

#define CFG_OTP_END_ADRESS OTP_AREA_END_ADDR

#endif
#endif /*APP_CONF_DEFAULT_H */
6 changes: 3 additions & 3 deletions src/utility/STM32Cube_FW/ble_bufsize.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@
#elif (LL_ONLY != 0)
#define BLE_FIXED_BUFFER_SIZE_BYTES 6036 /* LL only Full */
#elif (SLAVE_ONLY != 0)
#define BLE_FIXED_BUFFER_SIZE_BYTES 6292 /* Peripheral only */
#define BLE_FIXED_BUFFER_SIZE_BYTES 6300 /* Peripheral only */
#elif (BASIC_FEATURES != 0)
#define BLE_FIXED_BUFFER_SIZE_BYTES 6624 /* Basic Features */
#define BLE_FIXED_BUFFER_SIZE_BYTES 6632 /* Basic Features */
#else
#define BLE_FIXED_BUFFER_SIZE_BYTES 7144 /* Full stack */
#define BLE_FIXED_BUFFER_SIZE_BYTES 7152 /* Full stack */
#endif

/*
Expand Down
1 change: 0 additions & 1 deletion src/utility/STM32Cube_FW/hw_ipcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
******************************************************************************
*/
/* USER CODE END Header */

#if defined(STM32WBxx)
/* Includes ------------------------------------------------------------------*/
#include "hw.h"
Expand Down
18 changes: 9 additions & 9 deletions src/utility/STM32Cube_FW/shci.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
uint8_t SHCI_C2_FUS_GetState( SHCI_FUS_GetState_ErrorCode_t *p_error_code )
{
/**
* A command status event + payload has the same size than the expected command complete
* Buffer is large enough to hold command complete with payload
*/
uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE];
uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE + 1];
TL_EvtPacket_t * p_rsp;

p_rsp = (TL_EvtPacket_t *)local_buffer;
Expand All @@ -63,7 +63,7 @@ uint8_t SHCI_C2_FUS_GetState( SHCI_FUS_GetState_ErrorCode_t *p_error_code )
SHCI_CmdStatus_t SHCI_C2_FUS_FwUpgrade( uint32_t fw_src_add, uint32_t fw_dest_add )
{
/**
* TL_BLEEVT_CS_BUFFER_SIZE is 15 bytes so it is large enough to hold the 8 bytes of command parameters
* TL_BLEEVT_CC_BUFFER_SIZE is 16 bytes so it is large enough to hold the 8 bytes of command parameters
* Buffer is large enough to hold command complete without payload
*/
uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE];
Expand Down Expand Up @@ -153,9 +153,9 @@ SHCI_CmdStatus_t SHCI_C2_FUS_LockAuthKey( void )
SHCI_CmdStatus_t SHCI_C2_FUS_StoreUsrKey( SHCI_C2_FUS_StoreUsrKey_Cmd_Param_t *pParam, uint8_t *p_key_index )
{
/**
* Buffer is large enough to hold command complete without payload
* Buffer is large enough to hold command complete with payload
*/
uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE];
uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE + 1];
TL_EvtPacket_t * p_rsp;
uint8_t local_payload_len;

Expand Down Expand Up @@ -431,9 +431,9 @@ SHCI_CmdStatus_t SHCI_C2_CONCURRENT_SetMode( SHCI_C2_CONCURRENT_Mode_Param_t Mod
SHCI_CmdStatus_t SHCI_C2_CONCURRENT_GetNextBleEvtTime( SHCI_C2_CONCURRENT_GetNextBleEvtTime_Param_t *pParam )
{
/**
* Buffer is large enough to hold command complete without payload
* Buffer is large enough to hold command complete with payload
*/
uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE];
uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE+4];
TL_EvtPacket_t * p_rsp;

p_rsp = (TL_EvtPacket_t *)local_buffer;
Expand Down Expand Up @@ -566,7 +566,7 @@ SHCI_CmdStatus_t SHCI_C2_Reinit( void )
SHCI_CmdStatus_t SHCI_C2_ExtpaConfig(uint32_t gpio_port, uint16_t gpio_pin_number, uint8_t gpio_polarity, uint8_t gpio_status)
{
/**
* TL_BLEEVT_CS_BUFFER_SIZE is 15 bytes so it is large enough to hold the 8 bytes of command parameters
* TL_BLEEVT_CC_BUFFER_SIZE is 16 bytes so it is large enough to hold the 8 bytes of command parameters
* Buffer is large enough to hold command complete without payload
*/
uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE];
Expand All @@ -590,7 +590,7 @@ SHCI_CmdStatus_t SHCI_C2_ExtpaConfig(uint32_t gpio_port, uint16_t gpio_pin_numbe
SHCI_CmdStatus_t SHCI_C2_SetFlashActivityControl(SHCI_C2_SET_FLASH_ACTIVITY_CONTROL_Source_t Source)
{
/**
* TL_BLEEVT_CS_BUFFER_SIZE is 15 bytes so it is large enough to hold the 1 byte of command parameter
* TL_BLEEVT_CC_BUFFER_SIZE is 16 bytes so it is large enough to hold the 1 byte of command parameter
* Buffer is large enough to hold command complete without payload
*/
uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE];
Expand Down
11 changes: 6 additions & 5 deletions src/utility/STM32Cube_FW/shci.h
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ extern "C" {
* - bit 4: 1: CS Algo #2 supported 0: CS Algo #2 not supported
* - bit 5: 1: Reduced GATT database in NVM 0: Full GATT database in NVM
* - bit 6: 1: GATT caching is used 0: GATT caching is not used
* - bit 7: 1: LE Power Class 1 0: LE Power Classe 2-3
* - bit 7: 1: LE Power Class 1 0: LE Power Class 2-3
* - other bits: complete with Options_extension flag
*/
uint8_t Options;
Expand Down Expand Up @@ -668,6 +668,7 @@ extern "C" {
*/
#define SHCI_C2_BLE_INIT_BLE_CORE_5_2 11
#define SHCI_C2_BLE_INIT_BLE_CORE_5_3 12
#define SHCI_C2_BLE_INIT_BLE_CORE_5_4 13

/**
* LsSource information
Expand Down Expand Up @@ -904,7 +905,7 @@ extern "C" {
#define FUS_DEVICE_INFO_TABLE_VALIDITY_KEYWORD (0xA94656B9)

/*
* At startup, the informations relative to the wireless binary are stored in RAM trough a structure defined by
* At startup, the information relative to the wireless binary are stored in RAM through a structure defined by
* MB_WirelessFwInfoTable_t.This structure contains 4 fields (Version,MemorySize, Stack_info and a reserved part)
* each of those coded on 32 bits as shown on the table below:
*
Expand Down Expand Up @@ -1150,7 +1151,7 @@ typedef struct {
* @brief Starts the LLD tests CLI
*
* @param param_size : Nb of bytes
* @param p_param : pointeur with data to give from M4 to M0
* @param p_param : pointer with data to give from M4 to M0
* @retval Status
*/
SHCI_CmdStatus_t SHCI_C2_LLDTESTS_Init( uint8_t param_size, uint8_t * p_param );
Expand All @@ -1160,7 +1161,7 @@ typedef struct {
* @brief Starts the LLD tests BLE
*
* @param param_size : Nb of bytes
* @param p_param : pointeur with data to give from M4 to M0
* @param p_param : pointer with data to give from M4 to M0
* @retval Status
*/
SHCI_CmdStatus_t SHCI_C2_BLE_LLD_Init( uint8_t param_size, uint8_t * p_param );
Expand Down Expand Up @@ -1260,7 +1261,7 @@ typedef struct {

/**
* SHCI_GetWirelessFwInfo
* @brief This function read back the informations relative to the wireless binary loaded.
* @brief This function read back the information relative to the wireless binary loaded.
* Refer yourself to MB_WirelessFwInfoTable_t structure to get the significance
* of the different parameters returned.
* @param pWirelessInfo : Pointer to WirelessFwInfo_t.
Expand Down
3 changes: 1 addition & 2 deletions src/utility/STM32Cube_FW/shci_tl.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void shci_send( uint16_t cmd_code, uint8_t len_cmd_payload, uint8_t * p_cmd_payl
pCmdBuffer->cmdserial.cmd.plen = len_cmd_payload;

memcpy(pCmdBuffer->cmdserial.cmd.payload, p_cmd_payload, len_cmd_payload );

CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT;
shciContext.io.Send(0,0);

shci_cmd_resp_wait(SHCI_TL_DEFAULT_TIMEOUT);
Expand Down Expand Up @@ -251,7 +251,6 @@ static void TlUserEvtReceived(TL_EvtPacket_t *shcievt)
/* Weak implementation ----------------------------------------------------------------*/
__WEAK void shci_cmd_resp_wait(uint32_t timeout)
{
CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT;
for (unsigned long start = millis(); (millis() - start) < timeout;) {
if (CmdRspStatusFlag == SHCI_TL_CMD_RESP_RELEASE) {
break;
Expand Down
10 changes: 3 additions & 7 deletions src/utility/STM32Cube_FW/tl.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,8 @@ extern "C" {
#define TL_BLEEVT_CS_OPCODE (0x0F)
#define TL_BLEEVT_VS_OPCODE (0xFF)

#define TL_BLEEVT_CS_PACKET_SIZE (TL_EVT_HDR_SIZE + sizeof(TL_CsEvt_t))
#define TL_BLEEVT_CS_BUFFER_SIZE (sizeof(TL_PacketHeader_t) + TL_BLEEVT_CS_PACKET_SIZE)

#define TL_BLEEVT_CC_PACKET_SIZE (TL_EVT_HDR_SIZE + sizeof(TL_CcEvt_t))
#define TL_BLEEVT_CC_BUFFER_SIZE (sizeof(TL_PacketHeader_t) + TL_BLEEVT_CC_PACKET_SIZE)

/* Exported types ------------------------------------------------------------*/
/**< Packet header */
typedef PACKED_STRUCT
Expand Down Expand Up @@ -93,7 +89,7 @@ typedef PACKED_STRUCT
{
uint8_t numcmd;
uint16_t cmdcode;
uint8_t payload[255];
uint8_t payload[2];
} TL_CcEvt_t;

/**
Expand All @@ -102,7 +98,7 @@ typedef PACKED_STRUCT
typedef PACKED_STRUCT
{
uint16_t subevtcode;
uint8_t payload[255];
uint8_t payload[2];
} TL_AsynchEvt_t;

/**
Expand All @@ -112,7 +108,7 @@ typedef PACKED_STRUCT
{
uint8_t evtcode;
uint8_t plen;
uint8_t payload[255];
uint8_t payload[2];
} TL_Evt_t;

typedef PACKED_STRUCT
Expand Down
1 change: 0 additions & 1 deletion src/utility/STM32Cube_FW/tl_mbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ void TL_Init( void )
TL_RefTable.p_sys_table = &TL_SysTable;
TL_RefTable.p_mem_manager_table = &TL_MemManagerTable;
TL_RefTable.p_traces_table = &TL_TracesTable;

#if 0
TL_RefTable.p_mac_802_15_4_table = &TL_Mac_802_15_4_Table;
TL_RefTable.p_zigbee_table = &TL_Zigbee_Table;
Expand Down