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

Is it possible to use P0.00 and P0.01 for I2C? I'm using RTC for LFCLK, so I thought these would be available as GPIO.

I've designed a custom board for the NRF52832. Current consumption is not a major concern, and the pin location was convenient, so I wanted to use P0.00 and P0.01 for I2C. I've set the LFCLK to the RTC, and so I thought it would be OK to use those pins. My application gets hung up though when trying to use them. Setting I2C to use different pins resolves that issue, but would require a board redesign. Can I use P0.00 and .01 for I2C? Is some other configuration necessary?

Parents Reply
  • Did you try the code I posted above? This is (typically) the default code, pins used for crystal not io; how are you setting LFCLK?

    // <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
    
    nrf_clock_lf_src_set((nrf_clock_lfclk_t)CLOCK_CONFIG_LF_SRC);
    

    The board .h default (for PCA10040 for example):

    // Low frequency clock source to be used by the SoftDevice
    #define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_XTAL,            \
                                     .rc_ctiv       = 0,                                \
                                     .rc_temp_ctiv  = 0,                                \
                                     .accuracy     = NRF_CLOCK_LF_ACCURACY_20_PPM}
    

Children
No Data
Related