mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
camerad: pixclk 88mhz but frame time the same (#24587)
* pixclk 88mhz but frame time the same * scale integration time * 22.8 ms * 15.18 ms * fix exposure * fix glitching, 18.9 ms * set both to min * faster pixclk = more power * should pass CI Co-authored-by: Comma Device <device@comma.ai> Co-authored-by: Willem Melching <willem.melching@gmail.com> old-commit-hash: 7c74ab8992ef32277deaf02312a9bbf272ba581a
This commit is contained in:
@@ -74,7 +74,7 @@ const int ANALOG_GAIN_REC_IDX = 0x6; // 0.8x
|
||||
const int ANALOG_GAIN_MAX_IDX = 0xD; // 4.0x
|
||||
|
||||
const int EXPOSURE_TIME_MIN = 2; // with HDR, fastest ss
|
||||
const int EXPOSURE_TIME_MAX = 1618; // with HDR, slowest ss, 40ms
|
||||
const int EXPOSURE_TIME_MAX = 0x0855; // with HDR, slowest ss, 40ms
|
||||
|
||||
// ************** low level camera helpers ****************
|
||||
int do_cam_control(int fd, int op_code, void *handle, int size) {
|
||||
|
||||
@@ -49,11 +49,15 @@ struct i2c_random_wr_payload init_array_ar0231[] = {
|
||||
{0x301A, 0x0018}, // RESET_REGISTER
|
||||
|
||||
// CLOCK Settings
|
||||
// input clock is 19.2 / 2 * 0x37 = 528 MHz
|
||||
// pixclk is 528 / 6 = 88 MHz
|
||||
// full roll time is 1000/(PIXCLK/(LINE_LENGTH_PCK*FRAME_LENGTH_LINES)) = 39.99 ms
|
||||
// img roll time is 1000/(PIXCLK/(LINE_LENGTH_PCK*Y_OUTPUT_CONTROL)) = 22.85 ms
|
||||
{0x302A, 0x0006}, // VT_PIX_CLK_DIV
|
||||
{0x302C, 0x0001}, // VT_SYS_CLK_DIV
|
||||
{0x302E, 0x0002}, // PRE_PLL_CLK_DIV
|
||||
{0x3030, 0x0032}, // PLL_MULTIPLIER
|
||||
{0x3036, 0x000C}, // OP_WORD_CLK_DIV
|
||||
{0x3030, 0x0037}, // PLL_MULTIPLIER
|
||||
{0x3036, 0x000C}, // OP_PIX_CLK_DIV
|
||||
{0x3038, 0x0001}, // OP_SYS_CLK_DIV
|
||||
|
||||
// FORMAT
|
||||
@@ -76,8 +80,8 @@ struct i2c_random_wr_payload init_array_ar0231[] = {
|
||||
{0x340C, 0x802}, // GPIO_HIDRV_EN | GPIO0_ISEL=2
|
||||
|
||||
// Readout timing
|
||||
{0x300C, 0x07B9}, // LINE_LENGTH_PCK
|
||||
{0x300A, 0x0652}, // FRAME_LENGTH_LINES
|
||||
{0x300C, 0x0672}, // LINE_LENGTH_PCK (valid for 3-exposure HDR)
|
||||
{0x300A, 0x0855}, // FRAME_LENGTH_LINES
|
||||
{0x3042, 0x0000}, // EXTRA_DELAY
|
||||
|
||||
// Readout Settings
|
||||
@@ -117,6 +121,8 @@ struct i2c_random_wr_payload init_array_ar0231[] = {
|
||||
{0x100C, 0x0589}, // FINE_INTEGRATION_TIME2_MIN
|
||||
{0x100E, 0x07B1}, // FINE_INTEGRATION_TIME3_MIN
|
||||
{0x1010, 0x0139}, // FINE_INTEGRATION_TIME4_MIN
|
||||
|
||||
// TODO: do these have to be lower than LINE_LENGTH_PCK?
|
||||
{0x3014, 0x08CB}, // FINE_INTEGRATION_TIME_
|
||||
{0x321E, 0x0894}, // FINE_INTEGRATION_TIME2
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class Proc:
|
||||
warmup: float = 3.
|
||||
|
||||
PROCS = [
|
||||
Proc('camerad', 2.02),
|
||||
Proc('camerad', 2.25),
|
||||
Proc('modeld', 0.95),
|
||||
Proc('dmonitoringmodeld', 0.25),
|
||||
Proc('encoderd', 0.42),
|
||||
|
||||
Reference in New Issue
Block a user