Skip to content
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

Cube update #203

Merged
merged 9 commits into from
May 7, 2024
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions lib/stm32wb/hci/README
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Origin:
https://github.com/STMicroelectronics/STM32CubeWB

Status:
version v1.18.0
version v1.19.0

Purpose:
This library is used on stm32wb series to enable HCI communication between
Expand Down Expand Up @@ -48,7 +48,7 @@ URL:
https://github.com/STMicroelectronics/STM32CubeWB

Commit:
82988c4a028fbc63d85fb44b813535c290f71822
1ceb3b0c5bfffbf0ee20bccec683f37a0c2a51d5

Maintained-by:
External
Expand Down
51 changes: 29 additions & 22 deletions lib/stm32wb/hci/ble_bufsize.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*****************************************************************************
* @attention
*
* Copyright (c) 2018-2023 STMicroelectronics.
* Copyright (c) 2018-2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down Expand Up @@ -35,28 +35,35 @@
* equal to BLE_DEFAULT_ATT_MTU (23).
*/
#define BLE_PREP_WRITE_X_ATT(max_att) \
(DIVC(max_att, BLE_DEFAULT_ATT_MTU - 5) * 2)
(DIVC(max_att, BLE_DEFAULT_ATT_MTU - 5) * 2)

/*
* BLE_DEFAULT_PREP_WRITE_LIST_SIZE: default minimum Prepare Write List size.
*/
#define BLE_DEFAULT_PREP_WRITE_LIST_SIZE \
BLE_PREP_WRITE_X_ATT(BLE_DEFAULT_MAX_ATT_SIZE)
BLE_PREP_WRITE_X_ATT(BLE_DEFAULT_MAX_ATT_SIZE)

/*
* BLE_MEM_BLOCK_X_MTU: compute how many memory blocks are needed to compose
* an ATT packet with ATT_MTU=mtu.
*/
#define BLE_MEM_BLOCK_SIZE 32

#if (SLAVE_ONLY != 0) ||(BASIC_FEATURES != 0)
#define BLE_MEM_BLOCK_X_PTX(n_link) 0
#else
#define BLE_MEM_BLOCK_X_PTX(n_link) (n_link)
#endif

#define BLE_MEM_BLOCK_X_TX(mtu) \
(DIVC((mtu) + 4U, BLE_MEM_BLOCK_SIZE) + 1U)
(DIVC((mtu) + 4U, BLE_MEM_BLOCK_SIZE) + 1)

#define BLE_MEM_BLOCK_X_RX(mtu, n_link) \
((DIVC((mtu) + 4U, BLE_MEM_BLOCK_SIZE) + 2U) * (n_link) + 1)
((DIVC((mtu) + 4U, BLE_MEM_BLOCK_SIZE) + 2U) * (n_link) + 1)

#define BLE_MEM_BLOCK_X_MTU(mtu, n_link) \
(BLE_MEM_BLOCK_X_TX(mtu) + BLE_MEM_BLOCK_X_RX(mtu, n_link))
(BLE_MEM_BLOCK_X_TX(mtu) + BLE_MEM_BLOCK_X_PTX(n_link) + \
BLE_MEM_BLOCK_X_RX(mtu, n_link))

/*
* BLE_MBLOCKS_SECURE_CONNECTIONS: minimum number of blocks required for
Expand All @@ -72,8 +79,8 @@
* - n_link: maximum number of simultaneous connections
*/
#define BLE_MBLOCKS_CALC(pw, mtu, n_link) \
((pw) + MAX(BLE_MEM_BLOCK_X_MTU(mtu, n_link), \
BLE_MBLOCKS_SECURE_CONNECTIONS))
((pw) + MAX(BLE_MEM_BLOCK_X_MTU(mtu, n_link), \
BLE_MBLOCKS_SECURE_CONNECTIONS))

/*
* BLE_FIXED_BUFFER_SIZE_BYTES:
Expand All @@ -90,30 +97,30 @@
* mentioned parameters.
*/
#if (BEACON_ONLY != 0)
#define BLE_FIXED_BUFFER_SIZE_BYTES 4092 /* Beacon only */
#define BLE_FIXED_BUFFER_SIZE_BYTES 4100 /* Beacon only */
#elif (LL_ONLY_BASIC != 0)
#define BLE_FIXED_BUFFER_SIZE_BYTES 5788 /* LL only Basic*/
#define BLE_FIXED_BUFFER_SIZE_BYTES 6040 /* LL only Basic*/
#elif (LL_ONLY != 0)
#define BLE_FIXED_BUFFER_SIZE_BYTES 6036 /* LL only Full */
#define BLE_FIXED_BUFFER_SIZE_BYTES 6288 /* LL only Full */
#elif (SLAVE_ONLY != 0)
#define BLE_FIXED_BUFFER_SIZE_BYTES 6300 /* Peripheral only */
#define BLE_FIXED_BUFFER_SIZE_BYTES 6408 /* Peripheral only */
#elif (BASIC_FEATURES != 0)
#define BLE_FIXED_BUFFER_SIZE_BYTES 6632 /* Basic Features */
#define BLE_FIXED_BUFFER_SIZE_BYTES 7184 /* Basic Features */
#else
#define BLE_FIXED_BUFFER_SIZE_BYTES 7152 /* Full stack */
#define BLE_FIXED_BUFFER_SIZE_BYTES 7468 /* Full stack */
#endif

