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

Setting XL1 & XL2 as GPIO does not work.

Hi there,

We are not using external Crystal for this design and thinking of reusing XL1 & XL2 (Pin 0 and Pin 1) for SPI (MISO & MOSI).  But I found that I can't set properly set these pins as GPIO output.

Something as simple as:

nrf_gpio_cfg_output(0);
nrf_gpio_pin_set(0);

will not bring the line up (I checked with a scope).  Are there additional steps needed to make these pins GPIO? Or, it's not possible to use them as regular GPIO?


Thanks,
Cecylia

Parents Reply
  • I'm using custom HW.  I did not explicitly set the source ---or so I thought--- but the sdk_config.h that I copied over apparently set it to XTAL.  So when I called 'nrf_drv_clock_init()' then it sets it to XTAL instead of RC.


    When I change this CLOCK_CONFIG_LF_SRC  to 0 then I can use XL0 and XL1.  Yay!  Thanks!

    // <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

Children
No Data
Related