i am trying to get a new camera running on MX6Solo. I have the CSI running, and able to capture single-shots using a small console capture program (no gui, no preview). I.e. the route from camera to /dev/video0 seem OK.
I have also enabled the CSI test mode to generate a checker-board. I see this too when I capture with my little console program.
However; If I start the camera app on the phone, now involving Android and possibly preview, I get a kernel stop. A stop with no messages, no dump, nothing, it simply hangs!
The lights go out just after I do "ipu_cm_write(ipu, reg | IPU_CONF_CSI0_EN, IPU_CONF);" (ipu_common.c).
The strange thing is that my small capture program works ok. So I *suspect* it may be in regard with the preview or something else caused by Android.
So: In short: I enable CSI0, and the platform stops!
Any ideas are appreciated!
I have logged the following registers just prior to enabling CSI0: They look much the same as for my console capture. Only exception is: IPU_INT_CTRL(10) = 0x777F000F.
IPU_CONF = 0x000007A0
IDMAC_CONF = 0x0000002F
IDMAC_CHA_EN1 = 0x00800001
IDMAC_CHA_EN2 = 0x00000000
IDMAC_CHA_PRI1 = 0x18800001
IDMAC_CHA_PRI2 = 0x00000000
IDMAC_BAND_EN1 = 0x00000000
IDMAC_BAND_EN2 = 0x00000000
IPU_CHA_DB_MODE_SEL0 = 0x00000001
IPU_CHA_DB_MODE_SEL1 = 0x00000000
IPU_CHA_TRB_MODE_SEL0 = 0x00800000
IPU_CHA_TRB_MODE_SEL1 = 0x00000000
DMFC_WR_CHAN = 0x00000090
DMFC_WR_CHAN_DEF = 0x202020F6
DMFC_DP_CHAN = 0x00009694
DMFC_DP_CHAN_DEF = 0x2020F6F6
DMFC_IC_CTRL = 0x00000002
IPU_FS_PROC_FLOW1 = 0x00000000
IPU_FS_PROC_FLOW2 = 0x00000000
IPU_FS_PROC_FLOW3 = 0x00000000
IPU_FS_DISP_FLOW1 = 0x00000000
IPU_VDIC_VDI_FSIZE = 0x00000000
IPU_VDIC_VDI_C = 0x00000000
IPU_IC_CONF = 0x00000000
IPU_INT_CTRL(1) = 0x80000001
IPU_INT_CTRL(2) = 0x00080000
IPU_INT_CTRL(3) = 0x00000000
IPU_INT_CTRL(4) = 0x00000000
IPU_INT_CTRL(5) = 0xBFFEFF2F
IPU_INT_CTRL(6) = 0x001FFF02
IPU_INT_CTRL(7) = 0x00000000
IPU_INT_CTRL(8) = 0x00000000
IPU_INT_CTRL(9) = 0xDC000001
IPU_INT_CTRL(10) = 0x777F000E
IPU_INT_CTRL(11) = 0x00000000
IPU_INT_CTRL(12) = 0x00000000
IPU_INT_CTRL(13) = 0x00000000
IPU_INT_CTRL(14) = 0x00000000
IPU_INT_CTRL(15) = 0x00000000
IPU_SDMA(1) = 0x00000000
IPU_SDMA(2) = 0x00000000
IPU_SDMA(3) = 0x00000000
IPU_SDMA(4) = 0x00000000
IPU_SDMA(5) = 0x00000000
IPU_SDMA(6) = 0x00000000
IPU_SDMA(7) = 0x00000000
IPU_SDMA(8) = 0x00000000
IPU_SDMA(9) = 0x00000000
IPU_SDMA(10) = 0x00000000
IPU_SDMA(11) = 0x00000100
IPU_SDMA(12) = 0x06050803
IPU_SDMA(13) = 0x00000000
IPU_SDMA(14) = 0x00000000
IPU_SDMA(15) = 0x00000000
CSI information for csi0
CSI_CONF = 0x040A8818
CSI_SENS_FRM_SIZE = 0x01DF027F
CSI_ACT_FRM_SIZE = 0x01DF027F
CSI_OUT_FRM_CTRL = 0x00000000
CSI_TST_CTRL = 0x017FFF7F
Solved! Go to Solution.
You can reference to the Freescale Android BSP document, such as "i.MXAndroidJB4.2.2_1.1.0GAFAQ.html", for "How do I configure rear and front camera" and "how do I configure camera sensor parameters".
If you haven't added the camera sensor correctly, I think it will not get correct buffer for capture, then when enabled CSI, because no correct IDMAC memory address was set, kernel will hang up.
To Mads Meisner & Qiang Li
Tell me please how to read IPU registers (IPU_CONF and others)?
I tried such code
struct ipu_soc *ipu;
ipu = ipu_get_soc(0);
ipu_conf = ipu_cm_read(ipu, IPU_CONF);
It doesn't work
You can reference to the Freescale Android BSP document, such as "i.MXAndroidJB4.2.2_1.1.0GAFAQ.html", for "How do I configure rear and front camera" and "how do I configure camera sensor parameters".
If you haven't added the camera sensor correctly, I think it will not get correct buffer for capture, then when enabled CSI, because no correct IDMAC memory address was set, kernel will hang up.