cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX DCMI Question re VSYNC Iterrupts

Sidlauskas.David
Associate II
Posted on June 25, 2015 at 22:35

I used CubeMX to create a DCMI camera interface project for the F407 Discovery board. Just after MX_DCMI_Init is called, a VSYNC interrupt is generated. After that VSYNC ints are turned off and no DCMI operations occur.

This is not surprising since the VSYNC ISR disables this interrupt.

      /* Disable the VSYNC interrupt */

      __HAL_DCMI_DISABLE_IT(hdcmi, DCMI_IT_VSYNC);   

I've searched through the product code and can find no place other than in MX_DCMI_Init that this interrupt is enabled.

I've looked as the DCMI example project for the F4xxG EVAL board and it has the same code with no obvious code that re-enables the interrupt. I assume this example works, and it can't without VSYNC interrupts being re-enabled, so my question is:

How does the VSYNC interrupt get re-enabled in CubeMX generated code or the F4 Eval board example code, once it is disabled by its ISR ?

Thanks for your help,

Dave
2 REPLIES 2
hbarta2
Associate III
Posted on June 25, 2015 at 22:53

Have you tried reenabling it in your callback?

I think this is what you need to do.

Sidlauskas.David
Associate II
Posted on June 26, 2015 at 00:26

Thanks for the quick response Hank. I'll try that.

The curious thing is that the EVAL board example gives the same treatment to the end of frame interrupt, it's disabled and never re enabled.  In this example, the end of frame callback updates the LCD with the camera image. With the end of frame interrupt off, only the first image would go to the LCD. The callback does not re-enable any interrupts.

Either I'm missing something or the example code is broken, I think.

Thanks,

Dave