Skip to content

Commit 705fb8e

Browse files
cvinayakAnas Nashif
authored andcommitted
Bluetooth: controller: Move tIFS s/w switch PPI index up by one
Move the use of tIFS software switching PPI index set up by one position to make place for use of PA/LNA implementation. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent d42bd89 commit 705fb8e

File tree

1 file changed

+14
-14
lines changed
  • subsys/bluetooth/controller/hal/nrf5

1 file changed

+14
-14
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ void radio_tx_enable(void)
414414
void radio_disable(void)
415415
{
416416
#if !defined(CONFIG_BT_CTLR_TIFS_HW)
417-
NRF_PPI->CHENCLR = PPI_CHEN_CH8_Msk | PPI_CHEN_CH11_Msk;
417+
NRF_PPI->CHENCLR = PPI_CHEN_CH9_Msk | PPI_CHEN_CH12_Msk;
418418
NRF_PPI->TASKS_CHG[0].DIS = 1;
419419
NRF_PPI->TASKS_CHG[1].DIS = 1;
420420
#endif /* !CONFIG_BT_CTLR_TIFS_HW */
@@ -489,13 +489,13 @@ static u8_t sw_tifs_toggle;
489489
static void sw_switch(u8_t dir, u8_t phy_curr, u8_t flags_curr, u8_t phy_next,
490490
u8_t flags_next)
491491
{
492-
u8_t ppi = 12 + sw_tifs_toggle;
492+
u8_t ppi = 13 + sw_tifs_toggle;
493493
u32_t delay;
494494

495495
NRF_TIMER1->EVENTS_COMPARE[sw_tifs_toggle] = 0;
496496

497-
NRF_PPI->CH[11].EEP = (u32_t)&(NRF_RADIO->EVENTS_END);
498-
NRF_PPI->CH[11].TEP = (u32_t)&(NRF_PPI->TASKS_CHG[sw_tifs_toggle].EN);
497+
NRF_PPI->CH[12].EEP = (u32_t)&(NRF_RADIO->EVENTS_END);
498+
NRF_PPI->CH[12].TEP = (u32_t)&(NRF_PPI->TASKS_CHG[sw_tifs_toggle].EN);
499499

500500
NRF_PPI->CH[ppi].EEP = (u32_t)
501501
&(NRF_TIMER1->EVENTS_COMPARE[sw_tifs_toggle]);
@@ -518,7 +518,7 @@ static void sw_switch(u8_t dir, u8_t phy_curr, u8_t flags_curr, u8_t phy_next,
518518
NRF_TIMER1->CC[sw_tifs_toggle] = 1;
519519
}
520520

521-
NRF_PPI->CHENSET = PPI_CHEN_CH8_Msk | PPI_CHEN_CH11_Msk;
521+
NRF_PPI->CHENSET = PPI_CHEN_CH9_Msk | PPI_CHEN_CH12_Msk;
522522

523523
sw_tifs_toggle += 1;
524524
sw_tifs_toggle &= 1;
@@ -558,7 +558,7 @@ void radio_switch_complete_and_disable(void)
558558
(RADIO_SHORTS_READY_START_Msk | RADIO_SHORTS_END_DISABLE_Msk);
559559

560560
#if !defined(CONFIG_BT_CTLR_TIFS_HW)
561-
NRF_PPI->CHENCLR = PPI_CHEN_CH8_Msk | PPI_CHEN_CH11_Msk;
561+
NRF_PPI->CHENCLR = PPI_CHEN_CH9_Msk | PPI_CHEN_CH12_Msk;
562562
#endif /* !CONFIG_BT_CTLR_TIFS_HW */
563563
}
564564

@@ -692,17 +692,17 @@ u32_t radio_tmr_start(u8_t trx, u32_t ticks_start, u32_t remainder)
692692
NRF_TIMER1->BITMODE = 0; /* 16 bit */
693693
NRF_TIMER1->TASKS_START = 1;
694694

695-
NRF_PPI->CH[8].EEP = (u32_t)&(NRF_RADIO->EVENTS_END);
696-
NRF_PPI->CH[8].TEP = (u32_t)&(NRF_TIMER1->TASKS_CLEAR);
695+
NRF_PPI->CH[9].EEP = (u32_t)&(NRF_RADIO->EVENTS_END);
696+
NRF_PPI->CH[9].TEP = (u32_t)&(NRF_TIMER1->TASKS_CLEAR);
697697

698-
NRF_PPI->CH[9].EEP = (u32_t)&(NRF_TIMER1->EVENTS_COMPARE[0]);
699-
NRF_PPI->CH[9].TEP = (u32_t)&(NRF_PPI->TASKS_CHG[0].DIS);
698+
NRF_PPI->CH[10].EEP = (u32_t)&(NRF_TIMER1->EVENTS_COMPARE[0]);
699+
NRF_PPI->CH[10].TEP = (u32_t)&(NRF_PPI->TASKS_CHG[0].DIS);
700700

701-
NRF_PPI->CH[10].EEP = (u32_t)&(NRF_TIMER1->EVENTS_COMPARE[1]);
702-
NRF_PPI->CH[10].TEP = (u32_t)&(NRF_PPI->TASKS_CHG[1].DIS);
701+
NRF_PPI->CH[11].EEP = (u32_t)&(NRF_TIMER1->EVENTS_COMPARE[1]);
702+
NRF_PPI->CH[11].TEP = (u32_t)&(NRF_PPI->TASKS_CHG[1].DIS);
703703

704-
NRF_PPI->CHG[0] = PPI_CHG_CH9_Msk | PPI_CHG_CH12_Msk;
705-
NRF_PPI->CHG[1] = PPI_CHG_CH10_Msk | PPI_CHG_CH13_Msk;
704+
NRF_PPI->CHG[0] = PPI_CHG_CH10_Msk | PPI_CHG_CH13_Msk;
705+
NRF_PPI->CHG[1] = PPI_CHG_CH11_Msk | PPI_CHG_CH14_Msk;
706706
#endif /* !CONFIG_BT_CTLR_TIFS_HW */
707707

708708
return remainder;

0 commit comments

Comments
 (0)