Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
706c9ebf
Commit
706c9ebf
authored
May 03, 2019
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified for changed lepton mode register bits
parent
bd61276e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
lepton.c
src/drivers/elphel/lepton.c
+4
-8
No files found.
src/drivers/elphel/lepton.c
View file @
706c9ebf
...
@@ -446,8 +446,7 @@ int lepton_pgm_detectsensor (int sensor_port, ///< sensor port n
...
@@ -446,8 +446,7 @@ int lepton_pgm_detectsensor (int sensor_port, ///< sensor port n
// **** Was no setting MRST active? Will work just once after loading bitsream ***?
// **** Was no setting MRST active? Will work just once after loading bitsream ***?
// turn off power down, set clock, activate reset
// turn off power down, set clock, activate reset
sensio_ctl
.
mrst
=
0
;
sensio_ctl
.
mrst_set
=
1
;
sensio_ctl
.
reset
=
2
;
// no power down, reset active
sensio_ctl
.
pwdn
=
1
;
sensio_ctl
.
pwdn_set
=
1
;
sensio_ctl
.
mclk
=
1
;
sensio_ctl
.
mclk_set
=
1
;
sensio_ctl
.
mclk
=
1
;
sensio_ctl
.
mclk_set
=
1
;
sensio_ctl
.
spi_en
=
1
;
// reset
sensio_ctl
.
spi_en
=
1
;
// reset
sensio_ctl
.
out_en
=
0
;
sensio_ctl
.
out_en_set
=
1
;
sensio_ctl
.
out_en
=
0
;
sensio_ctl
.
out_en_set
=
1
;
...
@@ -468,8 +467,7 @@ int lepton_pgm_detectsensor (int sensor_port, ///< sensor port n
...
@@ -468,8 +467,7 @@ int lepton_pgm_detectsensor (int sensor_port, ///< sensor port n
// reset mode bits to keep bit field values
// reset mode bits to keep bit field values
sensio_ctl
.
d32
=
0
;
sensio_ctl
.
d32
=
0
;
// deassert MRST to enable i2c (or is it active always?)
// deassert MRST to enable i2c (or is it active always?)
sensio_ctl
.
mrst
=
1
;
sensio_ctl
.
reset
=
3
;
// no power down, no reset
sensio_ctl
.
mrst_set
=
1
;
x393_sensio_ctrl
(
sensio_ctl
,
sensor_port
);
x393_sensio_ctrl
(
sensio_ctl
,
sensor_port
);
// wait for sensor to boot and verify it is alive
// wait for sensor to boot and verify it is alive
...
@@ -546,8 +544,7 @@ int lepton_pgm_initsensor (int sensor_port, ///< sensor port n
...
@@ -546,8 +544,7 @@ int lepton_pgm_initsensor (int sensor_port, ///< sensor port n
if
(
frame16
>=
0
)
return
-
1
;
// should be ASAP
if
(
frame16
>=
0
)
return
-
1
;
// should be ASAP
// turn off power down, set clock, activate reset
// turn off power down, set clock, activate reset
sensio_ctl
.
mrst
=
0
;
sensio_ctl
.
mrst_set
=
1
;
sensio_ctl
.
reset
=
2
;
// no power down, reset active
sensio_ctl
.
pwdn
=
1
;
sensio_ctl
.
pwdn_set
=
1
;
sensio_ctl
.
mclk
=
1
;
sensio_ctl
.
mclk_set
=
1
;
sensio_ctl
.
mclk
=
1
;
sensio_ctl
.
mclk_set
=
1
;
sensio_ctl
.
spi_en
=
1
;
// reset
sensio_ctl
.
spi_en
=
1
;
// reset
sensio_ctl
.
out_en
=
0
;
sensio_ctl
.
out_en_set
=
1
;
sensio_ctl
.
out_en
=
0
;
sensio_ctl
.
out_en_set
=
1
;
...
@@ -568,8 +565,7 @@ int lepton_pgm_initsensor (int sensor_port, ///< sensor port n
...
@@ -568,8 +565,7 @@ int lepton_pgm_initsensor (int sensor_port, ///< sensor port n
// reset mode bits to keep bit field values
// reset mode bits to keep bit field values
sensio_ctl
.
d32
=
0
;
sensio_ctl
.
d32
=
0
;
// deassert MRST to enable i2c (or is it active always?)
// deassert MRST to enable i2c (or is it active always?)
sensio_ctl
.
mrst
=
1
;
sensio_ctl
.
reset
=
3
;
// no power down, no reset
sensio_ctl
.
mrst_set
=
1
;
x393_sensio_ctrl
(
sensio_ctl
,
sensor_port
);
x393_sensio_ctrl
(
sensio_ctl
,
sensor_port
);
// wait for sensor to boot and verify it is alive
// wait for sensor to boot and verify it is alive
// i = lepton_wait_ready(sensor_port, sensor->i2c_addr, 1000 );
// i = lepton_wait_ready(sensor_port, sensor->i2c_addr, 1000 );
...
...
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