Newer and cleaner TARGET=econotag as well as robust mc13224v

configuration system.

(also deprecate TARGET=redbee-econotag)

- mc13224v now automatically probes hardware config for buck converter
and 32kHz crystal as well as automatically monitors battery voltage
and manages the buck accordingly.

- new flashed based config system for mc13224v parameters such has
  radio modes (demod, autoack), nvmtype, mac address, channel and
  power.

- considerably cleaned up econotag platform code (suffered from severe
  case of bit-rot)
This commit is contained in:
Mariano Alvira 2012-10-20 22:29:16 -04:00
parent 01a28e47d5
commit 03ab3fe317
15 changed files with 950 additions and 25 deletions

View file

@ -174,14 +174,14 @@ void rtc_calibrate(void)
#define TIMEOUT 100 /* 50 msec per attempt */
for (i = 0; i < 9; i++)
for (i = 0; i < 16; i++)
{
mid = (low + high) / 2;
count = __rtc_try(mid, TIMEOUT);
// careful about overflow
rtc_freq = REF_OSC / ((count + TIMEOUT/2) / TIMEOUT);
if (rtc_freq > 2000)
if (rtc_freq > 2048)
low = mid; // increase loading
else
high = mid; // decrease loading