evkmimxrt1170_csi_mipi_rgb_cm7 Question

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

evkmimxrt1170_csi_mipi_rgb_cm7 Question

1,127 Views
fmabrouk
Contributor III

I am using this demo code evkmimxrt1170_csi_mipi_rgb_cm7 for the new imX RT1170. In my application I dont need to do any frame buffers streaming to the LCD, I just need to take a single image(one frame buffer at time) whenever I need to.

since I don't need a display LCD, I commented out this function: DEMO_InitDisplay() and as a result I could not see any CSI interrupts generated. The code was always waiting on a buffer to get full. What is it in that function that disable the CSI from filling up the buffers. 

Could someone help me get rid of all unnecessary code so that it fits only my design need as I described above.

0 Kudos
6 Replies

1,118 Views
fmabrouk
Contributor III

Can anybody support on this question, or this MCU is not supported yet?

Thank you!

0 Kudos

1,109 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi fmabrouk,

This is because MIPI CSI initialize function doesn't enable the MIPIPHY power. MIPI DSI initialize function enable the MIPI power. Please add this code after line 157 in camera_support.c.

    PGMC_BPC4->BPC_POWER_CTRL |= (PGMC_BPC_BPC_POWER_CTRL_PSW_ON_SOFT_MASK | PGMC_BPC_BPC_POWER_CTRL_ISO_OFF_SOFT_MASK);

 

Regards,

Jing 

0 Kudos

1,101 Views
fmabrouk
Contributor III

Hi Jin!

Thank you so much for your help. Now I am able to get rid of all the display configuration code. However, I have 2 more questions if you don't mind.

1. I would like to have 3 bytes per pixel in this buffer uint8_t s_cameraBuffer instead of 4 bytes. Is there any builtin function to convert 32 bits to 24 bits or is there any configuration to do that makes the CSI fill the camera buffers with 3 bytes per pixel data instead of 4 bytes.

2. The demo code is setup such that a frame buffer is filled with new image data 30 times per sec (30 frames/sec.) In my application, I want to control the moment when to capture an image. I would like to use a timer interrupt or an external GPIO interrupt to trigger an event that will start the camera, capture a single frame buffer, and then stops the camera.

Could you please suggest how I can change your demo code to achieve what I want?

Thanks!!

0 Kudos

1,086 Views
fmabrouk
Contributor III

Can someone get back to me about my above question?

Thank you!

0 Kudos

1,072 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

1. CSI can only support 4 byte RGB888 with packing a dummy byte. You can remove the dummy byte by software.

2. The demo use CAMERA_DEVICE_Start() and CAMERA_DEVICE_Stop() to control camera. You can try it.

 

Regards,

Jing

0 Kudos

894 Views
Abisheikv2
Contributor III

@jingpan I've to get YUV422 from OV5640 via MIPI-CSI2.It is 2bytes/pixel. Is there any possible way to get data as such without padding extra two bytes?

0 Kudos