The 5340 takes a long time from power-on to code running

Hi,

  I recently found that the 5340 has a slow startup time on my custom nRF5340 based hardware, it takes about 3 seconds from power-on to the Main code running.

  I did the following experiment:

   1、on the DK development board  :    the same code took about 1 second from power-on to  the Main code running ;

   2、on my custom nRF5340 based hardware:     When a low level reset pin is set while the code is running, the code can run again within 1S;

This is our schematic:

   1、3V3_EN & nRF5340_RST is Controlled by another MCU(#2).  When power on,  the  #2MCU will set 3V3_EN enable and nRF5340_RST high impedance state & waiting for 5340 to start and receive the handshake message initiated by 5340 through the serial port

  • Hi

    Since the application has a pretty normal startup time on a DK, my guess is that the crystal oscillator(s) in your design are not loaded optimally and thus takes a while to stabilize for the application to use. Do you have the datasheets of the external crystals you're using and I can take a look to see what they should optimally be loaded with?

    We generally use the following formula to find the best capacitor values (Ccap) using the load capacitance (CL) in the crystal datasheet.

    Ccap = CL * 2 - 4

    Best regards,

    Simon

  • Hi

       In my custom nRF5340 based hardware: Ccap = 20pf   CL=12.5

    I did the following test:

    Case1:  CONFIG_SOC_ENABLE_LFXO=y、 CONFIG_SOC_LFXO_CAP_INT_6PF=y  、Ccap=15pf   :  startup time≈ 1.2Sec
    Case2: CONFIG_SOC_ENABLE_LFXO=y、 CONFIG_SOC_LFXO_CAP_INT_6PF=y  、Ccap=20pf   :  startup time≈ 2.5Sec
    Case3: CONFIG_SOC_ENABLE_LFXO=y、CONFIG_SOC_LFXO_CAP_EXTERNAL=y  、Ccap=20pf   :  startup time≈ 2.5Sec
    Case4: CONFIG_SOC_ENABLE_LFXO=y、CONFIG_SOC_LFXO_CAP_INT_7PF=y  、Ccap  Null   :  startup time≈ 1.2Sec
    If I continue to use Ccap=20pf, how should I set it to ensure that the boot time is no higher than 1.2 seconds?
    By the way, we have produced a large number of machines with a 20pf configuration,It is not feasible to rework and replace 20pf.
  • Hi

    Do you have the datasheet of the crystals you're using so I could take a look? Based on your tests it seems like the 20pF Ccap isn't optimal, so it might be recommended to change this. Alternatively you can try different internal capacitor values to see if you're able to tune it somehow, but that's not promising based on the results you have provided here. It also seems strange that Ccap to 15pF and INT caps to 6pF is so different between CAP_EXTERNAL and Ccap to 20pF. You can alternatively try switching to the internal RC oscillator instead of the LFXO with the CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC.

    Best regards,

    Simon

  • Hi

    I've been in touch with someone from Honestar representing you, and have already confirmed that the LF crystal looks good. Do you also have the datasheet for the HF crystal you're using? As the startup on a DK seems to be much shorter or samples not running BLE starts sooner.

    Best regards,

    Simon

Related