Hi Andrzej,
Thank you for your answer. That's what I did first but it did not work.
I have an app that runs as expected using the default LF CLOCK, the
XTAL_32768 used.
When I switch the LF CLOCK to XTAL_32768_SYNTH, the app advertises
correctly. When I try to connect, the app disconnects after a few
seconds of trying.
I have appended below a typical log.
I am using the nordic nrf52840 preview kit in preparation of testing a
board that does not have an LF crystal. Right now I would like to
evaluate quickly
both the LF RC based CLK and the synthesized CLK. In one of my use
cases, power is not important and the device is always ON. My instincts
tells me that the
synthesized clock is a better choice (as stable as the HF clk) and
should have worked out of the box. Any thoughts on what I could be
doing wrong?
Playing around with BLE_LL_OUR_SCA, BLE_LL_MASTER_SCA and
BLE_XTAL_SETTLE_TIME did not help. On the phone side I am using the
nordic app (nRF Connect on android)
Best regards
Abderrezak
LOG AT START OF THE MYNEWT APP:
00 [ts=0ssb, mod=64 level=1] BLE_PHY_MAX_PWR_DBM = 10
01 [ts=7812ssb, mod=64 level=1] tx_pwr_lvl =8
02 [ts=15624ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x03
ocf=0x0003 len=0
04 [ts=31248ssb, mod=4 level=0] 0x03 0x0c 0x00
06 [ts=46872ssb, mod=4 level=0] Command complete: cmd_pkts=1 ogf=0x3
ocf=0x3 status=0
08 [ts=62496ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x03
ocf=0x0001 len=8
10 [ts=78120ssb, mod=4 level=0] 0x01 0x0c 0x08 0x90 0x80 0x00 0x02
0x00 0x00 0x00 0x20
12 [ts=93744ssb, mod=4 level=0] Command complete: cmd_pkts=1 ogf=0x3
ocf=0x1 status=0
15 [ts=117180ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x03
ocf=0x0063 len=8
17 [ts=132804ssb, mod=4 level=0] 0x63 0x0c 0x08 0x00 0x00 0x80 0x00
0x00 0x00 0x00 0x00
19 [ts=148428ssb, mod=4 level=0] Command complete: cmd_pkts=1
ogf=0x3 ocf=0x63 status=0
21 [ts=164052ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08
ocf=0x0001 len=8
23 [ts=179676ssb, mod=4 level=0] 0x01 0x20 0x08 0x7f 0x1a 0x0f 0x00
0x00 0x00 0x00 0x00
26 [ts=203112ssb, mod=4 level=0] Command complete: cmd_pkts=1
ogf=0x8 ocf=0x1 status=0
28 [ts=218736ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08
ocf=0x0002 len=0
30 [ts=234360ssb, mod=4 level=0] 0x02 0x20 0x00
32 [ts=249984ssb, mod=4 level=0] Command complete: cmd_pkts=1
ogf=0x8 ocf=0x2 status=0
34 [ts=265608ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08
ocf=0x0003 len=0
36 [ts=281232ssb, mod=4 level=0] 0x03 0x20 0x00
38 [ts=296856ssb, mod=4 level=0] Command complete: cmd_pkts=1
ogf=0x8 ocf=0x3 status=0
40 [ts=312480ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x04
ocf=0x0009 len=0
42 [ts=328104ssb, mod=4 level=0] 0x09 0x10 0x00
44 [ts=343728ssb, mod=4 level=0] Command complete: cmd_pkts=1
ogf=0x4 ocf=0x9 status=0 bd_addr=ff:22:33:aa:bb:ff
46 [ts=359352ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08
ocf=0x002d len=1
49 [ts=382788ssb, mod=4 level=0] 0x2d 0x20 0x01 0x00
50 [ts=390600ssb, mod=4 level=0] Command complete: cmd_pkts=1
ogf=0x8 ocf=0x2d status=0
52 [ts=406224ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08
ocf=0x0029 len=0
55 [ts=429660ssb, mod=4 level=0] 0x29 0x20 0x00
56 [ts=437472ssb, mod=4 level=0] Command complete: cmd_pkts=1
ogf=0x8 ocf=0x29 status=0
58 [ts=453096ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08
ocf=0x002d len=1
61 [ts=476532ssb, mod=4 level=0] 0x2d 0x20 0x01 0x01
62 [ts=484344ssb, mod=4 level=0] Command complete: cmd_pkts=1
ogf=0x8 ocf=0x2d status=0
65 [ts=507780ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08
ocf=0x0027 len=39
67 [ts=523404ssb, mod=4 level=0] 0x27 0x20 0x27 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0xef 0x8d 0xe2 0x16 0x4f 0xec 0x43 0x0d 0xbf 0x5b 0xdd
0x34 0xc0 0x53 0x1e 0xb8 0xef 0x8d 0xe2 0x16 0x4f 0xec 0x43 0x0d 0xbf
0x5b 0xdd 0x34 0xc0 0x53 0x1e 0xb8
73 [ts=570276ssb, mod=4 level=0] Command complete: cmd_pkts=1
ogf=0x8 ocf=0x27 status=0
75 [ts=585900ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08
ocf=0x004e len=8
78 [ts=609336ssb, mod=4 level=0] 0x4e 0x20 0x08 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x01
80 [ts=624960ssb, mod=4 level=0] Command complete: cmd_pkts=1
ogf=0x8 ocf=0x4e status=0
82 [ts=640584ssb, mod=4 level=0] looking up peer sec;
84 [ts=656208ssb, mod=64 level=1] BLE_PHY_MAX_PWR_DBM =10
86 [ts=671832ssb, mod=64 level=1] tx_pwr_lvl =8
87 [ts=679644ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08
ocf=0x0008 len=32
89 [ts=695268ssb, mod=4 level=0] 0x08 0x20 0x20 0x19 0x02 0x01 0x06
0x07 0x03 0x1a 0x18 0x0a 0x18 0x0f 0x18 0x06 0x09 0x43 0x4c 0x56 0x52
0x54 0x02 0x0a 0x08 0x03 0x19 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
94 [ts=734328ssb, mod=4 level=0] Command complete: cmd_pkts=1
ogf=0x8 ocf=0x8 status=0
97