/nrf52832-nimble/packages/NimBLE-latest/porting/nimble/src/ |
H A D | os_cputime_pwr2.c | 38 * os cputime usecs to ticks 42 * @param usecs The number of microseconds to convert to ticks 44 * @return uint32_t The number of ticks corresponding to 'usecs' 47 os_cputime_usecs_to_ticks(uint32_t usecs) in os_cputime_usecs_to_ticks() argument 56 ticks = (1ULL << 32) * MYNEWT_VAL(OS_CPUTIME_FREQ) / 1000000 * usecs; in os_cputime_usecs_to_ticks() 59 //ticks += ((uint64_t)usecs * (1526122139+1)) >> 32; in os_cputime_usecs_to_ticks() 65 * cputime ticks to usecs 80 uint32_t usecs; in os_cputime_ticks_to_usecs() local 100 usecs = ((ticks >> shift) * 15625) + (((ticks & 0x1ff) * 15625) >> shift); in os_cputime_ticks_to_usecs() 101 return usecs; in os_cputime_ticks_to_usecs()
|
H A D | os_cputime.c | 72 os_cputime_delay_usecs(uint32_t usecs) in os_cputime_delay_usecs() argument 76 ticks = os_cputime_usecs_to_ticks(usecs); in os_cputime_delay_usecs() 99 os_cputime_timer_relative(struct hal_timer *timer, uint32_t usecs) in os_cputime_timer_relative() argument 106 cputime = os_cputime_get32() + os_cputime_usecs_to_ticks(usecs); in os_cputime_timer_relative()
|
/nrf52832-nimble/packages/NimBLE-latest/porting/nimble/include/os/ |
H A D | os_cputime.h | 119 * @param usecs The number of nanoseconds to convert to ticks 153 * @param usecs The number of microseconds to convert to ticks 155 * @return uint32_t The number of ticks corresponding to 'usecs' 157 uint32_t os_cputime_usecs_to_ticks(uint32_t usecs); 177 * Wait until 'usecs' microseconds has elapsed. This is a blocking delay. 179 * @param usecs The number of usecs to wait. 181 void os_cputime_delay_usecs(uint32_t usecs); 209 * Sets a cpu timer that will expire 'usecs' microseconds from the current 215 * @param usecs The number of usecs from now at which the timer will expire. 220 int os_cputime_timer_relative(struct hal_timer *timer, uint32_t usecs);
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/controller/include/controller/ |
H A D | ble_ll_sched.h | 29 #define BLE_LL_SCHED_32KHZ_TICKS_PER_SLOT (41) /* 1 tick = 30.517 usecs */ 36 * Note: worst case time to tx adv, rx scan req and send scan rsp is 1228 usecs. 41 * Note: worst-case is 376 + 150 + 352 = 878 usecs 44 * how long that will take (worst-case is 376 usecs). 64 * 2120 usecs for tx/rx and 150 for IFS = 4540 usecs. 124 * remainder: # of usecs from offset till tx/rx should occur
|
H A D | ble_ll.h | 66 * should be a note in there that the converted usecs to ticks value of this 68 * value of settle time should be 31 usecs. I would suspect all settling times 69 * would exceed 31 usecs. 90 /* Timing jitter as per spec is +/16 usecs */ 245 #define BLE_LL_IFS (150) /* usecs */ 246 #define BLE_LL_MAFS (300) /* usecs */ 423 * 'usecs' on a PHY 'phy_mode'. */ 424 uint16_t ble_ll_pdu_max_tx_octets_get(uint32_t usecs, int phy_mode); 524 /* Convert usecs to ticks and round up to nearest tick */ 526 ble_ll_usecs_to_ticks_round_up(uint32_t usecs) in ble_ll_usecs_to_ticks_round_up() argument [all …]
|
H A D | ble_ll_adv.h | 33 * advInterval: increments of 625 usecs 37 #define BLE_LL_ADV_ITVL (625) /* usecs */ 48 #define BLE_LL_ADV_PDU_ITVL_HD_MS_MAX (3750) /* usecs */
|
H A D | ble_ll_ctrl.h | 221 * -> max_rx_time (2 bytes): defines connMaxRxTime. Range 328 to 2120 usecs. 223 * -> max_tx_time (2 bytes): defines connMaxTxTime. Range 328 to 2120 usecs.
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/controller/src/ |
H A D | ble_ll.c | 1339 uint32_t usecs; in ble_ll_pdu_tx_time_get() local 1343 /* 8 usecs per byte */ in ble_ll_pdu_tx_time_get() 1344 usecs = payload_len << 3; in ble_ll_pdu_tx_time_get() 1346 /* 4 usecs per byte */ in ble_ll_pdu_tx_time_get() 1347 usecs = payload_len << 2; in ble_ll_pdu_tx_time_get() 1349 /* S=8 => 8 * 8 = 64 usecs per byte */ in ble_ll_pdu_tx_time_get() 1350 usecs = payload_len << 6; in ble_ll_pdu_tx_time_get() 1352 /* S=2 => 2 * 8 = 16 usecs per byte */ in ble_ll_pdu_tx_time_get() 1353 usecs = payload_len << 4; in ble_ll_pdu_tx_time_get() 1358 usecs += g_ble_ll_pdu_header_tx_time[phy_mode]; in ble_ll_pdu_tx_time_get() [all …]
|
H A D | ble_ll_conn_priv.h | 33 #define BLE_LL_CONN_SUPP_TIME_MIN (328) /* usecs */ 34 #define BLE_LL_CONN_SUPP_TIME_MAX (17040) /* usecs */ 35 #define BLE_LL_CONN_SUPP_TIME_MIN_UNCODED (328) /* usecs */ 36 #define BLE_LL_CONN_SUPP_TIME_MAX_UNCODED (2120) /* usecs */ 37 #define BLE_LL_CONN_SUPP_TIME_MIN_CODED (2704) /* usecs */ 38 #define BLE_LL_CONN_SUPP_TIME_MAX_CODED (17040) /* usecs */
|
H A D | ble_ll_sched.c | 162 uint32_t usecs; in ble_ll_sched_conn_reschedule() local 175 usecs = connsm->slave_cur_window_widening; in ble_ll_sched_conn_reschedule() 176 sch->start_time -= (os_cputime_usecs_to_ticks(usecs) + 1); in ble_ll_sched_conn_reschedule() 340 * request. At 1 Mbps, this is 1752 usecs, or 57.41 ticks. Using 57 ticks in ble_ll_sched_master_new() 341 * makes us off ~13 usecs. Since we dont want to actually calculate the in ble_ll_sched_master_new() 348 * 13 usecs before (this is important). in ble_ll_sched_master_new() 367 * we are transmitting 1253 usecs from the earliest start. This would cause in ble_ll_sched_master_new() 517 * to set the anchor point usecs; just transmit to the nearest tick. in ble_ll_sched_master_new() 570 * request. At 1 Mbps, this is 1752 usecs, or 57.41 ticks. Using 57 ticks in ble_ll_sched_master_new() 571 * makes us off ~13 usecs. Since we dont want to actually calculate the in ble_ll_sched_master_new() [all …]
|
H A D | ble_ll_conn.c | 108 * keeping track of last anchor point. Would need last anchor usecs too. I guess 109 * we could also keep last anchor usecs as a uint32 or something and when we 111 * usecs calculation. Not sure. 261 uint32_t usecs; in ble_ll_conn_calc_itvl_ticks() local 267 usecs = connsm->conn_itvl * BLE_LL_CONN_ITVL_USECS; in ble_ll_conn_calc_itvl_ticks() 268 ticks = os_cputime_usecs_to_ticks(usecs); in ble_ll_conn_calc_itvl_ticks() 269 connsm->conn_itvl_usecs = (uint8_t)(usecs - in ble_ll_conn_calc_itvl_ticks() 1438 uint32_t usecs; in ble_ll_conn_event_start_cb() local 1534 * For the 32 kHz crystal, the amount of usecs we have to wait in ble_ll_conn_event_start_cb() 1540 * -> Up to one tick since the usecs to ticks calc can be off in ble_ll_conn_event_start_cb() [all …]
|
H A D | ble_ll_ctrl.c | 2067 uint32_t usecs; in ble_ll_ctrl_terminate_start() local 2078 usecs = connsm->supervision_tmo * BLE_HCI_CONN_SPVN_TMO_UNITS * 1000; in ble_ll_ctrl_terminate_start() 2080 os_cputime_usecs_to_ticks(usecs); in ble_ll_ctrl_terminate_start()
|
H A D | ble_ll_adv.c | 1306 * advertising packets is 250 usecs (8.19 ticks) on LE Coded and a bit less in ble_ll_adv_aux_set_start_time()
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/drivers/nrf52/src/ |
H A D | ble_phy.c | 146 /* packet start offsets (in usecs) */ 151 /* Radio ramp-up times in usecs (fast mode) */ 266 /* Packet start offset (in usecs). This is the preamble plus access address. 484 /* This will end within a short time (6 usecs). Just poll */ in nrf_wait_disabled() 487 * no more than 6 usecs */ in nrf_wait_disabled() 509 * Radio ramp-up time is 40 usecs and TX delay is 3 or 5 usecs depending on 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() 526 * 30 high-power usecs. Also make sure we don't set TIMER0 CC to 0 as the in ble_phy_set_start_time() 633 * @param wfr_usecs Amount of usecs to wait. 1017 * during radio ramp-up - this gives us extra 40 usecs which is more than in ble_phy_rx_end_isr() [all …]
|
H A D | ble_phy_trace.c | 32 os_trace_module_desc(&g_ble_phy_trace_mod, "0 phy_set_tx cputime=%u usecs=%u"); in ble_phy_trace_module_send_desc() 33 os_trace_module_desc(&g_ble_phy_trace_mod, "1 phy_set_rx cputime=%u usecs=%u"); in ble_phy_trace_module_send_desc()
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/drivers/nrf51/src/ |
H A D | ble_phy.c | 296 /* This will end within a short time (6 usecs). Just poll */ in nrf_wait_disabled() 299 * no more than 6 usecs */ in nrf_wait_disabled() 318 * XXX: The TXEN time is 140 usecs but there may be additional delays in ble_phy_set_start_time() 325 * tick offset, which is 152.5 usecs. The TXEN time is 140 usecs. This in ble_phy_set_start_time() 396 * @param wfr_usecs Amount of usecs to wait. 408 * is captured in CC[2]. I just made up the 16 usecs I add here. in ble_phy_wfr_enable() 661 uint32_t usecs; in ble_phy_rx_start_isr() local 693 usecs = NRF_TIMER0->CC[1] - ble_phy_mode_pdu_start_off(BLE_PHY_MODE_1M); in ble_phy_rx_start_isr() 694 ticks = os_cputime_usecs_to_ticks(usecs); in ble_phy_rx_start_isr() 695 ble_hdr->rem_usecs = usecs - os_cputime_ticks_to_usecs(ticks); in ble_phy_rx_start_isr() [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/drivers/nrf52/ |
H A D | syscfg.yml | 29 controllers that exceed proper T_IFS (150 usecs) by more 30 than allowed 2 usecs.
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/include/nimble/ |
H A D | hci_common.h | 310 #define BLE_HCI_ADV_ITVL (625) /* usecs */ 324 #define BLE_HCI_SCAN_ITVL (625) /* usecs */ 361 #define BLE_HCI_CONN_ITVL (1250) /* usecs */
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/controller/ |
H A D | syscfg.yml | 172 The number of usecs per period.
|