cancel
Showing results for 
Search instead for 
Did you mean: 

DCMI resolution on STM32MP157c ?

Ronte.1
Associate II

I'm trying to use an ADV7280 videodecoder with DCMI and embedded linux on a board based on STM32157c-dk2. The decoder should output 720x576 picture resolution with the camera (PAL,CV) attached. However the DCMI seems to be in 'normal mode' which allows max 480x272 resolution based on app. note AN5020. How to change mode to circular buffer mode which should allow higher resolutions? I haven't found any linux device tree setups for that. Some settings for dma or dcmi ? Examples?

7 REPLIES 7
PatrickF
ST Employee

Hi,

Have you looked to https://wiki.st.com/stm32mpu/wiki/DCMI_device_tree_configuration#DT_configuration_examples

and https://wiki.st.com/stm32mpu/wiki/V4L2_camera_overview ?

Camera sensor connected to DCMI is available on EV1 board with running example in starter package.

Under Linux, DCMI performance is constrained by HW and SW and effective resolution and frame-rate is limited.

Was tested ok with few resolution and frame rate, e.g. 720x480 @30fps, 1280x720 @27fps, so 720x576 should be ok @30fps.

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Ronte.1
Associate II

Yes the example in starter package works ok. Maybe the issue is some linux driver problem? I have used the driver adv7180 which should be ok with adv7280. If I try to change the resolution with v4l2-ctl, it doesn't change. And adv7180 sub device driver for stm32-dcmi does not announce "not using libv4l2" as the EV1 does with ov5640 driver.

Ronte.1
Associate II

When trying to start a capture with Gstreamer there are error messages : "dma dma0chan2: nb items not supported" and "stm32-dcmi 4c006000.dcmi: dcmi_start_dma: DMA dmaengine_prep_slave_single failed for buffer phy=0xc7c00000 size=691200" . It seems that it has something to do with memory allocation. I haven't found the reason why these drivers are acting differently (adv7180 vs. ov5640)

Ronte.1
Associate II

Is anyone using a camera with DCMI other than ov5640 or some videodecoder?

OlivierK
ST Employee

Hello Ronte.1 (Community Member),

Did you manage to change the resolution with v4l2-ctl? The FPS and resolution needs to be explicitely mentionned in the driver.

There is an app note AN5470 (still using the OV5640 but via the STMIPID02 MIPI CSI2 deserializer), it gives also some debugging tips with a new sensor.

Regarding Gtreamer issues, please refer to https://wiki.st.com/stm32mpu/wiki/Gst-play

gtksink offers slow performance since it supports only RGB 32-bit and does not provide DMA buffer pool so that extra frame copy kills performance.

Regards,

Ronte.1
Associate II

The driver is setting fixed resoltution 720x576 and FPS 25Hz. If I try to change the resolution with v4l2-ctl it doesn't change. If I try to capture video with gst-launch-1.0 I get errors mentioned above.

Dat Tran
Senior II

Hi, 

I have same issue, capture 480x272 or smaller seems find, but higher then I have same error message:

""dma dma0chan2: nb items not supported" and "stm32-dcmi 4c006000.dcmi: dcmi_start_dma: DMA dmaengine_prep_slave_single failed for buffer..."

 

did you find the solution for this issue?