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

BLE App Uart nRF52810

I'm trying to get the ble_app_uart example working on a nRF52810. I'm using SDK 15.2.0 together with Softdevice S112.

The infocenter says the Example needs Softdevice S132 or S140 http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Findex.html. But that's not available for nRF52810. So what's the solution to run the ble_app_uart demo on the nRF52810?

If I try to use the ble_app_uart on the nRF52810 with the pca10040e then it doesn't work. I don't get UART output and also don't see any UART device with the nRF Connect App.

Parents
  • Hi,

    The pca10040e configuration requires softdevice s112 (\components\softdevice\s112\hex) which will be uploaded automatically if you use Segger Embedded studio. Does you board include a 32kHz crystal? If not, make sure to change the clock source to use the internal RC in sdk_config.h.

    //==========================================================
    
    // <h> Clock - SoftDevice clock configuration
    
    //==========================================================
    // <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
    

  • Hi,

    Thanks for the fast answer. I already did that but it still doesn't work. I'm using arm gcc under Linux. I have also removed the emulation flags in the Makefile.

  • Hi,

    How are you connecting the UART interface to your PC, do you have a USB<->UART bridge? I've tested the example (GCC - make flash_softdevice && make flash) with 52DK where the 52832 has been replaced with a nRF52810 and it worked. 

    You can compile the the example with -DDEBUG then view the debug log with RTTviewer to see if there are any runtime errors.  

  • Hi,

    I have Pin6 connected to a USB - UART converter. I'm using a BL651 from Laird with a Breakout Board. I have tried to compile the Example with DDEBUG but don't see anything in RTTviewer. Any more ideas? For me it looks like it doesn't do anything at all.

  • Hi,

    I would suggest that you debug the code, see if the program reaches main() for instance. You may use Segger embedded studio for debugging if you don't have a different debug setup. Also, since you have a custom board, note that the code enables pinreset on P0.21 by default (is active low).

  • Hi,

    Thanks! The Reset Pin was the issue, it's now working! What I don't understand is, if I understand correctly the -DCONFIG_GPIO_AS_PINRESET flag enables this feature. But that's also enabled on the ble_app_beacon example. But the beacon example is working without hooking up P0.21 to VCC.

  • hmm, it's a bit strange. I have disabled the -DCONFIG_GPIO_AS_PINRESET, erased the chip and reflashed everything. But the reset seems to be still active. My Hardware leaves P0.21 floating

    The PSELRESET register looks like that:

    nrfjprog -f NRF52 --memrd 0x10001200 --n 8          
    0x10001200: FFFFFFFF FFFFFFFF                     |........|

Reply
  • hmm, it's a bit strange. I have disabled the -DCONFIG_GPIO_AS_PINRESET, erased the chip and reflashed everything. But the reset seems to be still active. My Hardware leaves P0.21 floating

    The PSELRESET register looks like that:

    nrfjprog -f NRF52 --memrd 0x10001200 --n 8          
    0x10001200: FFFFFFFF FFFFFFFF                     |........|

Children
Related