我将imx8mq evk csi相关驱动移植到其他的开发环境中,但出现了Rx fifo overflow和base address switching Change Err问题。错误日志如下:
[ 12.750478 00] INF irq handled status is 80014000
[ 12.783811 00] INF irq handled status is 80014000
[ 12.788445 00] INF irq handled status is 81244001
[ 12.793415 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 1
[ 12.799959 00] INF irq handled status is 83264001
[ 12.804926 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 1
[ 12.817148 00] INF irq handled status is 80254001
[ 12.850484 00] INF irq handled status is 80254001
[ 12.855118 00] INF irq handled status is 91244001
[ 12.860088 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 1
[ 12.866632 00] WRN base address switching Change Err.
[ 12.871948 00] INF irq handled status is 83264001
[ 12.876918 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 1
[ 12.883821 00] INF irq handled status is 80254001
[ 12.917158 00] INF irq handled status is 80254001
[ 12.921791 00] INF irq handled status is 81244001
[ 12.926761 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 1
[ 12.933305 00] INF irq handled status is 83264001
[ 12.938272 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 1
[ 12.950494 00] INF irq handled status is 80254001
[ 12.983831 00] INF irq handled status is 80254001
[ 12.988464 00] INF irq handled status is 91244001
[ 12.993434 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 1
[ 12.999978 00] WRN base address switching Change Err.
[ 13.005295 00] INF irq handled status is 83264001
[ 13.010265 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 1
[ 13.017167 00] INF irq handled status is 80254001
[ 13.050504 00] INF irq handled status is 80254001
[ 13.055138 00] INF irq handled status is 81244001
[ 13.060108 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 1
[ 13.066651 00] INF irq handled status is 83264001
[ 13.071619 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 1
[ 13.083840 00] INF irq handled status is 80254001
[ 13.117177 00] INF irq handled status is 80254001
[ 13.121811 00] INF irq handled status is 91244001
[ 13.126781 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 1
[ 13.133324 00] WRN base address switching Change Err.
[ 13.138641 00] INF irq handled status is 83264001
[ 13.143611 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 1
[ 13.150514 00] INF irq handled status is 80254001
[ 13.183850 00] INF irq handled status is 80254001
[ 13.188484 00] INF irq handled status is 81244001
[ 13.193454 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 2
[ 13.199997 00] INF irq handled status is 83264001
[ 13.204965 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 2
[ 13.217187 00] INF irq handled status is 80254001
[ 13.250523 00] INF irq handled status is 80254001
[ 13.255157 00] INF irq handled status is 91244001
[ 13.260127 00] WRN mx6s_csi_irq_handler Rx fifo overflow frame is 2
[ 13.266670 00] WRN base address switching Change Err.
查看了社区的相关帖子,没有找到合适的解决方法。
csi bridge的register dump如下:
[ 7067.661479 00] INF CSI Control Register 1 is 11b0902
[ 7067.666461 00] INF CSI Control Register 2 is c0000000
[ 7067.671693 00] INF CSI Control Register 3 is 10a8
[ 7067.676664 00] INF CSI Control Register CSI RX Count Register is 9600
[ 7067.683378 00] INF CSI Status Register is 80004000
[ 7067.688523 00] INF CSI DMA Start Address Register is 0
[ 7067.693930 00] INF CSI DMA Transfer Size Register is 0
[ 7067.699336 00] INF CSI DMA Start Address Register FB1 is c03bc8e8
[ 7067.705615 00] INF CSI DMA Start Address Register FB2 is c00388e8
[ 7067.711981 00] INF CSI Frame Buffer Parameter Register is 0
[ 7067.717824 00] INF CSI Image Parameter Register is 50002d0
[ 7067.723666 00] INF CSI Control Register 18 is bc4ad030
mipi-csi2的register dump如下:
[ 12.611307 00] INF MIPI CSI2 HC num of lanes 0x100 = 0x1
[ 12.617760 00] INF MIPI CSI2 HC dis lanes 0x104 = 0xc
[ 12.624300 00] INF MIPI CSI2 HC BIT ERR 0x108 = 0x0
[ 12.630841 00] INF MIPI CSI2 HC IRQ STATUS 0x10C = 0x8
[ 12.637381 00] INF MIPI CSI2 HC IRQ MASK 0x110 = 0x1ff
[ 12.644270 00] INF MIPI CSI2 HC ULPS STATUS 0x114 = 0x0
[ 12.650810 00] INF MIPI CSI2 HC DPHY ErrSotHS 0x118 = 0x0
[ 12.657351 00] INF MIPI CSI2 HC DPHY ErrSotSync 0x11c = 0x0
[ 12.663891 00] INF MIPI CSI2 HC DPHY ErrEsc 0x120 = 0x0
[ 12.670431 00] INF MIPI CSI2 HC DPHY ErrSyncEsc 0x124 = 0x0
[ 12.676971 00] INF MIPI CSI2 HC DPHY ErrControl 0x128 = 0x0
[ 12.683512 00] INF MIPI CSI2 HC DISABLE_PAYLOAD 0x12C = 0x0
[ 12.690052 00] INF MIPI CSI2 HC DISABLE_PAYLOAD 0x130 = 0x0
[ 12.696592 00] INF MIPI CSI2 HC IGNORE_VC 0x180 = 0x1
[ 12.703132 00] INF MIPI CSI2 HC VID_VC 0x184 = 0x1
[ 12.709672 00] INF MIPI CSI2 HC FIFO_SEND_LEVEL 0x188 = 0x40
[ 12.716387 00] INF MIPI CSI2 HC VID_VSYNC 0x18C = 0x0
[ 12.722927 00] INF MIPI CSI2 HC VID_SYNC_FP 0x190 = 0x0
[ 12.729468 00] INF MIPI CSI2 HC VID_HSYNC 0x194 = 0x0
[ 12.736008 00] INF MIPI CSI2 HC VID_HSYNC_BP 0x198 = 0x0
Hi 书意 程
such error may happen when frame switching occurs before DMA complete
to transfer the data. This base address switch is used only when receiving interlaced
data (like the signals from TV decoders). So may be suggested to check if used
camera uses interlaced format and set correctly camera video format.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
我当前用的是nxp OV5640摄像头。
您好!
我当前设置的是V4L2_FIELD_NONE。如果改成V4L2_FIELD_INTERLACED的话,不会有任何输出,csi bridge的中断也没有。