File tree Expand file tree Collapse file tree 5 files changed +19
-6
lines changed
transport/NRF5_ESB/driver Expand file tree Collapse file tree 5 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 559559 * - NRF5_BLE_1MBPS for 1Mbps BLE modulation
560560 */
561561#ifndef MY_NRF5_ESB_MODE
562+ #ifdef NRF5_250KBPS
562563#define MY_NRF5_ESB_MODE (NRF5_250KBPS)
564+ #else
565+ #define MY_NRF5_ESB_MODE (NRF5_1MBPS)
566+ #endif
563567#endif
564568
565569/**
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ bool hwInit(void)
9999 NRF_POWER->TASKS_CONSTLAT = 1 ;
100100
101101 // Enable cache on >= NRF52
102- #ifndef NRF51
102+ #if !defined( NRF51) && !defined(NRF52805_XXAA)
103103 NRF_NVMC->ICACHECNF = NVMC_ICACHECNF_CACHEEN_Msk;
104104#endif
105105
Original file line number Diff line number Diff line change @@ -65,7 +65,9 @@ typedef enum {
6565typedef enum {
6666 NRF5_1MBPS = RADIO_MODE_MODE_Nrf_1Mbit ,
6767 NRF5_2MBPS = RADIO_MODE_MODE_Nrf_2Mbit ,
68+ #ifdef RADIO_MODE_MODE_Nrf_250Kbit
6869 NRF5_250KBPS = RADIO_MODE_MODE_Nrf_250Kbit , // Deprecated!!!
70+ #endif
6971 NRF5_BLE_1MBPS = RADIO_MODE_MODE_Ble_1Mbit ,
7072} nrf5_mode_e ;
7173
Original file line number Diff line number Diff line change @@ -551,9 +551,12 @@ static inline uint8_t NRF5_ESB_byte_time()
551551 return (3 );
552552 } else if (MY_NRF5_ESB_MODE == NRF5_2MBPS) {
553553 return (2 );
554- } else if (MY_NRF5_ESB_MODE == NRF5_250KBPS) {
554+ }
555+ #ifdef NRF5_250KBPS
556+ else if (MY_NRF5_ESB_MODE == NRF5_250KBPS) {
555557 return (5 );
556558 }
559+ #endif
557560}
558561
559562extern " C" {
Original file line number Diff line number Diff line change 103103 RADIO_SHORTS_READY_START_Msk | \
104104 RADIO_SHORTS_ADDRESS_RSSISTART_Msk | RADIO_SHORTS_DISABLED_RSSISTOP_Msk)
105105
106- // PPI Channels for TX
106+ /** PPI Channels for TX
107+ * Not all NRF5 modules have the same number of PPI channels
108+ * For regular PPI, select the highest possible channels
109+ */
110+ #define NRF5_ESB_PPI_LAST_CHANNEL (PPI_CH_NUM - 1)
107111#if (NRF5_RADIO_TIMER_IRQN != TIMER0_IRQn )
108112// Use two regular PPI channels
109- #define NRF5_ESB_PPI_TIMER_START 14
110- #define NRF5_ESB_PPI_TIMER_RADIO_DISABLE 15
113+ #define NRF5_ESB_PPI_TIMER_START (NRF5_ESB_PPI_LAST_CHANNEL - 1)
114+ #define NRF5_ESB_PPI_TIMER_RADIO_DISABLE (NRF5_ESB_PPI_LAST_CHANNEL)
111115#else
112116// Use one regular PPI channel and one predefined PPI channel
113117#define NRF5_ESB_USE_PREDEFINED_PPI
114- #define NRF5_ESB_PPI_TIMER_START 15
118+ #define NRF5_ESB_PPI_TIMER_START (NRF5_ESB_PPI_LAST_CHANNEL)
115119#define NRF5_ESB_PPI_TIMER_RADIO_DISABLE 22
116120#endif
117121#define NRF5_ESB_PPI_BITS \
You can’t perform that action at this time.
0 commit comments