Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
PPSi
Commits
2636527a
Commit
2636527a
authored
Aug 17, 2023
by
Peter Jansweijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add awkward locksweep hack via locksweep function in board file
parent
168f5e44
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
wrh.h
include/hw-specific/wrh.h
+1
-0
wrh-servo.c
proto-ext-common/wrh-servo.c
+13
-1
No files found.
include/hw-specific/wrh.h
View file @
2636527a
...
...
@@ -89,6 +89,7 @@ typedef enum {
WRH_UNINITIALIZED
=
0
,
WRH_SYNC_TAI
,
WRH_SYNC_NSEC
,
WRH_LOCK_SWEEP
,
WRH_SYNC_PHASE
,
WRH_TRACK_PHASE
,
WRH_WAIT_OFFSET_STABLE
,
...
...
proto-ext-common/wrh-servo.c
View file @
2636527a
...
...
@@ -9,6 +9,7 @@
#include <ppsi/ppsi.h>
// #include "wrs-constants.h"
#include "../proto-standard/common-fun.h"
#include "board.h"
#if CONFIG_ARCH_IS_WRS
#include <libwr/shmem.h>
...
...
@@ -25,6 +26,7 @@ static const char * const wrh_servo_state_name[] = {
[
WRH_UNINITIALIZED
]
=
"Uninitialized"
,
[
WRH_SYNC_NSEC
]
=
"SYNC_NSEC"
,
[
WRH_SYNC_TAI
]
=
"SYNC_TAI"
,
[
WRH_LOCK_SWEEP
]
=
"SYNC_LOCK_SWEEP"
,
[
WRH_SYNC_PHASE
]
=
"SYNC_PHASE"
,
[
WRH_TRACK_PHASE
]
=
"TRACK_PHASE"
,
[
WRH_WAIT_OFFSET_STABLE
]
=
"WAIT_OFFSET_STABLE"
,
...
...
@@ -276,7 +278,17 @@ static int __wrh_servo_update(struct pp_instance *ppi)
case
WRH_SYNC_NSEC
:
WRH_OPER
()
->
adjust_counters
(
0
,
offset_ticks
);
gs
->
flags
|=
PP_SERVO_FLAG_WAIT_HW
;
setState
(
ppi
,
WRH_LOCK_SWEEP
);
break
;
case
WRH_LOCK_SWEEP
:
if
(
!
lock_sweep
())
{
setState
(
ppi
,
WRH_SYNC_PHASE
);
}
else
{
pp_printf
(
"Relock mpll
\n
"
);
mpll_restart
();
}
gs
->
flags
|=
PP_SERVO_FLAG_WAIT_HW
;
break
;
case
WRH_SYNC_PHASE
:
...
...
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