728x90

 

 

Clock delta : 0x0c (12)

Time delta : 003750

Calc : 12  * 625 / 2

 

Clock 625/2 이유는 625μs 확인하기 위해서는 최소한 2배의 속도로 체크해야 하기 때문이다.

 

 

1.1 BLUETOOTH CLOCK
Every Bluetooth device shall have a native clock that shall be derived from a
free running reference clock. Offsets may be added to the reference clock to
synchronize the native clock with other non-Bluetooth systems. For
synchronization with other Bluetooth devices, offsets are used that, when
added to the native clock, provide temporary Bluetooth clocks that are mutually
synchronized. It should be noted that the Bluetooth clock has no relation to the
time of day; it may therefore be initialized to any value. The clock has a cycle of
about a day. If the clock is implemented with a counter, a 28-bit counter is
required that shall wrap around at 228-1. The least significant bit (LSB) shall
tick in units of 312.5 μs (i.e. half a time slot), giving a clock rate of 3.2 kHz.
The clock determines critical periods and triggers the events in the device.
Four periods are important in the Bluetooth system: 312.5 μs, 625 μs, 1.25 ms,
and 1.28 s; these periods correspond to the timer bits CLK0, CLK1, CLK2, and
CLK12, respectively, see Figure 1.4 on page 68.

 

Bluetooth Air에서 기본으로 사용하는 시간 단위는 625 μs.

 

 

2.2.5.1 Piconet physical channel timing
In the figures, only single-slot packets are shown as an example.
The master TX/RX timing is shown in Figure 2.3 on page 76. In Figure 2.3 and
Figure 2.4 the channel hopping frequencies are indicated by f(k) where k is the
time slot number. After transmission, a return packet is expected N × 625 μs
after the start of the TX packet where N is an odd, integer larger than 0. N
depends on the type of the transmitted packet.
To allow for some time slipping, an uncertainty window is defined around the
exact receive timing. During normal operation, the window length shall be 20
μs, which allows the RX packet to arrive up to 10 μs too early or 10 μs too late.

It is recommended that slaves implement variable sized windows or time
tracking to accommodate a master's absence of more than 250ms.
During the beginning of the RX cycle, the access correlator shall search for the
correct channel access code over the uncertainty window. If an event trigger
does not occur the receiver may go to sleep until the next RX event. If in the
course of the search, it becomes apparent that the correlation output will never
exceed the final threshold, the receiver may go to sleep earlier. If a trigger
event occurs, the receiver shall remain open to receive the rest of the packet
unless the packet is for another device, a non-recoverable header error is
detected, or a non-recoverable payload error is detected.

 

Bluetooth에서는 clock에 대한 시간 오차를 기준에서 앞/뒤 10μs 까지는 허용한다.

즉, 기준에서 10μs를 벗어나면 안 된다.

 

728x90
728x90

 

 

Baseband에 ACK와 NACK로 SEQN(Sequence Number)이 결정됨.

기본적으로 SEQN은 data packet에 대해서만 0,1로 변경 된다.

이 때, 동일한 LT_ADDR에 대해서 SEQN을 확인 한다.

위의 이미지에서 LMP의 LT_ADDR이 3이므로 동일한 3에 대해서 check함.

 

Receiver는 data packet에 대해 정상 수신하면 ARQN에 1을 주고 잘못된 data를 받으면 0을 준다.

Receiver는 data packet 또는 NULL/POLL에 ARQN을 줄 수 있다.

 

Sender는 ARQN으로 1을 받으면 다음 data packet에 자신의 SEQN을 변경한다.

만약 Receiver가 응답이 없거나 ARQN으로 0을 보내면 retransmit packet을 보낸다.

728x90

+ Recent posts