STM32F4 DCMI DMA TVP5150问题?

2019-07-21 02:49发布

     为什么我配置的DCMI接收TVP5150传输到内存中数据一直是2048位,PAL制信号输入好像不是2048啊,是720*576,开的缓存是4K,数据来源是视频信号接入TVP5150传输出来的!求高手解答?我配置TVP5150裁剪也没什么反应?
配置方式如下:
    DCMI配置如下:
    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_InitStructure.DCMI_HSPolarity = DCMI_HSPolarity_High;
    DCMI_InitStructure.DCMI_CaptureRate = DCMI_CaptureRate_All_Frame;
    DCMI_InitStructure.DCMI_ExtendedDataMode = DCMI_ExtendedDataMode_8b;     DCMI_Init(&DCMI_InitStructure);

    DMA配置如下:
     DMA_InitStructure.DMA_Channel = DMA_Channel_1;       //选择DMA通道
     DMA_InitStructure.DMA_PeripheralBaseAddr = DCMI_DR_ADDR;//DCMI_BASE; //DMA选择外设基址
     DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)&video_dma_buf[0];     //DMA数据传入内存的基址
     DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralToMemory;            //外设到存储器
     DMA_InitStructure.DMA_BufferSize =4000;                              //空间大小  传送最大数据空间
     DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;    //外设递增不使能
     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_Circular;          //循环模式
     DMA_InitStructure.DMA_Priority = DMA_Priority_High;
     DMA_InitStructure.DMA_FIFOMode = DMA_FIFOMode_Enable;
     DMA_InitStructure.DMA_FIFOThreshold = DMA_FIFOThreshold_Full;
     DMA_InitStructure.DMA_MemoryBurst = DMA_MemoryBurst_Single;
     DMA_InitStructure.DMA_PeripheralBurst = DMA_PeripheralBurst_Single;

    TVP5150数据:
 { /* 0x00  1*/                                                                      
            0x00,0x00         //视频输入源选择寄存器                                    
    },                                                                                
    { /* 0x01  2*/                                                                      
            0x01,0x8f         //模拟通道控制寄存器                                        
    },                                                                                
    { /* 0x02  3*/                                                                      
            0x02,0x00         //操作模式控制寄存器                                         
    },                                                                                
    { /* 0x03  4*/                                                                      
            0x03,0x7f         //杂项控制寄存器  //0d                                           
    },          
    { /* 0x04  5*/                                                                      
            0x04,0xc0                                               
    },                                                                                
    { /* 0x06  6*/                                                                      
            0x06,0x10                                           
    },                                                                                
    { /* 0x07  7*/                                                                      
            0x07,0x40                                              
    },                                                                                
    { /* 0x08  8*/                                                                      
            0x08,0x00                                              
    },                                                                                
    { /* 0x09  9*/                                                                      
            0x09,0x80                                                   
    },                                                                                
    { /* 0x0a 10*/                                                                      
            0x0a,0x80                                               
    },                                                                                
    { /* 0x0b 11*/                                                                      
            0x0b,0x00                                                      
    },                                                                                
    { /* 0x0c 12*/                                                                      
            0x0c,0x80                                                 
    },                                                                                
    { /* 0x0d 13*/                                                                      
            0x0d,0x40    //47                                        
    },                                                                                
    { /* 0x0e 14*/                                                                      
            0x0e,0x00                                              
    },                                                                                
    { /* 0x0f 15*/                                                                      
            0x0f,0x08  //0x08                                              
    },                                                                                
    { /* 0x11 16*/                                                                      
            0x11,0x00           
    },                                                                                
    { /* 0x12 17*/                                                                      
            0x12,0x00       
    },                                                                                
    { /* 0x13 18*/                                                                      
            0x13,0x00       
    },                                                                                
    { /* 0x14 19*/     
            0x14,0x00                                          
    },                                                                                
    { /* 0x15 20*/                                                                      
            0x15,0x01                                                      
    },                                                                                
    { /* 0x16 21*/                                                                      
            0x16,0x80                                             
    },                                                                                
    { /* 0x18 22*/                                                                      
            0x18,0x00                                          
    },                                                                                
    { /* 0x19 23*/                                                                      
            0x19,0x00                                           
    },                                                                                
    { /* 0x1a 24*/                                                                      
            0x1a,0x0c                                            
    },                                                                                
    { /* 0x1b 25*/                                                                      
            0x1b,0x14                                            
    },                                                                                
    { /* 0x1c 26*/                                                                      
            0x1c,0x00                                              
    },                                                                                
    { /* 0x1d 27*/                                                                      
            0x1d,0x00                                             
    },                                                                                
    { /* 0x1e 28*/                                                                      
            0x1e,0x00                                            
    },                                                                                
    { /* 0x28 29*/                                                                      
            0x28,0x00                                                    
    },                                                                                
    { /* 0x2e 30*/                                                                      
            0x2e,0x0f                                           
    },                                                                                
    { /* 0x2f 31*/                                                                      
            0x2f,0x01                                          
    },                                                                                
    { /* 0xbb 32*/                                                                      
            0xbb,0x00                                             
    },                                                                                
    { /* 0xc0 33*/                                                                      
            0xc0,0x00                                             
    },                                                                                
    { /* 0xc1 34*/                                                                      
            0xc1,0x00                                             
    },                                                                                
    { /* 0xc2 35*/                                                                      
            0xc2,0x04                                                     
    },                                                                                
    { /* 0xc8 36*/                                                                      
            0xc8,0x80                                           
    },                                                                                
    { /* 0xc9 37*/                                                                      
            0xc9,0x00                                                   
    },                                                                                
    { /* 0xca 38*/                                                                      
            0xca,0x00                                              
    },                                                                                
    { /* 0xcb 39*/                                                                      
            0xcb,0x4e                                            
    },                                                                                
    { /* 0xcc 40*/                                                                      
            0xcc,0x00                                           
    },                                                                                
    { /* 0xcd 41*/                                                                      
            0xcd,0x01                                                
    },                                                                                
    { /* 0xcf 42*/                                                                      
            0xcf,0x00                                           
    },                                                                                
    { /* 0xd0 43*/                                                                      
            0xd0,0x00                                                    
    },                                                                                
    { /* 0xfc 44*/                                                                      
            0xfc,0x7f                                          
    }   
    


友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
9条回答
zhaofan999
1楼-- · 2019-07-21 16:05
回复【5楼】jxa19890929:
---------------------------------
回复【4楼】jxa19890929:
---------------------------------
你这么配置TVP5150后,输出视频信号不是PAL的是NTSC的。我现在在调试这个,请问你跳出来了吗,可否提供一下DCMI 的配置,因为我按照你这么配置后,采集的数据是1212.
ztzjl2010
2楼-- · 2019-07-21 21:43
 精彩回答 2  元偷偷看……
cchwhk
3楼-- · 2019-07-22 00:11
求结果,我也想用STM32F07和TVP5150做视频采集

一周热门 更多>