Camera sensor Continuous stop and start stream issue with Imx8mq

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Camera sensor Continuous stop and start stream issue with Imx8mq

643 Views
saideepak_r
Contributor II

Hi,

Iam using Imx8mq processor and Raw 8 sensor with custom board.

Issue

In some of the boards after continuous stop and start stream with 10 secs interval in between stop and start stream we are not receiving any frames both in application and driver side. When i probed the mipi signals we getting same signals as in working case. So in working and non working case probed mipi signals remains the same.

Note:

10 Seconds time interval doesn't matter we tested with multiple time interval.

 

In platform driver side in working case we receiving interrupts in mx6s_csi_irq_handler function.

Debug prints from platform files(mipi_csi2_yav.c and mx6s_capture.c).

[ 360.079394] Func = mx6s_vidioc_streamon
[ 360.083349] Function mx6s_videobuf_queue Line 720
[ 360.088170] Function mx6s_videobuf_queue Line 720
[ 360.092995] Function mx6s_videobuf_queue Line 720
[ 360.097815] Function mx6s_start_streaming Line 910
[ 360.102723] Function mx6s_start_streaming Line 914
[ 360.128985] vb2-core: vb2_core_streamon: successful
[ 360.133887] MIPI CSI2 HC register dump, mipi csi0
[ 360.138732] MIPI CSI2 HC num of lanes 0x100 = 0x1
[ 360.143902] MIPI CSI2 HC dis lanes 0x104 = 0xc
[ 360.149069] MIPI CSI2 HC BIT ERR 0x108 = 0x80
[ 360.154322] MIPI CSI2 HC IRQ STATUS 0x10C = 0x3f
[ 360.159577] MIPI CSI2 HC IRQ MASK 0x110 = 0x1ff
[ 360.164917] MIPI CSI2 HC ULPS STATUS 0x114 = 0x0
[ 360.170084] MIPI CSI2 HC DPHY ErrSotHS 0x118 = 0x0
[ 360.175250] MIPI CSI2 HC DPHY ErrSotSync 0x11c = 0x0
[ 360.180417] MIPI CSI2 HC DPHY ErrEsc 0x120 = 0x0
[ 360.185584] MIPI CSI2 HC DPHY ErrSyncEsc 0x124 = 0x0
[ 360.190751] MIPI CSI2 HC DPHY ErrControl 0x128 = 0x0
[ 360.193815] Func mx6s_csi_irq_handler Line 1115 irq status - 0x0 cr3 frame counter - 0x0.
[ 360.193819] Func mx6s_csi_irq_handler Line 1121 irq status - 0x80014000 cr3 frame counter - 0x10a0.
[ 360.213204] MIPI CSI2 HC DISABLE_PAYLOAD 0x12C = 0x0
[ 360.218372] MIPI CSI2 HC DISABLE_PAYLOAD 0x130 = 0x0
[ 360.223538] MIPI CSI2 HC IGNORE_VC 0x180 = 0x1
[ 360.228706] MIPI CSI2 HC VID_VC 0x184 = 0x1
[ 360.233873] MIPI CSI2 HC FIFO_SEND_LEVEL 0x188 = 0x40
[ 360.239126] MIPI CSI2 HC VID_VSYNC 0x18C = 0x0
[ 360.244293] MIPI CSI2 HC VID_SYNC_FP 0x190 = 0x0
[ 360.249459] MIPI CSI2 HC VID_HSYNC 0x194 = 0x0
[ 360.254628] MIPI CSI2 HC VID_HSYNC_BP 0x198 = 0x0
[ 360.264536] mcu_cam_stream_on 2121MCU Stream On Success !!
[ 360.304210] Func mx6s_csi_irq_handler Line 1115 irq status - 0x0 cr3 frame counter - 0x0.
[ 360.312437] Func mx6s_csi_irq_handler Line 1121 irq status - 0x82234000 cr3 frame counter - 0x10a0.
[ 360.364053] MIPI CSI2 HC register dump, mipi csi0
[ 360.368934] MIPI CSI2 HC num of lanes 0x100 = 0x1
[ 360.374273] MIPI CSI2 HC dis lanes 0x104 = 0xc
[ 360.379453] MIPI CSI2 HC BIT ERR 0x108 = 0x80
[ 360.384710] MIPI CSI2 HC IRQ STATUS 0x10C = 0x3f
[ 360.389965] MIPI CSI2 HC IRQ MASK 0x110 = 0x1ff
[ 360.395305] MIPI CSI2 HC ULPS STATUS 0x114 = 0x0
[ 360.400472] MIPI CSI2 HC DPHY ErrSotHS 0x118 = 0x0
[ 360.405694] MIPI CSI2 HC DPHY ErrSotSync 0x11c = 0x3
[ 360.410861] MIPI CSI2 HC DPHY ErrEsc 0x120 = 0x0
[ 360.416029] MIPI CSI2 HC DPHY ErrSyncEsc 0x124 = 0x0
[ 360.421197] MIPI CSI2 HC DPHY ErrControl 0x128 = 0x0
[ 360.426364] MIPI CSI2 HC DISABLE_PAYLOAD 0x12C = 0x0
[ 360.431530] MIPI CSI2 HC DISABLE_PAYLOAD 0x130 = 0x0
[ 360.436699] MIPI CSI2 HC IGNORE_VC 0x180 = 0x1
[ 360.441921] MIPI CSI2 HC VID_VC 0x184 = 0x1
[ 360.447091] MIPI CSI2 HC FIFO_SEND_LEVEL 0x188 = 0x40
[ 360.452344] MIPI CSI2 HC VID_VSYNC 0x18C = 0x0
[ 360.456008] Func mx6s_csi_irq_handler Line 1115 irq status - 0x0 cr3 frame counter - 0x0.
[ 360.456012] Func mx6s_csi_irq_handler Line 1121 irq status - 0x88034000 cr3 frame counter - 0x110a0.
[ 360.456024] Func mx6s_csi_irq_handler Line 1115 irq status - 0x0 cr3 frame counter - 0x0.
[ 360.456028] Func mx6s_csi_irq_handler Line 1121 irq status - 0x84084001 cr3 frame counter - 0x110a0.
[ 360.456030] Initial frame 0
[ 360.456032] Func mx6s_csi_irq_handler Line 1175.
[ 360.499761] MIPI CSI2 HC VID_SYNC_FP 0x190 = 0x0
[ 360.505025] MIPI CSI2 HC VID_HSYNC 0x194 = 0x0
CAPTURE: VIDIOC_STREAMON SUCCESS
[ 360.510192] MIPI CSI2 HC VID_HSYNC_BP 0x198 = 0x0
CAPTURE: setExposure to 1 SUCCESS.... 8133 us
[ 360.515437] status - 0x80004000 cr18 - 0x5442d000 cr3 frame counter - 0x0 cr1 - 0x20902
CAPTURE: setExposure to 1 SUCCESS.... 8648 us
[ 360.523628] status - 0x8a224000 cr18 - 0xd44ad000 cr3 frame counter - 0x110a0 cr1 - 0x11b0902
[ 360.532334] Func = mx6s_vidioc_dqbuf
[ 360.536029] vb2-core: vb2_core_dqbuf: returning done buffer
[ 360.541720] vb2-core: vb2_core_dqbuf: dqbuf of buffer 0, with state 0

 

