This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OPT3101: Freq Calibration with External Clock Source

Part Number: OPT3101

Tool/software:

Hello!

I am intending to feed an external clock source to the GPIO2 pin on the OPT3101 used in my project.

I referred to the OPT3101 Distance Sensor System Calibration [SBAU310] document and it requires both GPIO2_IBUF_EN and GPIO2_OBUF_EN bits in register 78h to be set to 1 in order for the frequency calibration to function.

I also tried using the OPT3101-ConfiguratorTool GUI to generate a sample initialization C++ file and chose to use the freq correction with external ref clock.  The generated C++ file suggests not to set GPIO2_OBUF_EN bit.

Would someone please help clarify which is correct, the calibration document or the configurator GUI tool??

  • Hello Kenneth, 

    Thank you for the question and apologies for the confusion. I am looking into this to confirm the correct document and start the process of implementing changes in the doc found to be incorrect. I will update you tomorrow with my findings once confirmed. 

    Thank you, 

    Joseph Scherphorn

  • Hello Joseph,

    Thank you for your time looking into this.  It is much appreciated.

    Is there any update on this?

    BR,

    Kenneth

  • please set GPIO2_IBUF_EN 

    do not set GPIO2_OBUF_EN 

    GPIO2_OBUF_EN should be set when you want  digital signal DIG_GPO_0 or  digital signal DIG_GPO_1 to be brought out through GP2 as shown below.

    Please let me know if you have any further questions. 

    Thank you, 

    Joseph Scherphorn

  • Hello Joseph,

    Thank you for your response!

    Please take a look at the OPT3101 Distance Sensor System Calibration [Doc # SBAU310] under section 4.1.1 Dynamic Frequency Calibration using External Reference Clock.

    Here is what it says:

    Are you implying that this table is incorrect?

    Thank you,

    Kenneth

  • Hello Kenneth, 

    I have not had time to check both configurations yet. But my thought is that enabling the output buffer for GP2 is not necessary to take an external clock signal at that pin.   I will confirm when able but it likely works in both configurations as GPO2_OBUF_EN is likely superfluous for your purpose. 

    Thank you, 

    Joseph Scherphorn

  • Thank you, Joseph!

    Per the datasheet / system calibration document, the FREQ_COUNT_READ_REG would contain the result from the frequency calibration.

    My testing has shown the following results (note that GPO2_IBUF_EN always = 1):

    If GPO2_OBUF_EN = 0, I get inconsistent values in FREQ_COUNT_READ_REG (i.e. not the same number when I read this register)

    If GPO2_OBUF_EN = 1, I get perfectly consistent value (16384) when reading the FREQ_COUNT_READ_REG every time.

    Question: with continuous frequency calibration enabled, should I expect a consistent value (i.e. 16384) read from FREQ_COUNT_READ_REG?

    Flipping the GPO2_OBUF_EN bit seemed to have given different readout, so I really want to make sure I am setting up correctly.

    Please kindly advise.  For now, I will treat the OPT3101 Distance Sensor System Calibration [Doc # SBAU310] to be correct.

    Best Regards,

    Kenneth

  • Hello Kenneth, 

    Can you tell me approximately how much the  FREQ_COUNT_READ_REG value is varying when GPO2_OBUF_EN = 0?

    Thank you, 

    Joseph Scherphorn

  • Please see the screenshot.  I have two OPT3101's running at the same time and they are fed with same ext clk source (~98 kHz) from the MCU.

  • Hi Kenneth,

    Apologies for the delay. We are looking into this and will get back to you shortly.

    Thanks,
    Daniel