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.

How to change OPT8241 Modulation Frequency?

Other Parts Discussed in Thread: OPT9221

Hi Ti

Now I want to change Modulation Frequency,I saw the chapter 7.3.5 of <<opt9221.pdf>>,My set steps as following:

1.enable TG_DIS

2.Set MOD_M1=24,MOD_N1=2,MOD_PS1=5,MOD_M_FRAC1=0;

3.Set QUAD_CNT_MAX=4

4,Set MOD_PLL_UPDATE to 1,and delay 200 ms ,then back to 0

5.Disable TG_DIS,

6.Enable PHY_TEST,enable TG_DIS

If I do step 1~6, the ILLUM_P/N is changed to 24MHZ(SYSCLK=48MHZ), but no data output, if I omit step 4, I can get test data(0~255) from OPT9221.I don't know why and want to know the step of change Modulation frequency?

  • Hi,

    This does not seem familiar. We will try to reproduce the issue locally. Also, in step 6, if you enable TG_DIS, you are not expected to get any valid data. It is not necessary to toggle TG_DIS for setting modulation frequency. Just steps 2 to 4 should be enough in the above description. Can you try the same and let us know what you see?

    Regards
    Bharath
  • Dear Bharath:

    Thanks for your reply, I find that if I don't enable TG_DIS, I cann't change the Modulation frequency, so before I change Modulation frequency I enable TG_DIS first.

    Now I do step 1~4, it still have no valid data output. I find that once I opterated TG register 0x02(bit2,MOD_PLL_UPDATE) ,there will be no data out. But if I don't update this bit ,the modulation frequency will be not changed.So I want to know how to change modulation frequency dynamically,is there any other registers should be set and can you give me an example to change modulation frequency? 

    Best Regards

    Yan

  • Dear Yan,

        Are you trying this on Tintin CDK or equivalent? We are unable to reproduce the issue. We can change modulation frequency without disabling the TG. Also, what is your initialization sequence for the camera? Are you writing into any other registers?

    Regards

  • Dear  Bharath Patil

    The board is designed by ourself , we refer to the TI CDK. After TFC OPT9221 init done, I just reset opt9221, and then call the change modulation frequency funciton set_mod_freq, then start_sample();

    In this function,

    set_mod_freq(xxx,freq){

    1.//check TG_DIS enable or not , if not enable, enable it,record TG_DIS state;

    2.//then set .Set MOD_M1=24,MOD_N1=2,MOD_PS1=5,MOD_M_FRAC1=0;

            3.//Set QUAD_CNT_MAX=4

             4.//Set MOD_PLL_UPDATE to 1,and delay 200 ms ,then back to 0

            5.//restore TG_DIS state

    }

    The reason why I enable TG_DIS first, because I find if I don't enable TG_DIS, the modulation frequency cann't be channged. This function can be used to change modulation frequency.

    Then I want to get PHY_TEST data, I call start_sample() function,

    start_sample()

    {

    1.//enable PHY_TEST

    2.//enable TG_DIS

    }

    I find if I changed modulation frequency by set_mod_freq ,then I start smaple , I cann't get test data. However, if I don't change modulation frequency ,using default set, when start_sample, I can get vaild data out. So I want to change my modulation frequency ,mean while I want to get valid data, what should I do?

    Best Regards

     Yan

  • Dear Yan,

    Thanks for your detailed description of the problem. We have still not been able to reproduce the problem. Please give us some more time.

    Regards
  • Yan,

    I want to check if this issue is closed or remain open?

    -Larry
  • Already resolved