This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE not working: I see signal on spectrum analyzer but can t see the device advertising

Hello, i am new to the whole NRF programming. I created my custom board with a NRF52811 SoC, without external LF crystal. I have been trying to get the device to advertise the BLE with blinky example, but i can t see it advertising with any device. I used RC for LF clock and i did flash softdevice 112 version 7.0.1. When i look for signal on spectrum analyzer i see the advertising channels where they should be and are quite strong.

Other than that my SoC works fine, i was able to program PDM microphone data sampling and writing it on the microSD card, led blinking works, just not BLE.

Does anyone have any idea what could be wrong? I put my code into the zip file.

ble_app_blinky.zip

Parents
  • Little update, i did over the weekend: I was trying the beacon example, with the same configuration as blinky, and i was running BLE scanner for 20 or so minutes and somewhere in between that interval it picked up the my board. After that i reset the device and i could not see it anymore. I have a feeling something is wrong with internal clock. I have 3 boards and it s the same with all of them.

  • Do you have a debugger on your board or the debugger interface? I would recommend you to start your application in debugger to see if there are any softresets happening on your device.
    Seeing the signal in spectrum analyzer and not able to pick up advertising seems strange.

    The device is either advertising or not,I do not think that it would transmit corrupt packets due to misconfigured clock settings.

Reply
  • Do you have a debugger on your board or the debugger interface? I would recommend you to start your application in debugger to see if there are any softresets happening on your device.
    Seeing the signal in spectrum analyzer and not able to pick up advertising seems strange.

    The device is either advertising or not,I do not think that it would transmit corrupt packets due to misconfigured clock settings.

Children
  • I did debug it with J-link and the code runs without any errors, that s why i posted a question. Can the 32MHz crystal affect the internal LF RC?

  • if you use 

    #define NRFX_CLOCK_CONFIG_LF_SRC 2 in the sdk_config.h file, then the LFCLK is deduced from the external HFCLK. Then there will be direction correlation between the two.
  • After much more debuging, also pcb design testing, antenna testing so i can eliminate hardware issues, what i discoverd is this: RC clock doesn t work for BLE on this chip, but i do get advertising signal using syntheised clock. What happens after that is that latency in advertisment keeps increasing with time, something that doesn t happen on DK emulating nrf52811. For a first few seconds of advertisment everything works fine, then the latency increases first by about 500ms, after that more than 1000ms, and it get s to around 1500ms... I belive something is wrong with the chip. I will try putting external 32khz crystal to the pins and see if that helps, but i can t shake the feeling that example code wasn t really tested on the actual nrf52811 chip.

  • nekize said:
    I belive something is wrong with the chip. I will try putting external 32khz crystal to the pins and see if that helps, but i can t shake the feeling that example code wasn t really tested on the actual nrf52811 chip.

     That does not sound correct, yes it sounds possible that the chip is behaving wrong with internal RC. I do not think that the SDK is being actually tested on nRF52811. The release notes say the SDK supports developing nRf52811 on a nRF52840 DK and that is how it must have been tested.

    So we need to keep that option open that using internal RC with this example might not be working on the actual chip. Please continue your tests with XTAL and do care to update me after you have some results.

  • So RC doesn t work. I tried now also with a 32khz XTAL crystal and i have the same symptom, that BLE starts well for the first few seconds then the latency becomes bigger and bigger.

    Right now i am using a MIFA antenna design, although antenna measurements show that it should work fine for BLE frequencies. Still i will try remaking my board with different antenna design and see if that can solve my problem.

    Is there a tutorial how to write a BLE advertisment app from scratch, if the SDK example doesn t work well, so i can test if there is something in the code that could be causing problems on this chip?

Related