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.

Compiler/OPT9221: Creation configuration file for OPT9221

Part Number: OPT9221

Tool/software: TI C/C++ Compiler

Hello TI!

We are created own-self ToF-bord based on your OPT8221 demo-board.

I try to create configuration file for example for 20, 30 MHz in dealiasing mode.

The parameters ma, mb, ka, kb, freq_ratio are evidence how to calculate.

But I do not understand how rightly chose mod_mx, mod_nx, mod_psx parameters.

Using datasheet, 7.3.5, formula (11) and (12) I can combine TG parameters:

0 <= mod_mx <= 63
0 <= mod_nx <= 3
0 <= mod_psx <= 7

- it is according registers possible ranges.

for first (20 MHz) frequency:

mod_m1 = 10   mod_n1 = 1     mod_ps1 = 3
mod_m1 = 15   mod_n1 = 2     mod_ps1 = 2
mod_m1 = 20   mod_n1 = 2     mod_ps1 = 3
mod_m1 = 30   mod_n1 = 3     mod_ps1 = 2
mod_m1 = 40   mod_n1 = 3     mod_ps1 = 3

for second (30 MHz) frequency:
mod_m2 = 15   mod_n2 = 2      mod_ps2 = 1
mod_m2 = 30   mod_n2 = 3      mod_ps2 = 1
mod_m2 = 45   mod_n2 = 3      mod_ps2 = 2

all lines confirm equation (11) and (12).

Here I can see few variants for configuring TG parameters.

What is the best variant and how rightly to chose it?

For example: In case LongRangeConfig in demo-board:

mod_m1 = 10    mod_n1 = 1     mod_ps1 = 1
mod_m1 = 20    mod_n1 = 2     mod_ps1 = 1
mod_m1 = 40    mod_n1 = 3     mod_ps1 = 1
mod_m2 = 15    mod_n2 = 2     mod_ps2 = 0
mod_m2 = 30    mod_n2 = 3     mod_ps2 = 0

but it is written to register the next:
mod_m1 = 20    mod_n1 = 2     mod_ps1 = 1
mod_m2 = 15    mod_n2 = 2     mod_ps2 = 0

Thank you!