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
31
Issues
31
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
367b21af
Commit
367b21af
authored
Aug 19, 2019
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ljd: rename to LJD everything related
parent
ea23c90c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
16 deletions
+12
-16
ad9516.c
dev/ad9516.c
+6
-6
ad9516_config.h
dev/ad9516_config.h
+1
-1
board-wrs.h
include/board-wrs.h
+1
-1
gpio-wrs.h
include/gpio-wrs.h
+1
-5
wrc.h
include/wrc.h
+1
-1
spll_external.c
softpll/spll_external.c
+1
-1
wrs_main.c
wrs_main.c
+1
-1
No files found.
dev/ad9516.c
View file @
367b21af
...
...
@@ -290,17 +290,17 @@ int ad9516_init(int scb_version, int ljd_present)
return
0
;
}
int
ext
_ad9516_init
(
void
)
{
pp_printf
(
"Initializing
external
AD9516 PLL...
\n
"
);
oc_spi_init
((
void
*
)
BASE_SPI_
EXT
_BOARD
);
void
*
spi_base
=
(
void
*
)
BASE_SPI_
EXT
_BOARD
;
int
ljd
_ad9516_init
(
void
)
{
pp_printf
(
"Initializing
Low-Jitter Daughterboard
AD9516 PLL...
\n
"
);
oc_spi_init
((
void
*
)
BASE_SPI_
LJD
_BOARD
);
void
*
spi_base
=
(
void
*
)
BASE_SPI_
LJD
_BOARD
;
/* Use unidirectional SPI mode */
ad9516_write_reg
((
void
*
)
spi_base
,
0x000
,
0x99
);
/* Check the presence of the chip */
if
(
ad9516_read_reg
((
void
*
)
spi_base
,
0x3
)
!=
0xc3
)
{
pp_printf
(
"Error:
External
AD9516 PLL not responding.
\n
"
);
pp_printf
(
"Error:
Low-Jitter Daughterboard
AD9516 PLL not responding.
\n
"
);
return
-
1
;
}
ad9516_write_reg
(
spi_base
,
0x018
,
0x0
);
// reset VCO calibration
...
...
@@ -309,7 +309,7 @@ int ext_ad9516_init (void) {
ad9516_write_reg
(
spi_base
,
0x232
,
0x0
);
ad9516_set_vco_divider
(
spi_base
,
3
);
ad9516_load_regset
(
spi_base
,
ad9516_
ext_base_config
,
ARRAY_SIZE
(
ad9516_ext
_base_config
),
1
);
ad9516_load_regset
(
spi_base
,
ad9516_
ljd_base_config
,
ARRAY_SIZE
(
ad9516_ljd
_base_config
),
1
);
ad9516_set_output_divider
(
spi_base
,
6
,
8
,
0
);
// OUT6. 62.5MHz
ad9516_set_output_divider
(
spi_base
,
8
,
20
,
0
);
// OUT6. 62.5MHz
...
...
dev/ad9516_config.h
View file @
367b21af
...
...
@@ -146,7 +146,7 @@ const struct ad9516_reg ad9516_base_config_34[] = {
/* Configuration for the SCB version greater than or equal 3.4: Base + 6, 7, 8, 9 outputs*/
const
struct
ad9516_reg
ad9516_
ext
_base_config
[]
=
{
const
struct
ad9516_reg
ad9516_
ljd
_base_config
[]
=
{
{
0x0000
,
0x99
},
{
0x0001
,
0x00
},
{
0x0002
,
0x10
},
...
...
include/board-wrs.h
View file @
367b21af
...
...
@@ -21,7 +21,7 @@
#define BASE_GPIO 0x10300
#define BASE_TIMER 0x10400
#define BASE_PPS_GEN 0x10500
#define BASE_SPI_
EXT
_BOARD 0x10700
#define BASE_SPI_
LJD
_BOARD 0x10700
/* spll parameter that are board-specific */
#define BOARD_DIVIDE_DMTD_CLOCKS 0
...
...
include/gpio-wrs.h
View file @
367b21af
...
...
@@ -13,11 +13,7 @@
#define GPIO_SYS_CLK_SEL 0
#define GPIO_PLL_RESET_N 1
#define GPIO_PERIPH_RESET_N 3
#define GPIO_EXT_PLL_RESET_N 4
#define GPIO_EXT_BOARD_DETECT 5
#define GPIO_EXT_OSC_FRED_D0 6
#define GPIO_EXT_OSC_FRED_D1 7
#define GPIO_EXT_OSC_FRED_D2 8
#define GPIO_LJD_BOARD_DETECT 4
extern
int
ljd_present
;
...
...
include/wrc.h
View file @
367b21af
...
...
@@ -71,7 +71,7 @@ extern int wrc_ui_refperiod;
/* Init functions and defaults for the wrs build */
int
ad9516_init
(
int
scb_ver
,
int
ljd_present
);
int
ext
_ad9516_init
(
void
);
int
ljd
_ad9516_init
(
void
);
void
rts_init
(
void
);
int
rtipc_init
(
void
);
void
rts_update
(
void
);
...
...
softpll/spll_external.c
View file @
367b21af
...
...
@@ -118,7 +118,7 @@ int external_align_fsm(volatile struct spll_external_state *s)
timer_delay
(
10
);
SPLL
->
ECCR
&=
(
~
SPLL_ECCR_EXT_REF_PLLRST
);
timer_delay
(
10
);
ljd_ad9516_stat
=
ext
_ad9516_init
();
ljd_ad9516_stat
=
ljd
_ad9516_init
();
f_ext
=
spll_measure_frequency
(
SPLL_OSC_EXT
);
if
(
!
ljd_ad9516_stat
&&
(
f_ext
>
9999000
)
&&
(
f_ext
<
10001000
))
{
s
->
align_state
=
ALIGN_STATE_WAIT_PLOCK
;
...
...
wrs_main.c
View file @
367b21af
...
...
@@ -42,7 +42,7 @@ int main(void)
pp_printf
(
"SCB version: %d. %s
\n
"
,
scb_ver
,(
scb_ver
>=
34
)
?
"10 MHz SMC Output."
:
""
);
pp_printf
(
"Start counter %d
\n
"
,
stats
.
start_cnt
);
/* Low-jitter Daughterboard detection */
ljd_present
=
gpio_in
(
GPIO_
EXT
_BOARD_DETECT
);
ljd_present
=
gpio_in
(
GPIO_
LJD
_BOARD_DETECT
);
if
(
ljd_present
)
pp_printf
(
"
\n
--- WRS Low jitter board detected. ---
\n
Allow 1 hour of warming \
up before starting measurements
\n
"
);
...
...
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