Writing a BLE, FreeRTOS program for nRF52833, getting unexplained BLE_HCI_CONNECTION_TIMEOUT

Hello everyone

I hope you all had a good start to the week.

I am stuck with an issue I don't quite get. 

I wrote code with BLE, FreeRTOS, and GPIOTE as a "proof of concept" for more complex code. 

It's a simple idea: a press on the button triggers a notification. I use nRFConnect, the Bluetooth Low Energy app.

- I ran it on the nRF52840-DK / S140 and it works

- I ran it on the EV-BM833 (Fanstel) which uses a nRF52833, and I lose connection with BLE_HCI_CONNECTION_TIMEOUT

(I changed RAM settings, mostly inspired by the example "ble_app_hrs_nfc_pairing_pca10100_s140", and it compiles and runs.)

I've faced similar issues (BLE_HCI_CONNECTION_TIMEOUT) when testing other code with the nRF52833, in general.

Looking at the following link, I'm wondering whether it's a matter of clock. Any other idea?

https://devzone.nordicsemi.com/f/nordic-q-a/29786/ble_hci_connection_timeout-and-nrf_clock_lf_xtal_accuracy_xx_ppm

Thank you in advance!

Parents Reply Children
  • Hi run_ar

    Thank you, that was helpful.

    Setting the LF clock to RC solves the problem. That, per se, is enough seen as we're at the prototype stage. I'm assume this also discard the preprocessor idea as well as that of the Flash/RAM.

    I'm testing with 500ppm and it seems better but I've already seen a connection timeout on each of the custom chip (Fanstel BM833) and the Fanstel DK (EV-BM833).
    I did update the preprocessor and double-checked.

    Any further idea, for when we'll look at power optimization?
    I specifically chose the same crystal for our custom board as the one Fanstel chose for their DK. The datasheet is attached.
    ABS06W.pdf
    As always, thank you for your help

    Cheers

    Jerome


  • Did you mean that when using the RC it works on both DK and Fanstel modules? or is it still failing with the module? Please check, what is the size of the load capacitors connected to XL1 and XL2 on the custom design? Please check they are the correct size, ref: 32.768 kHz crystal oscillator (LFXO)

    Did you check to see if the signal strength is similar on the DK and the fanstel module? i.e, you could try to measure rssi as going out of range will also cause a connection timeout.

  • Hi run_ar

    Thank you for helping out.

    Using the RC, it worked on the module's evalboard (EV-BM833) and our custom chip.

    What do you mean by size? They are 0402, if it's the dimensions of the capacitors you're asking about.
    I attached the schematics (1) of our chip / (2) of the EV-BM833. They're the same, and I'm observing the same "pathology" with our chip and the EV-BM833.

    I will check the signal strength but currently, I'm not moving the chips when I am testing and they are right next to the nRF52840 Dongle.


    Thank you again!

    Jerome

  • Hi,

    Is this the load capacitors used by the module manufacturer? If my calculations are correct this will give a 8 pf load, while the specification for the crystal oscillator says you need a 3 pf load...

    Cpin

    Input capacitance on XL1 and XL2 pads

    4 pF

    Using the formula from above and adding Cpin to the capacitance (ignoring C_pcb) you will get (16*16)/(16+16)=8pF load.

    To get closer to 3 pf load you should use 2 or 3 pf load capacitors.i.e. using a 2 pf capacitor and adding the 4 pf pin capacitance gives (6*6)/(6+6)=3pF.

    Reference the crystal oscillator specification below to see the required load.

  • Good morning run_ar


    Thank you for your time and reply.


    I checked with Fanstel, they seem to "dispute the claim". I'll let the first prototype run with 500ppm but that's not too satisfying, in my opinion...


Related