/*
* BLE_PER_LINK_SIZE_BYTES: additional memory size used per link
*/
#if (BEACON_ONLY != 0)
#define BLE_PER_LINK_SIZE_BYTES 112 /* Beacon only */
#define BLE_PER_LINK_SIZE_BYTES 108 /* Beacon only */
#elif (LL_ONLY_BASIC != 0)
#define BLE_PER_LINK_SIZE_BYTES 244 /* LL only Basic */
#elif (LL_ONLY != 0)
#define BLE_PER_LINK_SIZE_BYTES 244 /* LL only Full */
#elif (SLAVE_ONLY != 0)
#define BLE_PER_LINK_SIZE_BYTES 344 /* Peripheral only */
#define BLE_PER_LINK_SIZE_BYTES 392 /* Peripheral only */
#elif (BASIC_FEATURES != 0)
#define BLE_PER_LINK_SIZE_BYTES 420 /* Basic Features */
#else
Expand All @@ -131,9 +138,9 @@
* @param mblocks_count: Number of memory blocks allocated for packets.
*/
#define BLE_TOTAL_BUFFER_SIZE(n_link, mblocks_count) \
(16 + BLE_FIXED_BUFFER_SIZE_BYTES + \
(BLE_PER_LINK_SIZE_BYTES * (n_link)) + \
((BLE_MEM_BLOCK_SIZE + 12) * (mblocks_count)))
(16 + BLE_FIXED_BUFFER_SIZE_BYTES + \
(BLE_PER_LINK_SIZE_BYTES * (n_link)) + \
((BLE_MEM_BLOCK_SIZE + 8) * (mblocks_count)))

/*
* BLE_EXT_ADV_BUFFER_SIZE
Expand All @@ -148,7 +155,7 @@
* Valid values are from 31 to 1650.
*/
#define BLE_EXT_ADV_BUFFER_SIZE(set_nbr, data_len) \
(2512 + ((892 + (DIVC(data_len, 207) * 244)) * (set_nbr)))
(2512 + ((892 + (DIVC(data_len, 207) * 244)) * (set_nbr)))

/*
* BLE_TOTAL_BUFFER_SIZE_GATT: this macro returns the amount of memory,
Expand All @@ -168,8 +175,8 @@
* @param att_value_array_size: Size of the storage area for Attribute values.
*/
#define BLE_TOTAL_BUFFER_SIZE_GATT(num_gatt_attributes, num_gatt_services, att_value_array_size) \
(((((att_value_array_size) - 1) | 3) + 1) + \
(40 * (num_gatt_attributes)) + (48 * (num_gatt_services)))
(((((att_value_array_size) - 1) | 3) + 1) + \
(40 * (num_gatt_attributes)) + (48 * (num_gatt_services)))


#endif /* BLE_BUFSIZE_H__ */
11 changes: 2 additions & 9 deletions stm32cube/stm32f4xx/README
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Origin:
http://www.st.com/en/embedded-software/stm32cubef4.html

Status:
version v1.27.1
version v1.28.0

Purpose:
ST Microelectronics official MCU package for STM32F4 series.
Expand All @@ -23,7 +23,7 @@ URL:
https://github.com/STMicroelectronics/STM32CubeF4

Commit:
52757b5e33259a088509a777a9e3a5b971194c7d
9e7d2aa86197059fc29cf89931d46d0ab64e6081

Maintained-by:
External
Expand Down Expand Up @@ -62,11 +62,4 @@ Patch List:
This will have to be removed once Zephyr driver is migrated ot the new
Cube HAL ethernet API.

*Wrap define UNUSED with an ifndef
This will prevent a compiler warning for the case the UNUSED macro
is already defined elsewhere in the project
Impacted files:
drivers/include/stm32f4xx_hal_def.h
ST Internal Reference: 136825

See release_note.html from STM32Cube
Loading
Loading