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

Custom board not advertising ble

Is there an issue with my clock that's causing the BLE not to advertise?
The debugger seems to an error on the gatt_params_init() function, which should
mean its a RAM address problem. However, nothing gets printed to the debugging terminal
providing the adjusted RAM start address. Does anyone have an idea of what's going on?

Link to SMD crystal used: ASEK2-32.768KHz-LRT

Parents
  • The ATMEGA328P appears to have VCC at +5V on this board, which is too high when connecting I/O pins directly between the ATMEGA and the nRF52. Reduce the +5V to +3.3V as used on the nRF52 on a new board and see if that works. The absolute maximum on the nRF52 input pins should be below 3.6V, and the ATMEGA drives I/O pins at the ATMEGA VCC level (5V).

    If the ATMEGA has to use +5V for some reason, then the connected I/O pins will require level translators. Since there is only 1 pin driving into the nRF52, you could try a series resistor on the pin driven to the nRF52 as a kludge, or even a resistor divider or a blocking schottky diode and rely on the nRF52 internal pull-up for the high level.

  • Hello, 

    Sorry for the unclarity but my board has a 3.3 voltage regulator that powers the nRF. I didn’t include the entire schematic. Since it has quite a few components and I thought it’d be an eye sore. However, I was able to write and flash a program that blinks the status LED I have connected to the nRF and it works but my issue is the BLE not wanting to advertise. 

    Thanks, 

    Akil

  • Here is an image of my full schematic:

    Since the MEGA I am using has a wide operating voltage range from 2.7V - 5.5.

    Could nRF at 3.3V and MEGA at 3.3V == working nRF?

  • That is the correct solution. Hopefully you can discard the 5 volt regulator altogether :-)

    Hard to read the schematic power pins, but if any other component uses 5V and drives the MEGA issues can also arise there unless the MEGA I/O is 5 volt tolerant when run from 3.3 volts

  • After reviewing your suggestions, I was able to remove the 5V regulator from my board and replace it with another 3.3V regulator. After flashing the example Binky example, my nRF is still not advertising. And in the debugger, the code halts at the ble_stack_init() function. It can't be the voltage since, as I stated above, the entire board is now running 3.3V. Any ideas on what could be going on?

  • Try another board, if you have one, or replace the Nordic module. Driving 5 volts onto the Nordic module in the original scenario is usually fatal.

    Or try not using the 32kHz crystal, which will cause the issue you see if it is not working. See a post on using the 32kHz RC instead. eg nrf_sdh_enable_request-doesn-t-return

    Also the module may have been supplied with nasty boot code; did you try a full flash erase followed by loading softdevice and blinky?

  • Thank you, hmolesworth and Jared for your help it's much appreciated. I was able to get the device advertising by removing the 32KHz crystal. Inside the sdk_config.h these are the changes I made:

    #define CLOCK_CONFIG_LF_SRC               0 
    #define NRFX_CLOCK_CONFIG_LF_SRC          0
    #define NRF_SDH_CLOCK_LF_SRC              0
    #define NRF_SDH_CLOCK_LF_RC_CTIV         16
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV     2

    I'll have to do more research on what's causing my 32KHz crystal to not allow the device to advertise.

    Thanks,

    Akil

Reply
  • Thank you, hmolesworth and Jared for your help it's much appreciated. I was able to get the device advertising by removing the 32KHz crystal. Inside the sdk_config.h these are the changes I made:

    #define CLOCK_CONFIG_LF_SRC               0 
    #define NRFX_CLOCK_CONFIG_LF_SRC          0
    #define NRF_SDH_CLOCK_LF_SRC              0
    #define NRF_SDH_CLOCK_LF_RC_CTIV         16
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV     2

    I'll have to do more research on what's causing my 32KHz crystal to not allow the device to advertise.

    Thanks,

    Akil

Children
Related