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
  • Hi @hmolesworth, thanks for the answer.  I don't have any "(NRF_CLOCK->LFCLKSRC)" anywhere in my project.  Do you have specific example project in mind for me to search those?
    Specifically the comments "// 32kHz Osc pins can be used as GPIOs or 32kHz Oscillator, special case" that might give me clearer clues.

    From what you wrote, though, does it mean that if I set LFCLKSRC to 0 then the pins are free for GPIO?

Children
No Data
Related