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

nrdf52840 missing NRF_LOG messages and SD not running on BT840

Hello.  I'm developing a project using nRF52840.  I've been working with the nRF52840Dev Board and I have a BLE project that runs there.  I'm developing in Segger IDE and using J-Link Terminal. Im developing a project based around PCA10056 board and s140.

I have 2 problems, both of which seem to have some feedback here on the Nordicsemi support site, but the instructions that I see haven't led to any success:

1) NRF_LOG messages. I can never find the messages from NRF_LOG (for example NRF_LOG_DEBUG("Notify observer 0x%08X => blocking", p_observer);  They simply don't appear in the RTT Viewer, even though all the settings are intended to direct them there.  To get around this, I have been using sprintf and SEGGER_RTT_WriteString.  However, I think that exposing these messages is important because of problem 2 is a deeper problem.


2) I've developed a custom board using a BT840 module.  I expected that the project that I've made would just run there (it uses SD, as a BLE peripheral).  The project is based on BLE SDK examples (however, the first piece of code to the SD (ble_stack_init() err_code = nrf_sdh_enable_request() hangs, which is different than the dev board.  

I'm now realizing that I need to master the bootloader/SD linkage/app linkage setup in the project download, and  


I've erased the the device (BT840) and loaded the bootloader per the manufacturers instructions, I'm realizing that there is probably more to do than this.  I see some references to options for external clocks and preprocessor directives that need to be set.  

Some direction on either of these 2 problems is helpful.

Parents
  • Hello.  update of some info for you.

    0) I still havent gotten my custom hardware to work (SD running)

    To make this debugging more simple, I've switched to the ble_app_blinky project.


    1) I've loaded the ble_app_blinky project on to my dev board, to prove that I have a working project.  I don't know how to interact with it, but clearly it is running as the Device "Nordic_Blinky" appears in Nordic Connect. I also see a "DfuTarg" device

    2) When I run this on my custom target, which by the way has a Fanstel BC840 module (that I previously called BT840 in error) I see a DfuTarg device but no "Nordic_Blinky"

    3) So I think that this shows that something in my specific device that doesn't let the Nordic_Blinky app run.  Now, on my board I have a 32.768Khz oscillator (and some oscilloscope tests prove to me that this running), and the module has a 32Mhz oscillator.  I'm realizing that uploading correct bootloader to these nrF52840 modules may be critical.

    4) I modified the LFXTAL instructions in the BLE_APP_BLINKY project and downloaded this to the custom hardware

    #define NRF_SDH_CLOCK_LF_SRC 0
    #define NRF_SDH_CLOCK_LF_RC_CTIV 16
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
    #define NRF_SDH_CLOCK_LF_ACCURACY 1

    Still no "Nordic_Blinky" running

    My question is: What bootloader should be running? I guess one updates the bootloader on the NRF52840 with NRF Command line utilities.    What debug steps would you follow on this?

  • Oh. If the device is advertising as DfuTarg, it means that it is a bootloader that doesn't accept your application. Did you flash the bootloader yourself, or did it come pre-programmed from the factory?

    If you don't have the keys to the bootloader, you can erase it. Use nRF Command Line Tools, with the command:

    nrfjprog --eraseall

    to erase the flash on the nRF. (you can add your own bootloader at a later point in time, if you like). 

     

    matthew antonelli said:
    Now, on my board I have a 32.768Khz oscillator (and some oscilloscope tests prove to me that this running)

     What does the layout around the LFXTAL look like? I still want you to test with the RC Oscillator until you get it up and running, but can you share the datasheet on the LFXTAL you are using, and specify what capacitors that are connected to it, and how they are connected?

    It should look something like the XTAL inside the rectangle saying "optional" here:
    https://infocenter.nordicsemi.com/topic/ps_nrf52840/ref_circuitry.html?cp=4_0_0_6_2_0#concept_hqh_j22_fq

Reply
  • Oh. If the device is advertising as DfuTarg, it means that it is a bootloader that doesn't accept your application. Did you flash the bootloader yourself, or did it come pre-programmed from the factory?

    If you don't have the keys to the bootloader, you can erase it. Use nRF Command Line Tools, with the command:

    nrfjprog --eraseall

    to erase the flash on the nRF. (you can add your own bootloader at a later point in time, if you like). 

     

    matthew antonelli said:
    Now, on my board I have a 32.768Khz oscillator (and some oscilloscope tests prove to me that this running)

     What does the layout around the LFXTAL look like? I still want you to test with the RC Oscillator until you get it up and running, but can you share the datasheet on the LFXTAL you are using, and specify what capacitors that are connected to it, and how they are connected?

    It should look something like the XTAL inside the rectangle saying "optional" here:
    https://infocenter.nordicsemi.com/topic/ps_nrf52840/ref_circuitry.html?cp=4_0_0_6_2_0#concept_hqh_j22_fq

Children
No Data
Related