cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429+ITU-RB656(DCMI)+PeripheralMode

raphael2
Associate II
Posted on September 30, 2016 at 15:19

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-rb656
4 REPLIES 4
raphael2
Associate II
Posted on October 04, 2016 at 14:10

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?

raphael2
Associate II
Posted on October 12, 2016 at 10:09

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?

Walid FTITI_O
Senior II
Posted on October 12, 2016 at 12:10

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

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/DCMI%20DMA%20synchronization%20on%20STM32F7&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentview...

also , may the recommendation there help you

Good Luck

-Hannibal-

raphael2
Associate II
Posted on November 09, 2016 at 16:42

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