Skip to content

Commit

Permalink
Add a reference about possibly different frequencies in older Pis.
Browse files Browse the repository at this point in the history
Addresses #1
  • Loading branch information
hzeller committed Sep 15, 2018
1 parent 267af9f commit 4f495a1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ reception. This magnetical coupling is very low power and only works over a few
centimeters, but **_before running this program, make sure you follow your
local laws with regard to restrictions on radio transmissions._**

### Platform
This runs on a Raspberry Pi. So far, it has been tested on a Pi3 and a
Pi Zero W. There has been a report of different frequencies generated with
an older Pi (Bug #1), so until we have a definitive list of available
clock sources inside these, check out that bug for a workaround.

### Supported Time Services
#### DCF77
The [DCF77] (Germany) signal is a 77.5kHz carrier, that is amplitude modulated
Expand Down
10 changes: 10 additions & 0 deletions gpio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ double GPIO::StartClock(double requested_freq) {

EnableClockOutput(true);

#if 0
// There have been reports of different clock source frequencies. This
// helps figuring out which source was picked.
fprintf(stderr, "Choose clock %d at %gHz / %.3f = %.3f\n",
kClockSources[best_clock_source].src,
kClockSources[best_clock_source].frequency,
divI + divF/1024.0,
kClockSources[best_clock_source].frequency / (divI + divF/1024.0));
#endif

return kClockSources[best_clock_source].frequency / (divI + divF/1024.0);
}

Expand Down

0 comments on commit 4f495a1

Please sign in to comment.