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
c4754144
Commit
c4754144
authored
Oct 28, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recover from waiting trigger
parent
0e75c07d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
0 deletions
+28
-0
framepars.c
src/drivers/elphel/framepars.c
+1
-0
pgm_functions.c
src/drivers/elphel/pgm_functions.c
+13
-0
sensor_common.c
src/drivers/elphel/sensor_common.c
+12
-0
sensor_common.h
src/drivers/elphel/sensor_common.h
+2
-0
No files found.
src/drivers/elphel/framepars.c
View file @
c4754144
...
...
@@ -1628,6 +1628,7 @@ loff_t framepars_lseek(struct file * file, loff_t offset, int orig)
break
;
case
LSEEK_DMA_INIT
:
// initialize ETRAX DMA (normally done in sensor_common.c at driver init
dev_dbg
(
g_devfp_ptr
,
"LSEEK_DMA_INIT
\n
"
);
trigger_restart
();
// LSEEK_DMA_INIT is unused
//x313_dma_init();
break
;
case
LSEEK_DMA_STOP
:
// stop DMA
...
...
src/drivers/elphel/pgm_functions.c
View file @
c4754144
...
...
@@ -365,6 +365,11 @@ int pgm_detectsensor (int sensor_port, ///< sensor port number (
///< @return OK - 0, <0 - error
{
x393_camsync_mode_t
camsync_mode
=
{.
d32
=
0
};
x393_camsync_io_t
camsync_src
=
{.
d32
=
0x55555
};
// all disabled (use internal)
x393_camsync_io_t
camsync_dst
=
{.
d32
=
0x55555
};
// all disable - nothing to output
// Setting trigger input, output and preriod to off
int
was_sensor_freq
=
0
;
// 90000000; // getClockFreq(1);
int
qperiod
;
int
i2cbytes
;
...
...
@@ -411,6 +416,14 @@ int pgm_detectsensor (int sensor_port, ///< sensor port number (
// camsync_mode.ext_set = 1;
x393_camsync_mode
(
camsync_mode
);
// Set inactive state to all I/O) and period:
x393_camsync_trig_src
(
camsync_src
);
x393_camsync_trig_dst
(
camsync_dst
);
set_x393_camsync_trig_period
(
0
);
// dev_dbg(g_dev_ptr,"trying MT9P001\n");
// mt9x001_pgm_detectsensor(sensor_port, sensor, thispars, prevpars, frame16); // try Micron 5.0 Mpixel - should return sensor type
...
...
src/drivers/elphel/sensor_common.c
View file @
c4754144
...
...
@@ -996,6 +996,18 @@ void sensor_interrupts (int on, ///< 0 -interrupt disable, 1 - interrupt enabl
x393_cmdframeseq_ctrl
(
cmdframeseq_mode
,
chn
);
}
/** Recover from waiting trigger - internal FPGA or external by re-writing current period to the register in immediate mode
* If the period was 0 (stopped), use 1 (single) */
void
trigger_restart
(
void
)
{
u32
period
=
get_x393_camsync_trig_period
();
if
(
!
period
)
period
=
1
;
set_x393_camsync_trig_period
(
period
);
dev_dbg
(
g_dev_ptr
,
"Reset trigger period in immediate mode = %d (0x%x)
\n
"
,
(
int
)
period
,
(
int
)
period
);
}
int
sequencer_stop_run_reset
(
int
chn
,
///< Sensor port
int
cmd
)
///< Command: SEQ_CMD_STOP=0 - stop, SEQ_CMD_RUN=1 - run, SEQ_CMD_RESET=2 - reset
///< @return always 0
...
...
src/drivers/elphel/sensor_common.h
View file @
c4754144
...
...
@@ -52,6 +52,8 @@ int init_compressor_dma(int chn_mask, int reset);
void
reset_compressor
(
unsigned
int
chn
);
void
compressor_interrupts
(
int
on
,
int
chn
);
void
sensor_interrupts
(
int
on
,
int
chn
);
void
trigger_restart
(
void
);
int
sequencer_stop_run_reset
(
int
chn
,
int
cmd
);
struct
sensorproc_t
*
copy_sensorproc
(
int
sensor_port
,
struct
sensorproc_t
*
copy
);
...
...
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