This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

BLE example for custom board with NRF52820 and no 32Khz xtal

Hello all,

This is my first project using Nordic chips and my first project using BT. A lot of firsts :)


I have made a custom board using nRF52820 chip. The board is 4 layer 0.8mm thick board 80mm x 50mm. I have used the PCB manufacturer's calculator to set the trace with for the 50 ohm impedance. The antenna I am using is Johanson Technology 2450AT43A100E. I do not have low frequency xtal on the board. You can see may schematics and the layout I have used for this board bellow.

Layout

Schematic

I am programming the board using nRF52833-DK. So far I got SPI, TWI and USB to work on the board, but I am struggling with the RF part. 

For my base project I am using the "usbd_ble_uart". I can successfully connect and RX/TX data using my phone and the DK. I have looked at questions already posted on the forum and I figured out that I need to change the LF clock source to the internal RC oscillator. The changes I have made to the "sdk_config.h" files are the following. SoftDevice version is s140 and the SDK is v17

#ifndef NRFX_CLOCK_CONFIG_LF_SRC
#define NRFX_CLOCK_CONFIG_LF_SRC 0
#endif

#ifndef CLOCK_CONFIG_LF_SRC
#define CLOCK_CONFIG_LF_SRC 0
#endif

// <o> NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
 
// <0=> NRF_CLOCK_LF_SRC_RC 
// <1=> NRF_CLOCK_LF_SRC_XTAL 
// <2=> NRF_CLOCK_LF_SRC_SYNTH 

#ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0
#endif

// <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
#ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 16
#endif

// <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
// <i> How often (in number of calibration intervals) the RC oscillator shall be calibrated
// <i>  if the temperature has not changed.

#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
#endif

// <o> NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
 
// <0=> NRF_CLOCK_LF_ACCURACY_250_PPM 
// <1=> NRF_CLOCK_LF_ACCURACY_500_PPM 
// <2=> NRF_CLOCK_LF_ACCURACY_150_PPM 
// <3=> NRF_CLOCK_LF_ACCURACY_100_PPM 
// <4=> NRF_CLOCK_LF_ACCURACY_75_PPM 
// <5=> NRF_CLOCK_LF_ACCURACY_50_PPM 
// <6=> NRF_CLOCK_LF_ACCURACY_30_PPM 
// <7=> NRF_CLOCK_LF_ACCURACY_20_PPM 
// <8=> NRF_CLOCK_LF_ACCURACY_10_PPM 
// <9=> NRF_CLOCK_LF_ACCURACY_5_PPM 
// <10=> NRF_CLOCK_LF_ACCURACY_2_PPM 
// <11=> NRF_CLOCK_LF_ACCURACY_1_PPM 

#ifndef NRF_SDH_CLOCK_LF_ACCURACY
#define NRF_SDH_CLOCK_LF_ACCURACY 1
#endif


But still I cannot connect with phone to the custom board. I cannot see it listed in the BT devices at all. 

How can I determine if it is a software or a hardware issue? Is there something else I need to change to the config? I have read the post for migrating code to the nRF52820 and yes the preprocessor directives are set correct and the memory sizes are adjusted.  

There are a lot of logging options set up in the examples, is any of it going to be useful?

As tools go I have a scope but unfortunately I do not have a spectrum analyzer at my disposal.  

If there is example specially made for the nRF52820 would be great! This way I could see if it is my design to blame or just some tricky config.

All the best,
Mitko

Related