2016-09-30 06:19 AM
I have a Problem with the DCMI with a STM32F429:
- i use DCMI in ''Slave 8 bits Embedded Synchro'' - the video input is ''IT-R BT656'' (8bit data + LLC[clock]) Configuration asks for Synchrocodes -FrameStart -FrameEnd -LineStart -LineEnd >>>unfortunately i cannot determine these, or is it possible at all? from what i understand there are 4 bytes at the beginning/End of Frame/Scanline called SAV/EAV but theese codes seem to change during lines. That would require me to change the SynchroCodes after each line??? what am i missing or is it technically not possible? tnx in advance #stm32f429-dcmi-itu-rb6562016-10-04 05:10 AM
I found that FrameStart&&End should be set to 0xFF
for LineStart&End i found: 0xC7 & 0xDA (even/odd Frame) and 0x80 & 0x9D (even/odd Frame) still i am not able to get any DMA transfers... What could it be?2016-10-12 01:09 AM
for test purposes i got a board with HSync/VSync.
there i get DMA going. but i still have a problem: manual:The number of data items to be transferred can be managed either by the DMA
controller or by the peripheral:– DMA flow controller: the number of data items to be transferred is softwareprogrammable
from 1 to 65535– Peripheral flow controller: the number of data items to be transferred is unknown
and controlled by the source or the destination peripheral that signals the end of the transfer by hardware
maximal transferable memory:</p>
maximal transferable memory 2*4*65535=524280 [bytes]
</span>
needed memory: PAL(Progressive) 2* 720 * 576 = 829440[bytes]
I use the Peripheral code with the DCMI DMA, but i dont get the full image in buffer/DMA errors 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_PFCTRL;//DMA_NORMAL; hdma_dcmi.Init.Priority = DMA_PRIORITY_VERY_HIGH; hdma_dcmi.Init.FIFOMode = DMA_FIFOMODE_DISABLE; cannot i use the HAL with this or what is the issue here? did anyone get this to work?2016-10-12 03:10 AM
Hi schroeder.raphael,
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.c Take a look to ''stm32f4x9i_eval_camera.c'' file to inspire from it the configuration of you function. ( see BSP_CAMERA_MspInit() function) at this pathstm32cubef4_1.11\STM32Cube_FW_F4_V1.0\Drivers\BSP\STM324x9I_EVAL I 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. Otherwise, Check this also , may the recommendation there help you Good Luck -Hannibal-2016-11-09 07:42 AM
Ive come a step further:
- i can read in one Line in Snapshot mode - or i can readin Videodata with blankings in continuous mode, in this mode it does not seem to care for the EAV/SAVs at all... My test in snapshot: if i use FrameStart 0x9D even EAV FrameEnd 0xC7 odd EAV LineStart 0x80 even SAV LineEnd 0x9D even EAV i expect the video to be put in my buffer with one line less... but i always only get one line of data (720pix x2byte) what could cause this? i used cormal DMA transfer, what else info could you need