mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-10 19:20:01 +00:00
nimble/phy: Enable workaround for nRF52840 errata #164
This adds workaround from "nRF52840 Engineering A Errata v1.2" for issue affecting radio sensitivity in BLE long range mode. X-Original-Commit: f8ec07cb9b51df97cb2b502768e30c2ccf8628f6
This commit is contained in:
@@ -200,6 +200,21 @@ ble_phy_mode_pdu_start_off(int phy_mode)
|
||||
void
|
||||
ble_phy_mode_set(int cur_phy_mode, int txtorx_phy_mode)
|
||||
{
|
||||
#if MYNEWT_VAL(BSP_NRF52840)
|
||||
/*
|
||||
* nRF52840 Engineering A Errata v1.2
|
||||
* [164] RADIO: Low sensitivity in long range mode
|
||||
*/
|
||||
if ((cur_phy_mode == BLE_PHY_MODE_CODED_125KBPS) ||
|
||||
(cur_phy_mode == BLE_PHY_MODE_CODED_500KBPS)) {
|
||||
*(volatile uint32_t *)0x4000173C |= 0x80000000;
|
||||
*(volatile uint32_t *)0x4000173C = ((*(volatile uint32_t *)0x4000173C &
|
||||
0xFFFFFF00) | 0x5C);
|
||||
} else {
|
||||
*(volatile uint32_t *)0x4000173C &= ~0x80000000;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cur_phy_mode == BLE_PHY_MODE_1M) {
|
||||
NRF_RADIO->MODE = RADIO_MODE_MODE_Ble_1Mbit;
|
||||
NRF_RADIO->PCNF0 = g_ble_phy_data.phy_pcnf0 |
|
||||
|
||||
Reference in New Issue
Block a user