2023-11-26 04:15 AM - last edited on 2023-11-27 04:58 AM by KDJEM.1
Hi Community!
I managed to communicate between the STM32-L4A6 (Nucleo-L4A6ZG) and the OV5640 camera module. I can read the camera's ID, set its modes, and even get image data. But there's a problem: the characters in the data I receive turn into unreadable data at some point (check the video link). Initially, everything looks good, but then it gets messy.
My goal is to send this data to the computer terminal using LUPART. If anyone knows why this is happening or how to fix it, I'd really appreciate the help.
Thank you in advance!
2023-11-27 05:26 AM
Hi @nicola3 ,
I' m not able to download an to see the video. Could you please share a screenshot ?
I advise you to take a look to this discussion.
Thank you.
Kaouthar.
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.
2023-11-27 05:34 AM
Hi @KDJEM.1
I'm sorry for the inconvenience. Attached i try it differently but also there are also photos for better understanding.
https://www.icloud.com/iclouddrive/0c9KNk1Qw5IJUURcZClG-pCyw#Screen_Recording_2023-11-23_at_16.32
Thank you very much for your help!
Best regards,
Nicola
2023-11-27 06:25 AM
Hi @nicola3 ,
Please make sure that data are saved in DMA before starting send via LPUART.
Do you have any issue after converting data to the image?
As mentioned in this discussion, if you're just sending data over terminal, you aren't going to show anything useful in the terminal.
Thank you.
Kaouthar
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.
2023-11-29 01:21 AM
Hi @KDJEM.1
Thank you for your support. This is my first project with STM and I'm a little bit overwhelmed.
I don't know how to converting this data into an image and how to save it to the DMA. Do you know how I should be able to do that?
Thank you in advance!
Best regards,
Nicola
2023-11-29 02:18 AM
Hello @nicola3 ,
Thank you for updating post.
This is my first project with STM and I'm a little bit overwhelmed.
To start with DCMI, I recommend you to take a look to Introduction to digital camera interface (DCMI) for STM32 MCUs Application note. This application note gives to the STM32 users some basic concepts, with easy-to-understand explanations of the features, architecture, and configuration of the DCMI. It is supported by an extensive set of detailed examples (section 8 DCMI application examples).
I don't know how to converting this data into an image and how to save it to the DMA.
You can start from available examples and get inspired to create your own project for example:
To display your image on LCD, DCMI_CaptureMode example can help you. This application descripts how to use the DCMI to interface with a camera module to continuously capture RGB565 images, crop them from size 320x240 to 240x240 then display the video stream on the LCD.
To display capture data or video on your computer display, this example can help you: FP-AI-VISION1_V3.1.0\Projects\STM32H747I-DISCO\Applications\USB_Webcam in FP-AI-VISION1 package.
I hope this help you!
Thank you.
Kaouthar
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.
2023-11-30 05:39 AM
Hi @KDJEM.1
Thank you for your response! I'm trying to get the project "DCMI_CaptureMode" running but I cannot find the wiring diagram for the LCD display.
Do you know where I can find it?
Thank you very much and have a nice day!
Best regards,
Nicola
2023-12-10 04:58 AM
Hi @KDJEM.1
I managed to run it and also to get a JPEG file. Unfortunately, the jpeg converter is not able to translate it to an image.
I think maybe there is a problem with the clock speed.
Do you have an idea what else could be the problem?
BR
Nicola
2023-12-10 07:18 AM
Are you able to see / sync on the JFIF headers?
https://en.wikipedia.org/wiki/JPEG_File_Interchange_Format
Should be able to cross check headers, data lengths and structures as the data streams over the DCMI connection.
2023-12-10 01:39 PM
Hey @Tesla DeLorean
yes i can see the FFD8 and the FFD9 in the data. The FFD9 is always the last one but the FFD8 is sometimes in the middle of the data stream and sometimes somewhere else. It doesn’t make sense.
Do you know what the problem could be? Is it a clock setting problem?
BR
Nicola