之前都是使用STM32F10系列的单片机做小项目 最近想做视频方面的,给模拟视频转换并显示,看到TVP5150,但大部分是 ARM开发板带的模块。 由于只做视频,再买个ARM太浪费了,看到STM32新品中4系列有DCMI接口,刚好TVP5150能输出YCBCR数据流(可惜如果输出RGB就更好了)。 调试了三周左右,视频一直没有出来,但别人说配置几个寄存器就行了,可我的就是不行。全是黑屏,如果输出嵌入式同步信号,接收部分选择分离同步信号,屏幕上还有同步的斑点。数据接收没有问题。 昨天我用逻辑分析仪分析输出信号,拿掉了几根数据线,屏幕居然出现了图像!!! 全接上又没有了,接的数据线多少和图像的持续时间有关!!! 这个会不会是高频信号的干扰?(我用杜邦线飞到开发板上的) 还可能是TVP5150的数据输出能力与 STM32数据接口的配置 谁有过这样的经验?我的TVP5150模块在ARM嵌入式开发板淘宝店买的。 void DCMI_DMAInit(void) { DCMI_InitTypeDef DCMI_InitStructure; DMA_InitTypeDef DMA_InitStructure; /*** Configures the DCMI to interface with the OV9655 camera module ***/ /* Enable DCMI clock */ RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_DCMI, ENABLE); /* DCMI configuration */ 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 configuration */ DCMI_Init(&DCMI_InitStructure); /* Configures the DMA2 to transfer Data from DCMI */ /* Enable DMA2 clock */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA2, ENABLE); /* DMA2 Stream1 Configuration */ DMA_DeInit(DMA2_Stream1); while (DMA_GetCmdStatus(DMA2_Stream1) != DISABLE) { } DMA_InitStructure.DMA_Channel = DMA_Channel_1; DMA_InitStructure.DMA_PeripheralBaseAddr = DCMI_DR_ADDRESS; // DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)uData; DMA_InitStructure.DMA_Memory0BaseAddr = FSMC_LCD_ADDRESS; DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralToMemory; // DMA_InitStructure.DMA_BufferSize = 32000; DMA_InitStructure.DMA_BufferSize = 1; DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable; // DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable; DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Disable; 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_VeryHigh; 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; /* DMA2 IRQ channel Configuration */ DMA_Init(DMA2_Stream1, &DMA_InitStructure); DMA_ITConfig(DMA2_Stream1, DMA_IT_TC, ENABLE); /* DMA Stream enable */ DMA_Cmd(DMA2_Stream1, ENABLE); while ((DMA_GetCmdStatus(DMA2_Stream1) != ENABLE)) { } } static uint8_t TVPReg[][2] = { {0x00, 0x00}, {0x02, 0x00}, {0x03, 0x0f}, {0x0d, 0x00}, {0x0f, 0x00}, {0x1b, 0x14}, {0x08, 0x0c}, {0x07, 0x77}, {0x28, 0x00}, // {0x11, 0x32}, // {0x12, 0x00}, // {0x13, 0x32}, // {0x14, 0x02}, // {0x18, 0x55}, // {0x19, 0x80}, }; GPIO的配置模式是这样的 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP ; GPIO_Init(GPIOC, &GPIO_InitStructure); |
STM32F407 定时器触发DMA 求助大神
【MCU实战经验】基于STM32F407的音频播放器设计
盘古UE-STM32F407工控板原理图
【STM32F429心得\疑问】+STM32F4之FSMC和FMC
STM32F429读取IO口传输的数据速率
STM32F407ZGT6 手摸芯片背部重启
STM32F4 SPI 动作时,软件片选信号被拉高,IO口程序逻辑失控
STM32F401RE NUCLEO求助,串口一直不能进中断
读取STM32F407内部温度传感器值错误
STM32F429多路内部ADC独立采集的办法
RE:STM32F407与TVP5150调试
回复:STM32F407与TVP5150调试
RE:STM32F407与TVP5150调试
RE:STM32F407与TVP5150调试
回复:STM32F407与TVP5150调试