Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
pts
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
misc
pts
Commits
a3a07278
Commit
a3a07278
authored
Feb 08, 2012
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in trigger configuration.
parent
77d6683d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
fmc_adc.py
test/fmcadc100m14b4cha/python/fmc_adc.py
+10
-6
No files found.
test/fmcadc100m14b4cha/python/fmc_adc.py
View file @
a3a07278
...
...
@@ -146,8 +146,8 @@ class CFmcAdc100Ms:
TRIG_CFG_INT_SEL
=
4
TRIG_CFG_INT_THRES
=
16
INT_SEL_MASK
=
0x
00000030
INT_THRES_MASK
=
0x
FFFF0000
INT_SEL_MASK
=
0x
FFFFFFCF
INT_THRES_MASK
=
0x
0000FFFF
IN_TERM
=
(
1
<<
3
)
IN_TERM_MASK
=
0x08
...
...
@@ -446,11 +446,13 @@ class CFmcAdc100Ms:
self
.
fmc_adc_csr
.
wr_bit
(
self
.
R_TRIG_CFG
,
self
.
TRIG_CFG_SW_EN
,
sw_en
)
# Internal trigger channel select (1 to 4)
reg
=
self
.
fmc_adc_csr
.
rd_reg
(
self
.
R_TRIG_CFG
)
reg
|=
((
int_sel
<<
self
.
TRIG_CFG_INT_SEL
)
&
self
.
INT_SEL_MASK
)
reg
&=
self
.
INT_SEL_MASK
reg
+=
(
int_sel
<<
self
.
TRIG_CFG_INT_SEL
)
self
.
fmc_adc_csr
.
wr_reg
(
self
.
R_TRIG_CFG
,
reg
)
# Internal trigger threshold
reg
=
self
.
fmc_adc_csr
.
rd_reg
(
self
.
R_TRIG_CFG
)
reg
|=
((
int_thres
<<
self
.
TRIG_CFG_INT_THRES
)
&
self
.
INT_THRES_MASK
)
reg
&=
self
.
INT_THRES_MASK
reg
+=
(
int_thres
<<
self
.
TRIG_CFG_INT_THRES
)
self
.
fmc_adc_csr
.
wr_reg
(
self
.
R_TRIG_CFG
,
reg
)
# Trigger delay (in sampling clock ticks)
self
.
fmc_adc_csr
.
wr_reg
(
self
.
R_TRIG_DLY
,
delay
)
...
...
@@ -467,11 +469,13 @@ class CFmcAdc100Ms:
self
.
fmc_adc_csr
.
wr_bit
(
self
.
R_TRIG_CFG
,
self
.
TRIG_CFG_EXT_POL
,
polarity
)
# Internal trigger channel select (1 to 4)
reg
=
self
.
fmc_adc_csr
.
rd_reg
(
self
.
R_TRIG_CFG
)
reg
|=
(((
channel
-
1
)
<<
self
.
TRIG_CFG_INT_SEL
)
&
self
.
INT_SEL_MASK
)
reg
&=
self
.
INT_SEL_MASK
reg
+=
(
int_sel
<<
self
.
TRIG_CFG_INT_SEL
)
self
.
fmc_adc_csr
.
wr_reg
(
self
.
R_TRIG_CFG
,
reg
)
# Internal trigger threshold
reg
=
self
.
fmc_adc_csr
.
rd_reg
(
self
.
R_TRIG_CFG
)
reg
|=
((
threshold
<<
self
.
TRIG_CFG_INT_THRES
)
&
self
.
INT_THRES_MASK
)
reg
&=
self
.
INT_THRES_MASK
reg
+=
(
int_thres
<<
self
.
TRIG_CFG_INT_THRES
)
self
.
fmc_adc_csr
.
wr_reg
(
self
.
R_TRIG_CFG
,
reg
)
# Hardware trigger enable
self
.
fmc_adc_csr
.
wr_bit
(
self
.
R_TRIG_CFG
,
self
.
TRIG_CFG_HW_EN
,
1
)
...
...
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