Lines Matching full:we

59  * and 16ms for a 30ppm crystal! We need to limit PDU size based on
71 * We configure the nrf with a 1 byte S0 field, 8 bit length field, and
127 /* XXX: if 27 byte packets desired we can make this smaller */
209 * pending bit was TRUE for the radio interrupt (as expected) as we never
222 * Not sure what the end result of all this is. We will clear the pending
223 * bit in the NVIC just to be sure when we disable the PHY.
231 * I figure this out I am just going to allocate 67 words so we have enough
471 * Called when we want to wait if the radio is in either the rx or tx
472 * disable states. We want to wait until that state is over before doing
506 * We need to adjust start time to include radio ramp-up and TX pipeline in ble_phy_set_start_time()
510 * phy, thus we'll offset RTC by 2 full ticks (61 usecs) and then compensate in ble_phy_set_start_time()
525 * tick then we should better count one more low-power tick rather than in ble_phy_set_start_time()
526 * 30 high-power usecs. Also make sure we don't set TIMER0 CC to 0 as the in ble_phy_set_start_time()
536 * Can we set the RTC compare to start TIMER0? We can do it if: in ble_phy_set_start_time()
539 * b) The value we want to set is not at least N+2 from current in ble_phy_set_start_time()
542 * NOTE: since the counter can tick 1 while we do these calculations we in ble_phy_set_start_time()
571 /* Store the cputime at which we set the RTC */ in ble_phy_set_start_time()
586 * Set TIMER0 to fire immediately. We can't set CC to 0 as compare will not in ble_phy_set_start_now()
594 * Set RTC compare to start TIMER0. We need to set it to at least N+2 ticks in ble_phy_set_start_now()
607 * Store the cputime at which we set the RTC in ble_phy_set_start_now()
611 * than what we expect. Since this is only used on RX, it may cause AUX scan in ble_phy_set_start_now()
612 * to be scheduled 1 or 2 ticks too late so we'll miss it - it's acceptable in ble_phy_set_start_now()
621 * Function is used to set PPI so that we can time out waiting for a reception
622 * to occur. This happens for two reasons: we have sent a packet and we are
623 * waiting for a respons (txrx should be set to ENABLE_TXRX) or we are
624 * starting a connection event and we are a slave and we are waiting for the
628 * is no additional time to wait; we know when we should receive the address of
651 * It's possible that we'll capture PDU start time at the end of timer in ble_phy_wfr_enable()
679 * we are actually calculating relative to start of packet payload in ble_phy_wfr_enable()
695 /* Enable the disabled interrupt so we time out on events compare */ in ble_phy_wfr_enable()
707 * CC[1] is only used as a reference on RX start, we do not need it here so in ble_phy_wfr_enable()
799 * On Coded PHY there are CI and TERM1 fields before PDU starts so we need in ble_phy_rx_xcvr_setup()
844 /* Store PHY on which we've just transmitted smth */ in ble_phy_tx_end_isr()
847 /* If this transmission was encrypted we need to remember it */ in ble_phy_tx_end_isr()
863 * XXX: not sure what to do. We had a HW error during transmission. in ble_phy_tx_end_isr()
909 * XXX: not sure we need to stop the timer here all the time. Or that in ble_phy_tx_end_isr()
930 * set in packet header. However, here we need actual coding of received in ble_phy_get_cur_rx_phy_mode()
985 * be a MIC failure but we should not hand it up. I guess in ble_phy_rx_end_isr()
986 * this is just some form of rx error and that is how we in ble_phy_rx_end_isr()
996 * know what else to do. If ENDCRYPT is not set and we are in ble_phy_rx_end_isr()
997 * encrypted we need to not trust this frame and drop it. in ble_phy_rx_end_isr()
1008 * Let's schedule TX now and we will just cancel it after processing RXed in ble_phy_rx_end_isr()
1009 * packet if we don't need TX. in ble_phy_rx_end_isr()
1011 * We need this to initiate connection in case AUX_CONNECT_REQ was sent on in ble_phy_rx_end_isr()
1012 * LE Coded S8. In this case the time we process RXed packet is roughly the in ble_phy_rx_end_isr()
1013 * same as the limit when we need to have TX scheduled (i.e. TIMER0 and PPI in ble_phy_rx_end_isr()
1014 * armed) so we may simply miss the slot and set the timer in the past. in ble_phy_rx_end_isr()
1016 * When TX is scheduled in advance, we may event process packet a bit longer in ble_phy_rx_end_isr()
1028 /* XXX: we may have asymmetric phy so next phy may be different... */ in ble_phy_rx_end_isr()
1039 * TIMER0 already counted past CC[0]. In such case we will be stuck waiting in ble_phy_rx_end_isr()
1041 * For now let's set a flag denoting that we are late in RX-TX transition so in ble_phy_rx_end_isr()
1045 * Note: CC[3] is used only for wfr which we do not need here. in ble_phy_rx_end_isr()
1100 * We may start receiving packet somewhere during preamble in which case in ble_phy_rx_start_isr()
1125 /* XXX: I wonder if we always have the 1st byte. If we need to wait for in ble_phy_rx_start_isr()
1136 * If state is disabled, we should have the BCMATCH. If not, in ble_phy_rx_start_isr()
1156 /* Must start aar if we need to */ in ble_phy_rx_start_isr()
1206 * we have both an ADDRESS and DISABLED interrupt in rx state. If we get in ble_phy_isr()
1207 * an address, we disable the DISABLED interrupt. in ble_phy_isr()
1210 /* We get this if we have started to receive a frame */ in ble_phy_isr()
1213 * wfr timer is calculated to expire at the exact time we should start in ble_phy_isr()
1216 * be disabled while we are waiting for EVENT_BCCMATCH after 1st byte in ble_phy_isr()
1218 * case we should not clear DISABLED irq mask so it will be handled as in ble_phy_isr()
1220 * on purpose and there's nothing more to handle so we can clear mask. in ble_phy_isr()
1239 /* Receive packet end (we dont enable this for transmit) */ in ble_phy_isr()
1291 * We setup GPIOTE starting from last configuration index to minimize risk in ble_phy_dbg_time_setup()
1293 * this is just debugging code we can live with this. in ble_phy_dbg_time_setup()
1359 * XXX: I do not think we need to wait for settling time here since in ble_phy_init()
1360 * we will probably not use the radio for longer than the settling time in ble_phy_init()
1478 * In case radio is now disabling we'll wait for it to finish, but if for in ble_phy_rx()
1479 * any reason it's just in idle state we proceed with RX as usual since in ble_phy_rx()
1482 * Note that TX and RX states values are the same except for 3rd bit so we in ble_phy_rx()
1564 * This function is called to set the start time when we are not going from
1586 /* Clear timer0 compare to RXEN since we are transmitting */ in ble_phy_tx_set_start_time()
1604 * This function acts a bit differently than transmit. If we are late getting
1605 * here we will still attempt to receive.
1623 /* Clear timer0 compare to TXEN since we are transmitting */ in ble_phy_rx_set_start_time()
1629 /* We're late so let's just try to start RX as soon as possible */ in ble_phy_rx_set_start_time()
1642 * If we enabled receiver but were late, let's return proper error code so in ble_phy_rx_set_start_time()
1676 * XXX: Although we may not have to do this here, I clear all the PPI in ble_phy_tx()
1741 /* If we already started transmitting, abort it! */ in ble_phy_tx()
1764 * the chip limits, we "rail" the power level so we dont exceed the min/max
2022 /* When DTM is enabled we need to disable whitening as per in ble_phy_enable_dtm()