I found the problem. The device I am using, a camera module OV9655, requires an input clock. I was using MCO1, with PLLCLK/4. When I checked the signal I saw that the output looked more like noise than an actual clock. Then, I changed it to output the clock from HSI and it worked.
PS: I am using STM32F4-Discovery