2017-02-19 11:59 AM
Hi all,
I'm trying to use the camera
STM32F4DIS-CAM
with my STM32F7 Discovery board, with Keil uVision IDE. I have downloaded STM32Cube, and in the examples there is a BSP directory, with BSP drivers examples, including a camera.c for the camera. All the drivers are working well (LCD, Touchscreen, audio, sram...), but the programm stops when the Camera example starts. It seems that the initialization is OK, I can see 'QQVGA camera stream', but then nothing happens, the stream is only a white screen, and the touch actions do not work (change brighness, contrast...). The 'user button' also do not work anymore...Do you have an idea of the way I should follow to solve such problem?
Thank you.
Best regards,
Solved! Go to Solution.
2017-03-01 11:11 AM
Hi all,
I have finally found a solution: it seems that the stm32f7xx_it.c (version 1.1.0) in the BSP camera example of STMCube for STM32F7 is badly written. As a conclusion, the programm goes into infinite loop and the screen is white.
For my solution, all the changes have to be done in stm32f7xx_it.c file (maybe ST should modify the file included in the STMCube_FW_F7 package):
1. at the beginning of the file, include the camera handler with
/* Camera handler declared in 'stm32746g_discovery_camera.c' file */
extern DCMI_HandleTypeDef hDcmiHandler;2. Modify the function DMA2_Stream1_IRQHandler as follows:
void DMA2_Stream1_IRQHandler(void)
{ //BSP_CAMERA_DMA_IRQHandler(); HAL_DMA_IRQHandler(hDcmiHandler.DMA_Handle);}3. Modify the function DCMI_IRQHandler as follows:
void DCMI_IRQHandler(void)
{ //BSP_CAMERA_IRQHandler(); HAL_DCMI_IRQHandler(&hDcmiHandler);}Everything works fine now for me. Hope it will help.
(Thanks to Aditya Manglik web site, it gives some interesting hints!)
Best regards,
Xavier
2017-02-22 10:42 AM
Hi
cachan.xav
,Maybe you should check and look more carefully atyour configuration. Then,I suggest you to debug, localize where the code hangs/stop,and the kind of message gives.
This will help toidentify what is the problem that you have.
Otherwise, you can share your code and debugger screenshot,thatwillbe easier for user forum to understand the issue andhelp you.
PleaseKeep me informed about your progresson this problem.
Regards
Imen
2017-02-22 01:09 PM
Thank you Imen for your answer ! I am so happy that someone tries to help !
For my project, I have only downloaded STM32Cube package, and opened the
uVision STM example proposed in the BSP directory. Then I have just
validated the camera.c in the main file, connected the camera to the
board, and tried to execute the code. Nothing else has been changed in
the configuration, so I do not understand what can be wrong.
I have tried to debug, please see the attached file. It seems that the
programm calls DMA2_Stream1 IRQ, but the corresponding ASM code shows
that we then stay in an infinite loop (instruction in 0x08001dD4C is
branch on ... 0x08001D4C).
If you have any idea...
Thank you again.
Best regards,
Xavier
Le 22/02/2017 à 19:45, IMEN D a écrit :
>
STMicroelectronics Community
<https://community.st.com/?et=watches.email.thread>
>
Re: STM32F4 Camera with STM32F7 Discovery board?
reply from IMEN D
<https://community.st.com/people/DAHMEN.IMEN?et=watches.email.thread>
in /STM32 MCUs Forum/ - View the full discussion
<https://community.st.com/message/147463-re-stm32f4-camera-with-stm32f7-discovery-board?commentID=147463&et=watches.email.thread#comment-147463>
>
________________ Attachments : Camera_infinite_loop.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hytf&d=%2Fa%2F0X0000000bDd%2FBecdyj_DeujI8ltyj4OZQ3PulFA3i6GABagZeNfMHB4&asPdf=false2017-02-27 01:49 AM
Hi
Cachan.Xav
,Any progress with this issue...????
I have a similar problem with my STM32479I-Eval and the Camera Examples provided in STM32Cube_FW_F4_V1.0
https://community.st.com/0D50X00009XkasmSAB
Best Regards,
Sergio
2017-02-27 10:40 AM
,
,
Hi Sergio,
No, I am still trying to find why it does not work...
:(
Best regards,
Xavier
Le 27/02/2017 à 10:50, martin.sergio a écrit :
>,
STMicroelectronics Community
<,https://community.st.com/?et=notification.mention>,
>,
You have been mentioned
by martin.sergio
<,
/in Re: STM32F4 Camera with STM32F7 Discovery board? in
STMicroelectronics Community/ - View martin.sergio's reference to you
<,https://community.st.com/0D70X000006SRhfSAG
>,
2017-03-01 11:11 AM
Hi all,
I have finally found a solution: it seems that the stm32f7xx_it.c (version 1.1.0) in the BSP camera example of STMCube for STM32F7 is badly written. As a conclusion, the programm goes into infinite loop and the screen is white.
For my solution, all the changes have to be done in stm32f7xx_it.c file (maybe ST should modify the file included in the STMCube_FW_F7 package):
1. at the beginning of the file, include the camera handler with
/* Camera handler declared in 'stm32746g_discovery_camera.c' file */
extern DCMI_HandleTypeDef hDcmiHandler;2. Modify the function DMA2_Stream1_IRQHandler as follows:
void DMA2_Stream1_IRQHandler(void)
{ //BSP_CAMERA_DMA_IRQHandler(); HAL_DMA_IRQHandler(hDcmiHandler.DMA_Handle);}3. Modify the function DCMI_IRQHandler as follows:
void DCMI_IRQHandler(void)
{ //BSP_CAMERA_IRQHandler(); HAL_DCMI_IRQHandler(&hDcmiHandler);}Everything works fine now for me. Hope it will help.
(Thanks to Aditya Manglik web site, it gives some interesting hints!)
Best regards,
Xavier
2017-04-21 01:52 PM
Cachan.Xav
,Thank you so much for your fix to ST’s buggy BSP camera code.
I quickly diagnosed the problem since the two IRQs in question recursively call themselves until they runs out of memory.
However the solution was not obvious to me until I found your post.
It is a shame that such a reputable company as ST publishes buggy and untested sample code that wastes other people’s time and money!