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

nRF52840 Low Frequency Noise Sources

Hi,

I am using an Adafruit nRF52840 Express with a sensor board attached to it.  I'm noticing that my sensor IC is reading about 3-6dB higher noise in the 10-50Hz range (and likely higher) when the Bluefruit BLE stack is running from Adafruit which is based on the s140 6.1.1 softdevice.  I have been unable to dig into the BLE subsystem so far and find the possible noise source.

Would you have a suggestion as to where in the softdevice I should focus on to review possible noise sources?

Best,
Matt

Parents
  • I think I have found a possible issue.  If I switch from the LFXO to the LFRC clock I see a large improvement in my noise FFT.  I'm now trying to optimize the calibration values:

      nrf_clock_lf_cfg_t clock_cfg = 
      {
          // LXRC
          .source        = NRF_CLOCK_LF_SRC_RC,
          .rc_ctiv       = 16,
          .rc_temp_ctiv  = 2,
          .accuracy      = NRF_CLOCK_LF_ACCURACY_250_PPM
      };

    If I'm trying to avoid 4Hz noise and its harmonics, what suggested rc_ctiv and rc_temp_ctiv values should I use?

  • One additional piece of information, I found that if I also enable the LFRC device in the Adafruit wiring.c file here (disabling the LFXO portion):

    #if defined( USE_LFXO )
      // 32Khz XTAL
      NRF_CLOCK->LFCLKSRC = (uint32_t)((CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos) & CLOCK_LFCLKSRC_SRC_Msk);
    #elif defined(USE_LFRC)
      // Internal OSC
      NRF_CLOCK->LFCLKSRC = (uint32_t)((CLOCK_LFCLKSRC_SRC_RC << CLOCK_LFCLKSRC_SRC_Pos) & CLOCK_LFCLKSRC_SRC_Msk);
    #else
      #error Clock Source is not configured, define USE_LFXO or USE_LFRC according to your board
    #endif
    

    And I set LFRC in bluefruit.cpp in the previous post for the softdevice then the high noise levels return.  So it would seem if I run the Nordic device with the LFXO and the softdevice with the LFRC, I get better results?  Is that a valid mode to run the device?

  • Hello!

    Apologies for a somewhat late answer. We're currently understaffed due to the holidays.

    It seems like the external crystal on the Feather is causing some issues here. I ask a bit around, but I suggest that you reach out to Adafruit support as well. When it comes to your current configuration I believe it should be okay, but I'll check with the developers. 

    Could you please share some information on what you are measuring and how? Wiring, sensor and so on.

    Best regards,
    Carl Richard

Reply
  • Hello!

    Apologies for a somewhat late answer. We're currently understaffed due to the holidays.

    It seems like the external crystal on the Feather is causing some issues here. I ask a bit around, but I suggest that you reach out to Adafruit support as well. When it comes to your current configuration I believe it should be okay, but I'll check with the developers. 

    Could you please share some information on what you are measuring and how? Wiring, sensor and so on.

    Best regards,
    Carl Richard

Children
  • Hey Carl,

    No problem!  I did reach out to Adafruit too; I just responded to their comment: https://forums.adafruit.com/viewtopic.php?f=57&t=181212&p=881913#p881913

    Let me know what your developers find.  We are using a custom PCBA shield that attaches to the Adafruit Feather.  It is then wired with a cable to several sensors, but for now we are focused on primarily the MAX30101, a PPG sensor.  Hope this helps.

    Best,

    Matt

  • Hello again!

    I got back from the developers that it shouldn't be possible to use two different clocks sources. But the LFCLK is configured twice by Adafruit, so it may be that you end up using LFRC for the whole device. We suspect that it may be something HW related that causes this. Have you tested the other sensors/connecting the sensor directly to see if the noise is present/different then? Hopefully the people at Adafruit will give some more insight too.

    Your clock_cfg should be adequate.

    PS: suggested your previous post as an answer. Did not mean to do this, so it can be ignored!

    Best regards,
    Carl Richard

  • Hi Carl!

    Thanks for your input, that does make a lot more sense that the clock configruation is getting programmed twice.  We have gone through each sensor and tuned the HW as best we can for the issue.  I think we've gotten it as clean as it's going to get given we're using a module + shield, so I think we're all set.  I went ahead and marked your answer as the clock configuration was my main question.  If Adafruit comes up with more input, I'll post again.

    Cheers,

    Matt

Related