<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    <br>
    I get a floating point exception when I run rtl_tcp.  I traced the
    error with GDB to line 515 of tuner_r82xx.c<br>
        if (vco_fra > (2 * pll_ref_khz / n_sdm))<br>
    I found that n_sdm was 0.<br>
    <br>
    I don't understand how this code work and I'm very new to this
    software but it sure looks like a programming bug.<br>
    <br>
    <code>   513          /* sdm calculator */</code><code><br>
    </code><code>   514          while (vco_fra > 1) {</code><code><br>
    </code><code>   515                  if (vco_fra > (2 *
      pll_ref_khz / n_sdm)) {</code><code><br>
    </code><code>   516                          sdm = sdm + 32768 /
      (n_sdm / 2);</code><code><br>
    </code><code>   517                          vco_fra = vco_fra - 2 *
      pll_ref_khz / n_sdm;</code><code><br>
    </code><code>   518                          if (n_sdm >= 0x8000)</code><code><br>
    </code><code>   519                                  break;</code><code><br>
    </code><code>   520                  }</code><code><br>
    </code><code>   521                  n_sdm <<= 1;</code><code><br>
    </code><code>   522          }</code><br>
    <br>
    If the condition on line 515 ever evaluates to false then vco_fra
    doesn't get updated.  The loop will keep repeating with the same
    value of vco_fra until n_sdm becomes 0.  <br>
    <br>
    Steve<br>
  </body>
</html>