Skip to content

Fix nrf52 memory pools #10733

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 5 commits into from
Jun 4, 2019
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
6 changes: 3 additions & 3 deletions features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
},
"max-l2cap-channels": {
"help": "Maximum number of connection oriented channels",
"value": 8,
"value": 1,
"macro_name": "L2C_COC_CHAN_MAX"
},
"max-l2cap-clients": {
"help": "Maximum number of connection oriented channel registered clients",
"value": 4,
"value": 1,
"macro_name": "L2C_COC_REG_MAX"
},
"max-att-writes": {
Expand All @@ -53,7 +53,7 @@
},
"rx-acl-buffer-size": {
"help": "Size of the buffer holding the reassembled complete ACL packet. This will limit the effective ATT_MTU (to its value minus 4 bytes for the header). The size of the buffer must be small enough to be allocated from the existing cordio pool. If this value is increased you may need to adjust the memory pool.",
"value": 100
"value": 70
},
"max-prepared-writes": {
"help": "Number of queued prepare writes supported by server.",
Expand Down
12 changes: 6 additions & 6 deletions features/FEATURE_BLE/targets/TARGET_CORDIO_LL/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"config": {
"max-advertising-sets": {
"help": "Maximum number of advertising sets.",
"value": 4
"value": 3
},
"max-advertising-reports": {
"help": "Maximum number of pending legacy or extended advertising reports.",
"value": 8
"value": 4
},
"default-extended-advertising-fragmentation-size": {
"help": "Default extended advertising data fragmentation size.",
Expand All @@ -23,23 +23,23 @@
},
"rx-buffers": {
"help": "Default number of receive buffers.",
"value": 8
"value": 4
},
"phy-coded-support": {
"help": "Coded PHY supported.",
"value": 0
},
"extended-advertising-size": {
"help": "Maximum extended advertising data (and scan data response) size",
"value": 128
"help": "Maximum extended advertising data (and scan data response) size, Minimum value is 251",
"value": 251
},
"max-acl-size": {
"help": "Maximum ACL buffer size",
"value": 256
},
"tx-buffers": {
"help": "Default number of send buffers",
"value": 8
"value": 4
},
"handle-vendor-specific-hci-commands": {
"help": "Handle VS HCI commands. Valid values are 0 (ignore) and 1 (handle).",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
},
"extended-advertising-size": {
"help": "Maximum extended advertising data (and scan data response) size",
"value": 1650
"value": 512
},
"max-acl-size": {
"help": "Maximum ACL buffer size",
"value": 512
"value": 256
},
"tx-buffers": {
"help": "Default number of send buffers",
"value": 16
"value": 4
},
"cryptocell310-acceleration": {
"help": "Should the link layer use the Crypto Cell 310 to offload encryption.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ using namespace ble::vendor::cordio;
#define MBED_CONF_CORDIO_LL_TX_BUFFERS MBED_CONF_CORDIO_LL_NRF52840_TX_BUFFERS
#define MBED_CONF_CORDIO_LL_PHY_CODED_SUPPORT MBED_CONF_CORDIO_LL_NRF52840_PHY_CODED_SUPPORT

#define CORDIO_LL_MEMORY_FOOTPRINT 41906UL
#define CORDIO_LL_MEMORY_FOOTPRINT 15400UL

#else

#define CORDIO_LL_MEMORY_FOOTPRINT 12768UL
#define CORDIO_LL_MEMORY_FOOTPRINT 12500UL

#endif

Expand Down Expand Up @@ -235,9 +235,9 @@ ble::vendor::cordio::buf_pool_desc_t NRFCordioHCIDriver::get_buffer_pool_descrip
{
static union {
#if defined(NRF52840_XXAA)
uint8_t buffer[ 17304 ];
uint8_t buffer[ 4900 ];
#else
uint8_t buffer[ 8920 ];
uint8_t buffer[ 4900 ];
#endif
uint64_t align;
};
Expand All @@ -246,8 +246,7 @@ ble::vendor::cordio::buf_pool_desc_t NRFCordioHCIDriver::get_buffer_pool_descrip
{ 32, 16 + 4 },
{ 64, 8 },
{ 128, 4 + MBED_CONF_CORDIO_LL_MAX_ADVERTISING_REPORTS },
{ aclBufSize, MBED_CONF_CORDIO_LL_TX_BUFFERS + MBED_CONF_CORDIO_LL_RX_BUFFERS },
{ 272, 1 }
{ aclBufSize, MBED_CONF_CORDIO_LL_TX_BUFFERS + MBED_CONF_CORDIO_LL_RX_BUFFERS }
};

return buf_pool_desc_t(buffer, pool_desc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"INIT_PERIPHERAL",
"INIT_ENCRYPTED",
"LHCI_ENABLE_VS=0",
"BB_CLK_RATE_HZ=1000000"
"BB_CLK_RATE_HZ=1000000",
"LL_MAX_PER_SCAN=3"
]
}