Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr2rf-vme
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
wr2rf-vme
Commits
b2e12226
Commit
b2e12226
authored
Apr 21, 2021
by
John Robert Gill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added pll_sync function.
parent
870a53ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
init.c
software/libwr2rf/init.c
+15
-0
ltc6950_config.h
software/libwr2rf/ltc6950_config.h
+6
-6
No files found.
software/libwr2rf/init.c
View file @
b2e12226
...
...
@@ -95,6 +95,19 @@ libwr2rf_iodelay_init(struct libwr2rf_dev *dev)
libwr2rf_write16
(
dev
,
iodelay_addr
,
0
);
}
void
libwr2rf_ltc6950_sync
(
struct
libwr2rf_dev
*
dev
)
{
unsigned
addr
=
WR2RF_VME_REGS_INIT
+
WR2RF_INIT_REGS_PLL_CTRL
;
unsigned
val
=
libwr2rf_read16
(
dev
,
addr
);
// provide a signal > 1ms to the ltc6950
val
|=
WR2RF_INIT_REGS_PLL_CTRL_SYNC
;
libwr2rf_write16
(
dev
,
addr
,
val
);
usleep
(
2000
);
val
&=
~
WR2RF_INIT_REGS_PLL_CTRL_SYNC
;
libwr2rf_write16
(
dev
,
addr
,
val
);
}
void
libwr2rf_clock_init
(
struct
libwr2rf_dev
*
dev
)
...
...
@@ -106,6 +119,8 @@ libwr2rf_clock_init (struct libwr2rf_dev *dev)
libwr2rf_pll_spi_init
(
dev
);
/* 1.2 the PLL itself. */
libwr2rf_ltc6950_init
(
dev
);
/* 1.3 sync the PLL */
libwr2rf_ltc6950_sync
(
dev
);
/* 2. FPGA clock. */
libwr2rf_clock_select_dds
(
dev
);
...
...
software/libwr2rf/ltc6950_config.h
View file @
b2e12226
...
...
@@ -30,14 +30,14 @@
{
0x08
,
0x01
},
// R[7:0] = 1
{
0x09
,
0x00
},
// Reset_N + N[10:8]
{
0x0a
,
0x0a
},
// N[7:0] = 10
{
0x0b
,
0x
0
4
},
// disable FILTR for 100 MHz, LVCMS=1
{
0x0c
,
0x
0
0
},
// DEL0 = 0, No sync, No filter
{
0x0b
,
0x
c
4
},
// disable FILTR for 100 MHz, LVCMS=1
{
0x0c
,
0x
8
0
},
// DEL0 = 0, No sync, No filter
{
0x0d
,
0x84
},
// M0 = 4
{
0x0e
,
0x
0
0
},
// DEL1
{
0x0e
,
0x
8
0
},
// DEL1
{
0x0f
,
0x81
},
// M1 = 1
{
0x10
,
0x
0
0
},
// DEL2
{
0x10
,
0x
8
0
},
// DEL2
{
0x11
,
0x88
},
// M2 = 8
{
0x12
,
0x
0
0
},
// DEL3
{
0x12
,
0x
8
0
},
// DEL3
{
0x13
,
0x88
},
// M3 = 8
{
0x14
,
0x
0
0
},
// DEL4
{
0x14
,
0x
8
0
},
// DEL4
{
0x15
,
0x10
}
// M4 = 16, RDIVOUT = 0
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