Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Software for White Rabbit PTP Core
Manage
Activity
Members
Labels
Plan
Issues
39
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Software for White Rabbit PTP Core
Commits
f9d01cff
Commit
f9d01cff
authored
13 years ago
by
Tomasz Wlostowski
Browse files
Options
Downloads
Patches
Plain Diff
softpll: working phase shifter + programmable deglitching
parent
1a1f5a7f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dev/softpll.c
+7
-4
7 additions, 4 deletions
dev/softpll.c
with
7 additions
and
4 deletions
dev/softpll.c
+
7
−
4
View file @
f9d01cff
...
...
@@ -13,12 +13,12 @@
#define CHAN_FB 8
#define CHAN_REF 4
#define CHAN_PERIOD 2
#define CHAN_HPLL 1
//
#define CHAN_HPLL 1
#define READY_FB (8<<4)
#define READY_REF (4<<4)
#define READY_PERIOD (2<<4)
#define READY_HPLL (1<<4)
//
#define READY_HPLL (1<<4)
static
volatile
struct
SPLL_WB
*
SPLL
=
(
volatile
struct
SPLL_WB
*
)
BASE_SOFTPLL
;
...
...
@@ -49,6 +49,7 @@ struct softpll_config {
int
dpll_ld_threshold
;
int
dpll_delock_threshold
;
int
dpll_dac_bias
;
int
dpll_deglitcher_threshold
;
};
...
...
@@ -78,7 +79,8 @@ const struct softpll_config pll_cfg =
1000
,
// lock detect samples
300
,
// lock detect threshold
500
,
// delock threshold
32000
// DPLL dac bias
32000
,
// DPLL dac bias
1000
// deglitcher threshold
};
struct
softpll_state
{
...
...
@@ -302,7 +304,8 @@ void softpll_enable()
{
SPLL
->
DAC_HPLL
=
pll_cfg
.
hpll_dac_bias
;
SPLL
->
DAC_DMPLL
=
pll_cfg
.
dpll_dac_bias
;
SPLL
->
DEGLITCH_THR
=
pll_cfg
.
dpll_deglitcher_threshold
;
pstate
.
h_p_setpoint
=
-
1
;
pstate
.
h_i
=
0
;
pstate
.
h_freq_mode
=
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment