summaryrefslogtreecommitdiff
path: root/cesar/cp
diff options
context:
space:
mode:
authorNicolas Schodet2011-05-12 14:23:18 +0200
committerNicolas Schodet2011-09-08 16:22:54 +0200
commit312e093208777de66cbc084c3bfc3dd710cfcd61 (patch)
tree9a58929ef68bd976259b8699580a914441aa23af /cesar/cp
parentc33847d8de066d8e2ac34594b4ff72d3f9f92593 (diff)
cesar/cp, cesar/hal/phy, cesar/mac/pbproc: use delta external, refs #572
When frequency error is known, use external delta. This means: - RESYS program must be patched, - change delta accumulation coefficients register, - store computed delta in hardware register.
Diffstat (limited to 'cesar/cp')
-rw-r--r--cesar/cp/beacon/src/beacon.c8
-rw-r--r--cesar/cp/beacon/test/src/phy_stub.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/cesar/cp/beacon/src/beacon.c b/cesar/cp/beacon/src/beacon.c
index c8bbff9e15..1ca8b03c64 100644
--- a/cesar/cp/beacon/src/beacon.c
+++ b/cesar/cp/beacon/src/beacon.c
@@ -88,13 +88,13 @@ cp_beacon_fill_discover_info (cp_t *ctx,
}
static void
-cp_beacon_clk_sync_call_spoc (cp_t *ctx, u32 fe)
+cp_beacon_clk_sync_call_spoc (cp_t *ctx, bool sync, u32 fe)
{
dbg_assert (ctx);
phy_spoc_coeff_t *coeff = blk_alloc ();
coeff->part2 = blk_alloc();
phy_spoc_compute_all (fe, coeff);
- pbproc_spoc_coeff_set (ctx->pbproc, coeff);
+ pbproc_spoc_coeff_set (ctx->pbproc, sync, coeff);
}
void
@@ -654,7 +654,7 @@ cp_beacon_process_beacon_central (
ctx->beacon.spoc_update_date, phy_date ()))
{
cp_beacon_clk_sync_call_spoc (
- ctx, beacon->params.frequency_error);
+ ctx, true, beacon->params.frequency_error);
ctx->beacon.spoc_update_date = phy_date ()
+ MAC_MS_TO_TCK (ctx->beacon.spoc_update_interval_ms);
ctx->beacon.spoc_updated = true;
@@ -902,7 +902,7 @@ cp_beacon_process_untracked_avln (cp_t *ctx)
own->cco_mac_addr_track = MAC_ZERO;
/* Reset SPOC. */
ctx->beacon.spoc_updated = false;
- cp_beacon_clk_sync_call_spoc (ctx, 0);
+ cp_beacon_clk_sync_call_spoc (ctx, false, 0);
/* Inform BSU. */
bsu_untrack_avln (ctx->bsu);
}
diff --git a/cesar/cp/beacon/test/src/phy_stub.c b/cesar/cp/beacon/test/src/phy_stub.c
index 0e04f43ff8..cfd499e743 100644
--- a/cesar/cp/beacon/test/src/phy_stub.c
+++ b/cesar/cp/beacon/test/src/phy_stub.c
@@ -31,7 +31,7 @@ phy_date ()
}
void
-pbproc_spoc_coeff_set (pbproc_t *pbproc, phy_spoc_coeff_t *coeff)
+pbproc_spoc_coeff_set (pbproc_t *pbproc, bool sync, phy_spoc_coeff_t *coeff)
{
dbg_assert (coeff);