Skip to content

Commit 9201179

Browse files
cvinayakkartben
authored andcommitted
Bluetooth: Controller: nRF53x: Fix NRF_CCM MAXPACKETSIZE value
Fix NRF_CCM MAXPACKETSIZE value to mitigate Bus Faults. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
1 parent 2057659 commit 9201179

File tree

1 file changed

+6
-1
lines changed
  • subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio

1 file changed

+6
-1
lines changed

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2214,11 +2214,16 @@ static void *radio_ccm_ext_rx_pkt_set(struct ccm *cnf, uint8_t phy, uint8_t pdu_
22142214
!defined(CONFIG_SOC_COMPATIBLE_NRF54LX) && \
22152215
(!defined(CONFIG_BT_CTLR_DATA_LENGTH_MAX) || \
22162216
(CONFIG_BT_CTLR_DATA_LENGTH_MAX < ((HAL_RADIO_PDU_LEN_MAX) - 4U)))
2217+
2218+
#define NRF_CCM_WORKAROUND_XXXX_MAXPACKETSIZE_EXTRA 1U
2219+
22172220
const uint8_t max_len = (NRF_RADIO->PCNF1 & RADIO_PCNF1_MAXLEN_Msk) >>
22182221
RADIO_PCNF1_MAXLEN_Pos;
22192222

22202223
/* MAXPACKETSIZE value 0x001B (27) - 0x00FB (251) bytes */
2221-
NRF_CCM->MAXPACKETSIZE = max_len - 4U;
2224+
NRF_CCM->MAXPACKETSIZE =
2225+
MAX(MIN((max_len - 4U + NRF_CCM_WORKAROUND_XXXX_MAXPACKETSIZE_EXTRA), 0x00FB),
2226+
0x001B);
22222227
#endif
22232228

22242229
#if defined(CONFIG_SOC_COMPATIBLE_NRF54LX)

0 commit comments

Comments
 (0)