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 543
543
* - NRF5_BLE_1MBPS for 1Mbps BLE modulation
544
544
*/
545
545
#ifndef MY_NRF5_ESB_MODE
546
+ #ifdef NRF5_250KBPS
546
547
#define MY_NRF5_ESB_MODE (NRF5_250KBPS)
548
+ #else
549
+ #define MY_NRF5_ESB_MODE (NRF5_1MBPS)
550
+ #endif
547
551
#endif
548
552
549
553
/**
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ bool hwInit(void)
99
99
NRF_POWER->TASKS_CONSTLAT = 1 ;
100
100
101
101
// Enable cache on >= NRF52
102
- #ifndef NRF51
102
+ #if !defined( NRF51) && !defined(NRF52805_XXAA)
103
103
NRF_NVMC->ICACHECNF = NVMC_ICACHECNF_CACHEEN_Msk;
104
104
#endif
105
105
Original file line number Diff line number Diff line change @@ -65,7 +65,9 @@ typedef enum {
65
65
typedef enum {
66
66
NRF5_1MBPS = RADIO_MODE_MODE_Nrf_1Mbit ,
67
67
NRF5_2MBPS = RADIO_MODE_MODE_Nrf_2Mbit ,
68
+ #ifdef RADIO_MODE_MODE_Nrf_250Kbit
68
69
NRF5_250KBPS = RADIO_MODE_MODE_Nrf_250Kbit , // Deprecated!!!
70
+ #endif
69
71
NRF5_BLE_1MBPS = RADIO_MODE_MODE_Ble_1Mbit ,
70
72
} nrf5_mode_e ;
71
73
Original file line number Diff line number Diff line change @@ -551,9 +551,12 @@ static inline uint8_t NRF5_ESB_byte_time()
551
551
return (3 );
552
552
} else if (MY_NRF5_ESB_MODE == NRF5_2MBPS) {
553
553
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) {
555
557
return (5 );
556
558
}
559
+ #endif
557
560
}
558
561
559
562
extern " C" {
Original file line number Diff line number Diff line change 103
103
RADIO_SHORTS_READY_START_Msk | \
104
104
RADIO_SHORTS_ADDRESS_RSSISTART_Msk | RADIO_SHORTS_DISABLED_RSSISTOP_Msk)
105
105
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)
107
111
#if (NRF5_RADIO_TIMER_IRQN != TIMER0_IRQn )
108
112
// 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)
111
115
#else
112
116
// Use one regular PPI channel and one predefined PPI channel
113
117
#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)
115
119
#define NRF5_ESB_PPI_TIMER_RADIO_DISABLE 22
116
120
#endif
117
121
#define NRF5_ESB_PPI_BITS \
You can’t perform that action at this time.
0 commit comments