• 大小: 6.52MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-27
  • 语言: 其他
  • 标签: STM32F4  OV7620  

资源简介

进入场中断开始采集图像,进入行中断采集一行的像素点,最后得到想要的图片。

资源截图

代码片段和文件信息

#include 
#include “mydefine.h“
extern uint8_t Image_Data[ROW][COWN];
void MyDCMI(void)
{
DCMI_InitTypeDef DCMI_InitStructure;
DMA_InitTypeDef  DMA_InitStructure;
    DCMI_DeInit();
    DCMI_InitStructure.DCMI_CaptureMode = DCMI_CaptureMode_Continuous;
    DCMI_InitStructure.DCMI_SynchroMode = DCMI_SynchroMode_Hardware;
    DCMI_InitStructure.DCMI_PCKPolarity = DCMI_PCKPolarity_Falling;
    DCMI_InitStructure.DCMI_VSPolarity  = DCMI_VSPolarity_High; //DCMI_VSPolarity_Low;
    DCMI_InitStructure.DCMI_HSPolarity  = DCMI_HSPolarity_Low;
    DCMI_InitStructure.DCMI_CaptureRate = DCMI_CaptureRate_All_frame;//DCMI_CaptureRate_1of4_frame;
    DCMI_InitStructure.DCMI_ExtendedDataMode = DCMI_ExtendedDataMode_8b; //DCMI_ExtendedDataMode_10b;
    DCMI_Init(&DCMI_InitStructure);

    /* DMA2 Stream1 Configuration */  
    DMA_DeInit(DMA2_Stream1);
    
    DMA_InitStructure.DMA_Channel = DMA_Channel_1;  
    DMA_InitStructure.DMA_PeripheralbaseAddr = 0x50050028;//(uint32_t)&(DCMI->DR);
    DMA_InitStructure.DMA_Memory0baseAddr = (uint32_t) &Image_Data;
    DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralToMemory;
    DMA_InitStructure.DMA_BufferSize = (COWN*ROW);
    DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
    DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
    DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte;
    DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_Byte;
    DMA_InitStructure.DMA_Mode = DMA_Mode_Normal;
    DMA_InitStructure.DMA_Priority = DMA_Priority_VeryHigh;
    DMA_InitStructure.DMA_FIFOMode = DMA_FIFOMode_Disable;
    DMA_InitStructure.DMA_FIFOThreshold = DMA_FIFOThreshold_1QuarterFull;
    DMA_InitStructure.DMA_MemoryBurst = DMA_MemoryBurst_Single;
    DMA_InitStructure.DMA_PeripheralBurst = DMA_PeripheralBurst_Single;
     
    DMA_Init(DMA2_Stream1 &DMA_InitStructure);
DMA_Cmd(DMA2_Stream1 ENABLE);

    /* DMA2 Stream2 Configuration */  
//     DMA_DeInit(DMA2_Stream2);
//     
//     DMA_InitStructure.DMA_Channel = DMA_Channel_2;  
//  DMA_InitStructure.DMA_PeripheralbaseAddr = (uint32_t)frame_buffer;
//     DMA_InitStructure.DMA_Memory0baseAddr = 0x67e00000;
//     DMA_InitStructure.DMA_DIR = DMA_DIR_MemoryToMemory;
//     DMA_InitStructure.DMA_BufferSize = BUFFER_SIZE>>1;
//     DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Enable;
//     DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
//     DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Word;
//     DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_Word;
//     DMA_InitStructure.DMA_Mode = DMA_Mode_Normal;
//     DMA_InitStructure.DMA_Priority = DMA_Priority_Medium;
//     DMA_InitStructure.DMA_FIFOMode = DMA_FIFOMode_Disable;
//     DMA_InitStructure.DMA_FIFOThreshold = DMA_FIFOThreshold_Full;
//     DMA_InitStructure.DMA_MemoryBurst = DMA_MemoryBurst_Single;
//     DMA_InitStructure.DMA_PeripheralBu

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件         19  2013-12-11 20:00  ov7620\ExtDll.iex

     文件     365244  2013-12-11 19:47  ov7620\gpio.axf

     文件      68798  2013-12-11 19:47  ov7620\gpio.htm

     文件        918  2013-12-11 19:47  ov7620\gpio.lnp

     文件      87274  2013-12-11 19:47  ov7620\gpio.map

     文件       7853  2013-12-11 20:37  ov7620\gpio.plg

     文件        479  2013-10-30 13:40  ov7620\gpio.sct

     文件       3375  2013-12-11 19:47  ov7620\gpio.tra

    .......    139634  2013-12-11 20:37  ov7620\gpio.uvgui.Lizeo

    .......    139356  2013-12-06 21:10  ov7620\gpio.uvgui_Lizeo.bak

    .......     25642  2013-12-11 20:37  ov7620\gpio.uvopt

    .......     21890  2013-12-11 20:37  ov7620\gpio.uvproj

     文件      62005  2013-12-11 19:47  ov7620\gpio_Target 1.dep

    .......     24495  2013-12-06 21:10  ov7620\gpio_uvopt.bak

    .......     21719  2013-12-05 17:52  ov7620\gpio_uvproj.bak

     文件      79281  2011-10-28 10:31  ov7620\Inc\core_cm4.h

     文件      23979  2011-10-28 10:31  ov7620\Inc\core_cm4_simd.h

     文件      15691  2011-10-28 10:31  ov7620\Inc\core_cmFunc.h

     文件      16108  2011-10-28 10:31  ov7620\Inc\core_cmInstr.h

     文件       6792  2013-10-29 10:36  ov7620\Inc\misc.h

     文件        625  2013-12-09 15:58  ov7620\Inc\mydefine.h

     文件     530693  2011-10-28 10:31  ov7620\Inc\stm32f4xx.h

     文件      32417  2011-10-28 10:31  ov7620\Inc\stm32f4xx_adc.h

     文件      27186  2011-10-28 10:31  ov7620\Inc\stm32f4xx_can.h

     文件       3798  2011-10-28 10:31  ov7620\Inc\stm32f4xx_conf.h

     文件       2284  2011-10-28 10:31  ov7620\Inc\stm32f4xx_crc.h

     文件      12528  2011-10-28 10:31  ov7620\Inc\stm32f4xx_cryp.h

     文件      14814  2011-10-28 10:31  ov7620\Inc\stm32f4xx_dac.h

     文件       4164  2011-10-28 10:31  ov7620\Inc\stm32f4xx_dbgmcu.h

     文件      12845  2011-10-28 10:31  ov7620\Inc\stm32f4xx_dcmi.h

............此处省略186个文件信息

评论

共有 条评论