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
28
Issues
28
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
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
4a319b43
Commit
4a319b43
authored
Mar 19, 2012
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new softpll little changes to follow switch-hdl repo
parent
80bf6284
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
softpll_ng.c
dev/softpll_ng.c
+3
-4
spll_helper.h
include/spll_helper.h
+6
-4
No files found.
dev/softpll_ng.c
View file @
4a319b43
...
...
@@ -23,15 +23,14 @@ static volatile struct SPLL_WB *SPLL = (volatile struct SPLL_WB *) BASE_SOFTPLL;
#include "spll_main.h"
#include "spll_ptracker.h"
static
struct
spll_helper_state
helper
;
static
struct
spll_main_state
mpll
;
static
volatile
struct
spll_helper_state
helper
;
static
volatile
struct
spll_main_state
mpll
;
void
_irq_entry
()
{
volatile
uint32_t
trr
;
int
src
=
-
1
,
tag
;
if
(
!
(
SPLL
->
CSR
&
SPLL_TRR_CSR_EMPTY
))
{
trr
=
SPLL
->
TRR_R0
;
...
...
@@ -62,7 +61,6 @@ void spll_init()
timer_delay
(
1000
);
//GD timer_delay(100000);
//GD
helper_init
(
&
helper
,
1
);
timer_delay
(
1000
);
TRACE_DEV
(
"delay off
\n
"
);
...
...
@@ -91,6 +89,7 @@ void spll_test()
TRACE_DEV
(
"running spll_init
\n
"
);
spll_init
();
helper_init
(
&
helper
,
0
);
TRACE_DEV
(
"spll_init
\n
"
);
helper_start
(
&
helper
);
TRACE_DEV
(
"helper start
\n
"
);
...
...
include/spll_helper.h
View file @
4a319b43
...
...
@@ -71,7 +71,9 @@ static int helper_update(struct spll_helper_state *s, int tag, int source)
err
=
(
tag
+
s
->
p_adder
)
-
s
->
p_setpoint
;
TRACE_DEV
(
"hpll 1err=%d
\n
"
,
err
);
// if(s->tag_d0 - tag > -100000)
TRACE_DEV
(
"%d
\n
"
,
s
->
tag_d0
-
tag
);
//spll_debug(DBG_ERR | DBG_HELPER, s->tag_d0-tag, 1);
if
(
HELPER_ERROR_CLAMP
)
{
...
...
@@ -94,9 +96,9 @@ static int helper_update(struct spll_helper_state *s, int tag, int source)
y
=
pi_update
(
&
s
->
pi
,
err
);
SPLL
->
DAC_HPLL
=
y
;
spll_debug
(
DBG_SAMPLE_ID
|
DBG_HELPER
,
s
->
sample_n
++
,
0
);
spll_debug
(
DBG_Y
|
DBG_HELPER
,
y
,
0
);
spll_debug
(
DBG_ERR
|
DBG_HELPER
,
err
,
1
);
//
spll_debug(DBG_SAMPLE_ID | DBG_HELPER, s->sample_n++, 0);
//
spll_debug(DBG_Y | DBG_HELPER, y, 0);
//
spll_debug(DBG_ERR | DBG_HELPER, err, 1);
if
(
ld_update
(
&
s
->
ld
,
err
))
return
SPLL_LOCKED
;
...
...
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