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
35
Issue boards
Milestones
Wiki
Code
Merge requests
6
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
794ef617
Commit
794ef617
authored
4 years ago
by
Peter Jansweijer
Browse files
Options
Downloads
Patches
Plain Diff
define vcxo specific kp, ki parameters
parent
32e6a5f2
1 merge request
!4
Peter clb wrpc v5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
softpll/spll_helper.c
+6
-1
6 additions, 1 deletion
softpll/spll_helper.c
softpll/spll_main.c
+5
-1
5 additions, 1 deletion
softpll/spll_main.c
with
11 additions
and
2 deletions
softpll/spll_helper.c
+
6
−
1
View file @
794ef617
...
...
@@ -10,6 +10,7 @@
/* spll_helper.c - implmentation of the Helper PLL servo algorithm. */
#include
"softpll_ng.h"
#include
"wrc-debug.h"
void
helper_init
(
struct
spll_helper_state
*
s
,
int
ref_channel
)
{
...
...
@@ -17,9 +18,12 @@ void helper_init(struct spll_helper_state *s, int ref_channel)
/* Phase branch PI controller */
s
->
pi
.
y_min
=
5
;
s
->
pi
.
y_max
=
(
1
<<
DAC_BITS
)
-
5
;
#if defined(CONFIG_WR_NODE)
#if defined(CONFIG_WR_NODE)
&& !defined(HELPER_CRYSTEK_CVPD922)
s
->
pi
.
kp
=
-
150
;
//(int)(0.3 * 32.0 * 16.0); // / 2;
s
->
pi
.
ki
=
-
2
;
//(int)(0.03 * 32.0 * 3.0); // / 2;
#elif defined(CONFIG_WR_NODE) && defined(HELPER_CRYSTEK_CVPD922)
s
->
pi
.
kp
=
-
750
;
// / 2;
s
->
pi
.
ki
=
-
2
;
// / 2;
#else
s
->
pi
.
kp
=
150
;
s
->
pi
.
ki
=
2
;
...
...
@@ -32,6 +36,7 @@ void helper_init(struct spll_helper_state *s, int ref_channel)
s
->
ld
.
lock_samples
=
10000
;
s
->
ld
.
delock_samples
=
100
;
s
->
ref_src
=
ref_channel
;
board_dbg
(
"Helper PLL PI Values: Kp %i
\t
Ki%i
\n
"
,
s
->
pi
.
kp
,
s
->
pi
.
ki
);
}
int
helper_update
(
struct
spll_helper_state
*
s
,
int
tag
,
...
...
This diff is collapsed.
Click to expand it.
softpll/spll_main.c
+
5
−
1
View file @
794ef617
...
...
@@ -42,9 +42,12 @@ void mpll_init(struct spll_main_state *s, int id_ref,
s
->
pi
.
kp
=
1100
;
// / 2;
s
->
pi
.
ki
=
30
;
// / 2;
}
#elif defined(CONFIG_WR_NODE)
#elif defined(CONFIG_WR_NODE)
&& !defined(MAIN_CRYSTEK_CVPD922)
s
->
pi
.
kp
=
-
1100
;
// / 2;
s
->
pi
.
ki
=
-
30
;
// / 2;
#elif defined(CONFIG_WR_NODE) && defined(MAIN_CRYSTEK_CVPD922)
s
->
pi
.
kp
=
-
5500
;
// / 2;
s
->
pi
.
ki
=
-
30
;
// / 2;
#else
#error "Please set CONFIG for wr switch or wr node"
#endif
...
...
@@ -57,6 +60,7 @@ void mpll_init(struct spll_main_state *s, int id_ref,
s
->
id_ref
=
id_ref
;
s
->
id_out
=
id_out
;
s
->
dac_index
=
id_out
-
spll_n_chan_ref
;
board_dbg
(
"Main PLL PI Values: Kp %i
\t
Ki%i
\n
"
,
s
->
pi
.
kp
,
s
->
pi
.
ki
);
if
(
s
->
gain_sched
)
{
...
...
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