2016-04-25 11:28 PM
hello
I get overflow on DCMI .please see my code.DCMI config : hdcmi.Instance = DCMI; hdcmi.Init.SynchroMode = DCMI_SYNCHRO_HARDWARE; hdcmi.Init.PCKPolarity = DCMI_PCKPOLARITY_RISING; hdcmi.Init.VSPolarity = DCMI_VSPOLARITY_LOW; hdcmi.Init.HSPolarity = DCMI_HSPOLARITY_HIGH; hdcmi.Init.CaptureRate = DCMI_CR_ALL_FRAME; hdcmi.Init.ExtendedDataMode = DCMI_EXTEND_DATA_8B; hdcmi.Init.JPEGMode = DCMI_JPEG_DISABLE; HAL_DCMI_Init(&hdcmi);DMA config : hdma_dcmi.Instance = DMA2_Stream1; hdma_dcmi.Init.Channel = DMA_CHANNEL_1; hdma_dcmi.Init.Direction = DMA_PERIPH_TO_MEMORY; hdma_dcmi.Init.PeriphInc = DMA_PINC_DISABLE; hdma_dcmi.Init.MemInc = DMA_MINC_ENABLE; hdma_dcmi.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; hdma_dcmi.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; hdma_dcmi.Init.Mode = DMA_NORMAL; hdma_dcmi.Init.Priority = DMA_PRIORITY_LOW; hdma_dcmi.Init.FIFOMode = DMA_FIFOMODE_DISABLE; HAL_DMA_Init(&hdma_dcmi);global : uint16_t CameraBuffer[160*120]; I config my sensor 160*120 RGB565start capture :Camera_SnapshotStart((uint8_t*)CameraBuffer);Capture function :void Camera_SnapshotStart(uint8_t *buff){ hdcmi.DMA_Handle->Init.Mode = DMA_NORMAL; HAL_DCMI_Start_DMA(&hdcmi, DCMI_MODE_SNAPSHOT, (uint32_t)buff,9600); }what is my proble ? #overflow2016-04-26 06:24 AM
Nobody can answer me ?
I'm waiting ..2016-04-26 08:30 PM
I have all signal and saw in oscop. href signal 396 us. vref signal 50 ms .
2016-04-26 10:53 PM
2016-04-27 10:38 PM
Mr.Clive .. please answer . I'm late.
2016-04-28 06:19 AM
This isn't really something I can provide assistance with.
2016-04-28 08:19 AM
2016-04-28 08:21 AM
2016-04-28 11:31 AM
Perhaps the DMA needs to have a higher priority, and use the FIFO, to mitigate the differential in speed, and hard time lines, between the camera and the memory.
As urgent as it may be to you, there really aren't that many people here, and most of them have their own problems and issues.I have basic logic and problem solving skills, the HAL and Cameras really aren't my thing. Suggest you review the DCMI examples related to the EVAL boards, and experiment with those boards.2016-04-28 11:57 AM
Hi askari.nima,
Here is few recommendation that may help you:-Try to increase the“CameraBuffer� size.
- Try to use the 4-word deep FIFO available to leave enough time for DMA transfers and avoid DMA overrun conditions.- Make sure the you have configured the NVIC for DCMI and DMA- Make sure that you called the DCMI and DMA IRQ_Handlers inside stm32f4xx_it.cTake a look to ''stm32f4x9i_eval_camera.c'' file to inspire from it the configuration of you function. ( see BSP_CAMERA_MspInit() function) at this path stm32cubef4_1.11\STM32Cube_FW_F4_V1.11.0\Drivers\BSP\STM324x9I_EVALI want to mention that the example ''DCMI_SnapshotMode'' in STM32CubeF4 will be very helpful for you where the configuration of DCMI peripheral is done through the BSP library.Good Luck-Hannibal-