How to configure and use internal RC with ncs bm v0.9.0 SDK for nRF54L15?

Hi experts, I'm using the example under nrf-bm/samples/bluetooth/ble nus, and I've configured prj.conf, but it's not working.  

CONFIG_NRFX_CLOCK_LFXO_TWO_STAGE_ENABLED=n
CONFIG_NRFX_CLOCK_LF_SRC_RC=y

I've been struggling with this for ages. Thank you so much for your help!

  • Hi,

    The clock source is provided to the SoftDevice when it is initialized by nrf_sdh_enable_request(). This is handled here. To use LFRC, add these lines to your prj.conf:

    CONFIG_NRF_SDH_CLOCK_LF_SRC=0
    CONFIG_NRF_SDH_CLOCK_LF_RC_CTIV=16
    CONFIG_NRF_SDH_CLOCK_LF_RC_TEMP_CTIV=2
    CONFIG_NRF_SDH_CLOCK_LF_ACCURACY=1

  • Hi,

    I added these configurations to prj.conf, but they didn't take effect. I'm debugging code using nRF54L15 DK. Could you please share your code for me to try?  Thank you very much!

    CONFIG_NRFX_CLOCK_LFXO_TWO_STAGE_ENABLED=n
    CONFIG_NRFX_CLOCK_LF_SRC_RC=y
    
    CONFIG_NRF_SDH_CLOCK_LF_SRC=0
    CONFIG_NRF_SDH_CLOCK_LF_RC_CTIV=16
    CONFIG_NRF_SDH_CLOCK_LF_RC_TEMP_CTIV=2
    CONFIG_NRF_SDH_CLOCK_LF_ACCURACY=1

    note: I'm using the nrf-bm/samples/bluetooth/ble_nus example. I only modified prj.conf - everything else is exactly the same as what the nRF Connect VS Code plugin generates

  • Hi,

    How do you see that LFRC is not used? I teted the ble_nus example from the bare metal SDK v0.9.0 on my end, with the only change being adding the 4 lines I listed (it also works with your additional 2 lines, though they are not needed). With these lines, let the applicaiton run a bit then stop and inspect with a debugger, and observe that the LFRC is used:

    Without these changes, the LFXO is used:

  • Hi,

    Awesome! LFRC actually works!

    Here’s how I figured it out: I pulled X1 off the nRF54L15 DK. If LFRC was working, it would start advertising; if not, it wouldn’t.I tested this by running the ble_nus example with nCS v3.1.0 just to rule out a broken DK.

    But now, when I try to debug with the bare metal SDK v0.9.0, it’s just not working.

    You're able to get LFRC working now, but I'm still stuck with it not functioning on my end. I'm a bit lost on how to troubleshoot this issue - any guidance would be appreciated!

  • I see. It is workign and advertising with LFRC on my DK using bare metal SDK v0.9.0 and only the changed I have described. Can you debug and check the CLOCK register the way I did in my previous post and verify if LFRC is configured when you say it is not working? Also, can you make sure you have nod made any other changes tot he project?

Related