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

Any special steps for first use - n52832

Is there anything special required to make a n52832 work the very first time the chip is programmed? Fuses to set, etc?

I'm new to nordic chips and I was handed a board with a working chip, I program it and it works fine. I was handed a new board, same design and same chip, and using the same code the chip programs fine but does not run, and draws no current. The low frequency clock crystal (32kHz) is not oscillating and since both pins of the crystal connect to the processor (XL1, XL2 pins) I'm trying to determine if it's due to a hardware problem, or a step that I missed programming the chip for its first use. I'm just flashing code to it using a Segger through uVision IDE.

  • No, if you verify that SWD programming with certain FW works on one board then it should work on another unless you change something in the HW design such as LF/HF clock source, LDO/DCDC components, some components on GPIOs which you use in booting sequence to intialize interfaces such as I2C/UART/SPI/I2S... (but in that case your FW would boot to main loop and it would be your custom assert which would cause it "failing"). If you have two boards with identical PCB schematics and components then they should work the same.

    If you really think that it's rather FW then HW issue then program it with some simple debugging FW which uses LED or GPIO/UART interfaces to signal that it boots to main loop at least.

  • What kind of software are you trying to program?

    If you are making a BLE application a common mistake is to forget to program the Softdevice before you program the application. If you forget this, your application won't run at all and you won't see any blinking LEDs or anything that would indicate that your device is somewhat working.

    A trick is to try e.g. the Blinky Example in our SDK. That example doesn't need a BLE stack and should work regardless of the state of your external clocks.

    Neither the LF nor the HF external crystal will start oscillating if you don't explicitly start them in software. There is an internal HF RC oscillator that will drive your CPU. The external HF crystal is generally only used when you are using the radio or require an accurate clock (because the external HF crystal draws more current than the internal RC oscillator).

    If none of this helps, I would suggest that you start looking for HW issues and maybe test a third device if you can.

  • Thank you very much for the reply. I do need the BLE soft device and I have not loaded it yet (didn't realize that was a manual step), I will look for how to do that now.

    In regards to the LF clock; I have the following in sdk_config.h, is this all that is required to enable the LF clock? We do have crystals for both the LF and HF clocks installed:

    // <e> CLOCK_ENABLED - nrf_drv_clock - CLOCK peripheral driver
    //==========================================================
    #ifndef CLOCK_ENABLED
    #define CLOCK_ENABLED 1
    #endif
    #if  CLOCK_ENABLED
    // <o> CLOCK_CONFIG_XTAL_FREQ  - HF XTAL Frequency
     
    // <0=> Default (64 MHz) 
    
    #ifndef CLOCK_CONFIG_XTAL_FREQ
    #define CLOCK_CONFIG_XTAL_FREQ 0
    #endif
    
    // <o> CLOCK_CONFIG_LF_SRC  - LF Clock Source
     
    // <0=> RC 
    // <1=> XTAL 
    // <2=> Synth 
    
    #ifndef CLOCK_CONFIG_LF_SRC
    #define CLOCK_CONFIG_LF_SRC 1
    #endif
    
  • Those defines define behaviour of your clock that you may or may not use in your code. Setting CLOCK_CONFIG_LF_SRC 1, for example, does not necessarily mean that XTAL will be started. It only tells your drivers and the Softdevice that you want to use the external crystal instead of the internal RC oscillator or a clock signal synthesized based on the HF clock.

  • OK thank you. I'm thinking that the BLE softdevice should start the LF clock, but I'm having trouble flashing the softdevice to the chip. I have the .hex file from the sdk, but I only have a JLlinkSettings.ini for a nRF51822_xxAA, and I'm using a nRF52832_xxAA, and I'm not sure how to make the correct .ini file. Can you please point me in the right direction?

Related