Increased image sampling speed

Develop
Sven Steudte 2017-09-09 01:02:02 +02:00
rodzic a4087588fa
commit 423f88a671
1 zmienionych plików z 40 dodań i 37 usunięć

Wyświetl plik

@ -31,7 +31,7 @@ static const struct regval_list OV5640YUV_Sensor_Dvp_Init[] =
{ 0x3017, 0x7f },
{ 0x3018, 0xff },
{ 0x302c, 0x02 },
{ 0x3108, 0x31 },
{ 0x3108, 0x21 },
{ 0x3630, 0x2e },//2e
{ 0x3632, 0xe2 },
{ 0x3633, 0x23 },//23
@ -757,7 +757,7 @@ static const struct regval_list OV5640_QSXGA2XGA[] =
static ssdv_conf_t *ov5640_conf;
/* TODO: Implement a state machine instead of multiple flags. */
static bool LptimRdy;
static bool LptimRdy = false;
static bool capture_finished;
static bool vsync;
static bool dma_error;
@ -1083,7 +1083,7 @@ CH_IRQ_HANDLER(Vector5C) {
*/
dma_stop();
TIM1->DIER &= ~TIM_DIER_TDE;
LPTIM1->CR &= ~LPTIM_CR_CNTSTRT;
//LPTIM1->CR &= ~LPTIM_CR_CNTSTRT;
/*
* Disable VSYNC edge interrupts.
@ -1183,6 +1183,8 @@ bool OV5640_Capture(void)
dma_flags = 0;
// Setup timer for PCLK
if(!LptimRdy)
{
rccResetLPTIM1();
rccEnableLPTIM1(FALSE);
@ -1218,10 +1220,11 @@ bool OV5640_Capture(void)
*/
LPTIM1->CMP = 0;
LPTIM1->ARR = 1;
}
/* Set vector and clear flag. */
nvicEnableVector(LPTIM1_IRQn, 7); // Enable interrupt
LptimRdy = false;
//LptimRdy = false;
/*
* Setup slave timer to trigger DMA.