Fixed camera sampling bug

master
Sven Steudte 2018-01-13 22:09:58 +01:00
rodzic 955c33a2f8
commit 09c1ff92dc
2 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -1111,9 +1111,9 @@ bool OV5640_Capture(uint8_t* buffer, uint32_t size)
*/
void OV5640_InitGPIO(void)
{
palSetLineMode(LINE_CAM_PCLK, PAL_MODE_ALTERNATE(3));
palSetLineMode(LINE_CAM_PCLK, PAL_MODE_ALTERNATE(3) | PAL_STM32_OSPEED_HIGHEST);
palSetLineMode(LINE_CAM_VSYNC, PAL_MODE_INPUT_PULLUP | PAL_STM32_OSPEED_HIGHEST);
palSetLineMode(LINE_CAM_XCLK, PAL_MODE_ALTERNATE(0));
palSetLineMode(LINE_CAM_XCLK, PAL_MODE_ALTERNATE(0) | PAL_STM32_OSPEED_HIGHEST);
palSetLineMode(LINE_CAM_D2, PAL_MODE_INPUT_PULLUP | PAL_STM32_OSPEED_HIGHEST);
palSetLineMode(LINE_CAM_D3, PAL_MODE_INPUT_PULLUP | PAL_STM32_OSPEED_HIGHEST);
palSetLineMode(LINE_CAM_D4, PAL_MODE_INPUT_PULLUP | PAL_STM32_OSPEED_HIGHEST);

Wyświetl plik

@ -48,12 +48,12 @@
#define STM32_PLLSRC STM32_PLLSRC_HSI
#define STM32_PLLM_VALUE 16
#define STM32_PLLN_VALUE 192
#define STM32_PLLP_VALUE 2
#define STM32_PLLP_VALUE 4
#define STM32_PLLQ_VALUE 4
#if ACTIVATE_USB /* Activate 48MHz when USB is activated, otherwise 6MHz */
#define STM32_HPRE STM32_HPRE_DIV1
#define STM32_HPRE STM32_HPRE_DIV2
#else
#define STM32_HPRE STM32_HPRE_DIV1
#define STM32_HPRE STM32_HPRE_DIV2
#endif
#define STM32_PPRE1 STM32_PPRE1_DIV2
#define STM32_PPRE2 STM32_PPRE2_DIV2