In Non working case

After few stop and start streaming not receiving any interrupts

Debug prints

[ 474.214187] Func = mx6s_vidioc_streamon
[ 474.218195] Function mx6s_videobuf_queue Line 720
[ 474.223016] Function mx6s_videobuf_queue Line 720
[ 474.227892] Function mx6s_videobuf_queue Line 720
[ 474.232712] Function mx6s_start_streaming Line 910
[ 474.237673] Function mx6s_start_streaming Line 914
[ 474.260982] vb2-core: vb2_core_streamon: successful
[ 474.265931] MIPI CSI2 HC register dump, mipi csi0
[ 474.270757] MIPI CSI2 HC num of lanes 0x100 = 0x1
[ 474.275926] MIPI CSI2 HC dis lanes 0x104 = 0xc
[ 474.281149] MIPI CSI2 HC BIT ERR 0x108 = 0x80
[ 474.286467] MIPI CSI2 HC IRQ STATUS 0x10C = 0x3f
[ 474.291722] MIPI CSI2 HC IRQ MASK 0x110 = 0x1ff
[ 474.297067] MIPI CSI2 HC ULPS STATUS 0x114 = 0x0
[ 474.302235] MIPI CSI2 HC DPHY ErrSotHS 0x118 = 0x0
[ 474.304854] Func mx6s_csi_irq_handler Line 1115 irq status - 0x0 cr3 frame counter - 0x0.
[ 474.304859] Func mx6s_csi_irq_handler Line 1121 irq status - 0x80014000 cr3 frame counter - 0x10a0.
[ 474.324686] MIPI CSI2 HC DPHY ErrSotSync 0x11c = 0x0
[ 474.329855] MIPI CSI2 HC DPHY ErrEsc 0x120 = 0x0
[ 474.335074] MIPI CSI2 HC DPHY ErrSyncEsc 0x124 = 0x0
[ 474.340242] MIPI CSI2 HC DPHY ErrControl 0x128 = 0x0
[ 474.345408] MIPI CSI2 HC DISABLE_PAYLOAD 0x12C = 0x0
[ 474.350575] MIPI CSI2 HC DISABLE_PAYLOAD 0x130 = 0x0
[ 474.355741] MIPI CSI2 HC IGNORE_VC 0x180 = 0x1
[ 474.360907] MIPI CSI2 HC VID_VC 0x184 = 0x1
[ 474.366074] MIPI CSI2 HC FIFO_SEND_LEVEL 0x188 = 0x40
[ 474.371328] MIPI CSI2 HC VID_VSYNC 0x18C = 0x0
[ 474.376495] MIPI CSI2 HC VID_SYNC_FP 0x190 = 0x0
[ 474.381663] MIPI CSI2 HC VID_HSYNC 0x194 = 0x0
[ 474.386891] MIPI CSI2 HC VID_HSYNC_BP 0x198 = 0x0
[ 474.397894] mcu_cam_stream_on 2121MCU Stream On Success !!
[ 474.415306] Func mx6s_csi_irq_handler Line 1115 irq status - 0x0 cr3 frame counter - 0x0.
[ 474.423533] Func mx6s_csi_irq_handler Line 1121 irq status - 0x82234000 cr3 frame counter - 0x10a0.
[ 474.487545] MIPI CSI2 HC register dump, mipi csi0
[ 474.492491] MIPI CSI2 HC num of lanes 0x100 = 0x1
[ 474.497665] MIPI CSI2 HC dis lanes 0x104 = 0xc
[ 474.502833] MIPI CSI2 HC BIT ERR 0x108 = 0x0
[ 474.508001] MIPI CSI2 HC IRQ STATUS 0x10C = 0x3f
[ 474.513255] MIPI CSI2 HC IRQ MASK 0x110 = 0x1ff
[ 474.518598] MIPI CSI2 HC ULPS STATUS 0x114 = 0x0
[ 474.523765] MIPI CSI2 HC DPHY ErrSotHS 0x118 = 0x0
[ 474.528932] MIPI CSI2 HC DPHY ErrSotSync 0x11c = 0x3
[ 474.534099] MIPI CSI2 HC DPHY ErrEsc 0x120 = 0x0
[ 474.539321] MIPI CSI2 HC DPHY ErrSyncEsc 0x124 = 0x0
[ 474.544489] MIPI CSI2 HC DPHY ErrControl 0x128 = 0x0
[ 474.549712] MIPI CSI2 HC DISABLE_PAYLOAD 0x12C = 0x0
[ 474.554879] MIPI CSI2 HC DISABLE_PAYLOAD 0x130 = 0x0
[ 474.560098] MIPI CSI2 HC IGNORE_VC 0x180 = 0x1
[ 474.565264] MIPI CSI2 HC VID_VC 0x184 = 0x1
[ 474.570431] MIPI CSI2 HC FIFO_SEND_LEVEL 0x188 = 0x40
[ 474.575684] MIPI CSI2 HC VID_VSYNC 0x18C = 0x0
[ 474.580851] MIPI CSI2 HC VID_SYNC_FP 0x190 = 0x0
[ 474.586017] MIPI CSI2 HC VID_HSYNC 0x194 = 0x0
CAPTURE: VIDIOC_STREAMON SUCCESS
[ 474.591236] MIPI CSI2 HC VID_HSYNC_BP 0x198 = 0x0
[ 474.596479] status - 0x80004000 cr18 - 0x5442d000 cr3 frame counter - 0x0 cr1 - 0x20902
CAPTURE: setExposure to 1 SUCCESS.... 8188 us
CAPTURE: setExposure to 1 SUCCESS.... 8560 us
[ 474.604733] status - 0x80224000 cr18 - 0xd44ad000 cr3 frame counter - 0x10a0 cr1 - 0x11b0902
[ 474.613355] Func = mx6s_vidioc_dqbuf
[ 474.616930] vb2-core: __vb2_wait_for_done_vb: will sleep waiting for buffers

 

Observation

In working case we receiving SOF interrupt then Frame done interrupt in mx6s_csi_irq_handler function but in non working case we didn't receive such interrupts.

Request

Is there any way to debug further and get error messages or error registers values from csi layers. At least to know exact reason for not receiving frames from platform side after continuous stop and start stream.

 

 

0 Kudos
1 Reply

631 Views
igorpadykov
NXP Employee
NXP Employee

Hi saideepak_r

 

additional document was sent you via mail.

 

Best regards
igor

0 Kudos