Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
f9d01cff
Commit
f9d01cff
authored
Apr 09, 2011
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
softpll: working phase shifter + programmable deglitching
parent
1a1f5a7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
softpll.c
dev/softpll.c
+7
-4
No files found.
dev/softpll.c
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment