36 extern volatile uint8_t cc2420_sfd_counter;
37 extern volatile uint16_t cc2420_sfd_start_time;
38 extern volatile uint16_t cc2420_sfd_end_time;
42 #ifdef __IAR_SYSTEMS_ICC__
43 #pragma vector=TIMERB1_VECTOR
46 interrupt(TIMERB1_VECTOR)
48 cc24240_timerb1_interrupt(
void)
51 ENERGEST_ON(ENERGEST_TYPE_IRQ);
56 cc2420_sfd_start_time = TBCCR1;
58 cc2420_sfd_counter = 0;
59 cc2420_sfd_end_time = TBCCR1;
61 ENERGEST_OFF(ENERGEST_TYPE_IRQ);
65 cc2420_arch_sfd_init(
void)
68 P4SEL = BV(CC2420_SFD_PIN);
71 TBCTL = TBSSEL_1 | TBCLR;
74 TBCCTL1 = CM_3 | CAP | SCS;