i.MX6 IPU CSI capture via IC fails with IC_ENC_FRM_LOST_ERR

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

i.MX6 IPU CSI capture via IC fails with IC_ENC_FRM_LOST_ERR

跳至解决方案
1,605 次查看
baruchsiach
Contributor II

Hi i.IMX community,

I'm trying to capture a video stream on the i.MX6 SABRE Smart Devices board from IPU CSI via IC and IDMAC (channel 20) to RAM. I'm using a slightly modified version of the OV5640 driver that makes the camera stream the frames in RGB format. I'm configuring the IC encoder task to convert from RGB to YUV for later processing by the VPU.

This setup works nicely under Linux. My target OS however is GHS Integrity. I can capture raw RGB frames when I use the SMFC and IDMAC (channel 0). But whenever I enable the IC encoder I see no EOF interrupt, but the IC_ENC_FRM_LOST_ERR status bit (INT_STAT_10) turns on.

Now before anyone asks, I know that the OV5640 camera can give me YUV directly. But my target application must support both YUV and RGB CSI capture. So I'm trying to simulate RGB capture on the SABRE Smart Devices board. I must convert the data to YUV since the VPU encoder only supports YUV input.

I verified that the configuration of ALL IPU registers is identical in both Linux and Integrity. I actually dumped the entire registers address space to be sure.

I would appreciate if anyone can shed some light on this IC_ENC_FRM_LOST_ERR status bit, or provide any other help.

Thanks,

baruch

标签 (2)
0 项奖励
回复
1 解答
1,138 次查看
baruchsiach
Contributor II

Hi i.MX community,

Just to answer my own question: one of IPUx_CH_BUFx_RDY0 bits for channel 20 must be enabled. Otherwise the IC_ENC_FRM_LOST_ERR error is asserted. For some reason SMFC work anyway, but IC does not.

One more thing: double buffering must be enabled in IDMAC. Single buffer doesn't work.

baruch

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,139 次查看
baruchsiach
Contributor II

Hi i.MX community,

Just to answer my own question: one of IPUx_CH_BUFx_RDY0 bits for channel 20 must be enabled. Otherwise the IC_ENC_FRM_LOST_ERR error is asserted. For some reason SMFC work anyway, but IC does not.

One more thing: double buffering must be enabled in IDMAC. Single buffer doesn't work.

baruch

0 项奖励
回复
1,138 次查看
Yuri
NXP Employee
NXP Employee

Hello,

  From section 38.4.12.3 (Interrupt Generator) of the i.MX6 DQ Reference Manual :

The table below describes the error interrupts. The panic column indicates if

this signal is part of the logic generating the ipu_panic signal. The ipu_panic

signal can be used for indicating about errors that are result of data rate

  1. problems. Such problems may be a result of the IPU running in slower clock then

required by the use case. This signal can be used in order to indicate the

system that the IPU can't handle the desired data rate. In that case the system

may need to increase the clock to the IPU or simplify the use case.

   So, looks like we have here performance problem. Please try to decrease screen

resolution and / or frame rate. Also, other system resource consuming processes,

such as USB / SD / SATA transfer, may affect. As result a general performance

issue may take place in the case.

Perhaps it makes sense to try system prioritization (such as provided by Linux

nice command).

Also, You may refer to the next thread :

Re: To find the root cause of i.MX6Q IPU error interrupt. 


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
1,138 次查看
baruchsiach
Contributor II

Hi Yuri,

Thanks for your answer.

The capture data rate the I am testing is very low, 640x480@20fps. Just to test this theory I further reduced fps to ridiculously low 10fps (by tweaking OV5640 register 0x3036), but the same error persists. Under Linux I have no problem capturing at the original rate.

The video capture test task is the only actively running task in the system, so I would not suspect resources shortage.

Do you have any other suggestion?

Thanks again,

baruch

0 项奖励
回复