Open neilh10 opened 3 years ago
Arduino-SDI-12 sw implementation requires a bit clock that is accurately timed at 1200*13bits or 15,600Hz The Wio Terminal uses ATSAMD51P19 which has a complex set of clocks. CycleCounter - runs at 120MHz can be read directly, and arithmetically divided down to the bit clock.
Alternatives: GCK5 - 1 Mhz that can be routed to a counter like TC_3 with a divisor of 64 for a 15,625Hz counter Part of the TC (Time Counter) features is they haver pre-scaler as a power of 2 from 1~1024 The "GCK"s can have a divider that is any number. So an alternative is to create a new GCK (GCK6), feed from the 48MHz, divide by 3 to have an output of 16MHz, and then for the TC pre-scaler to use 1024.
Add Wio Terminal to the Arduino-SDI12 library