Skip to content

Commit c99f249

Browse files
author
Donatien Garnier
committed
Cordio Nordic LL: Optimize memory for smaller targets
1 parent 7a33fec commit c99f249

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_NRF5x/NRFCordioHCIDriver.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ using namespace ble::vendor::nordic;
5656
using namespace ble::vendor::cordio;
5757

5858
/*! \brief Memory that should be reserved for the stack. */
59+
#if defined(NRF52840_XXAA)
5960
#define CORDIO_LL_MEMORY_FOOTPRINT 41906UL
61+
#else
62+
#define CORDIO_LL_MEMORY_FOOTPRINT 12768UL
63+
#endif
6064

6165
/*! \brief Typical implementation revision number (LlRtCfg_t::implRev). */
6266
#define LL_IMPL_REV 0x2303
@@ -107,7 +111,11 @@ const LlRtCfg_t NRFCordioHCIDriver::_ll_cfg = {
107111
/*maxScanReqRcvdEvt*/ 4,
108112
/*maxExtScanDataLen*/ advDataLen,
109113
/* Connection */
114+
#if defined(NRF52840_XXAA)
110115
/*maxConn*/ 4,
116+
#else
117+
/*maxConn*/ 2,
118+
#endif
111119
/*numTxBufs*/ numTxBufs,
112120
/*numRxBufs*/ numRxBufs,
113121
/*maxAclLen*/ connDataLen,
@@ -117,7 +125,11 @@ const LlRtCfg_t NRFCordioHCIDriver::_ll_cfg = {
117125
/*dtmRxSyncMs*/ 10000,
118126
/* PHY */
119127
/*phy2mSup*/ TRUE,
128+
#if defined(NRF52840_XXAA)
120129
/*phyCodedSup*/ TRUE,
130+
#else
131+
/*phyCodedSup*/ FALSE,
132+
#endif
121133
/*stableModIdxTxSup*/ TRUE,
122134
/*stableModIdxRxSup*/ TRUE
123135
};
@@ -184,7 +196,7 @@ NRFCordioHCIDriver::~NRFCordioHCIDriver()
184196
ble::vendor::cordio::buf_pool_desc_t NRFCordioHCIDriver::get_buffer_pool_description()
185197
{
186198
static union {
187-
uint8_t buffer[ 17304 ];
199+
uint8_t buffer[ 8920 ];
188200
uint64_t align;
189201
};
190202
static const wsfBufPoolDesc_t pool_desc[] = {

0 commit comments

Comments
 (0)