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
6
Merge Requests
6
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
b4c64de5
Commit
b4c64de5
authored
Nov 19, 2023
by
li hongming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify the search direction of HPLL locking
parent
f94afdb3
Pipeline
#4990
failed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
spll_helper.c
softpll/spll_helper.c
+3
-3
spll_main.c
softpll/spll_main.c
+6
-6
spll_ptracker.c
softpll/spll_ptracker.c
+1
-1
No files found.
softpll/spll_helper.c
View file @
b4c64de5
...
...
@@ -21,8 +21,8 @@ void helper_init(struct spll_helper_state *s, int ref_channel)
s
->
pi
.
kp
=
-
150
;
//(int)(0.3 * 32.0 * 16.0); // / 2;
s
->
pi
.
ki
=
-
2
;
//(int)(0.03 * 32.0 * 3.0); // / 2;
#else
s
->
pi
.
kp
=
150
;
s
->
pi
.
ki
=
2
;
s
->
pi
.
kp
=
-
150
;
s
->
pi
.
ki
=
-
2
;
#endif
s
->
pi
.
anti_windup
=
1
;
...
...
@@ -89,7 +89,7 @@ void helper_start(struct spll_helper_state *s)
/* Set the bias to the upper end of tuning range. This is to ensure that
the HPLL will always lock on positive frequency offset. */
#if defined(CONFIG_WR_SWITCH)
s
->
pi
.
bias
=
s
->
pi
.
y_m
ax
;
s
->
pi
.
bias
=
s
->
pi
.
y_m
in
;
#else
s
->
pi
.
bias
=
s
->
pi
.
y_min
;
#endif
...
...
softpll/spll_main.c
View file @
b4c64de5
...
...
@@ -32,11 +32,11 @@ void mpll_init(struct spll_main_state *s, int id_ref,
s
->
pi
.
bias
=
30000
;
#if defined(CONFIG_WR_SWITCH)
if
(
ljd_present
)
{
s
->
pi
.
kp
=
2000
;
s
->
pi
.
ki
=
15
;
s
->
pi
.
kp
=
-
2000
;
s
->
pi
.
ki
=
-
15
;
}
else
{
s
->
pi
.
kp
=
1100
;
// / 2;
s
->
pi
.
ki
=
30
;
// / 2;
s
->
pi
.
kp
=
-
1100
;
// / 2;
s
->
pi
.
ki
=
-
30
;
// / 2;
}
#elif defined(CONFIG_WR_NODE)
s
->
pi
.
kp
=
-
1100
;
// / 2;
...
...
@@ -163,7 +163,7 @@ int mpll_update(struct spll_main_state *s, int tag, int source)
if
(
s
->
phase_shift_current
<
s
->
phase_shift_target
)
{
s
->
phase_shift_current
++
;
#if defined(CONFIG_WR_SWITCH)
s
->
adder_ref
++
;
s
->
adder_ref
--
;
#else
s
->
adder_ref
--
;
#endif
...
...
@@ -171,7 +171,7 @@ int mpll_update(struct spll_main_state *s, int tag, int source)
s
->
phase_shift_target
)
{
s
->
phase_shift_current
--
;
#if defined(CONFIG_WR_SWITCH)
s
->
adder_ref
--
;
s
->
adder_ref
++
;
#else
s
->
adder_ref
++
;
#endif
...
...
softpll/spll_ptracker.c
View file @
b4c64de5
...
...
@@ -59,7 +59,7 @@ int ptrackers_update(struct spll_ptracker_state *ptrackers, int tag,
#if defined(CONFIG_WR_NODE)
register
int
delta
=
(
tag
-
tag_ref
)
&
((
1
<<
HPLL_N
)
-
1
);
#else
register
int
delta
=
(
tag
_ref
-
tag
)
&
((
1
<<
HPLL_N
)
-
1
);
register
int
delta
=
(
tag
-
tag_ref
)
&
((
1
<<
HPLL_N
)
-
1
);
#endif
register
int
index
=
delta
>>
(
HPLL_N
-
2
);
...
...
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