cancel
Showing results for 
Search instead for 
Did you mean: 

There is problem with DCM colors

Chuev.Vladimir
Associate III
Posted on October 29, 2015 at 12:50

Hello,

I have some problems with camera. At reception high and low bytes change places. It's make bad image (picture 1) First I think that I lose a first byte and by myself shifted a buffer on 1 byte. So, I got an acceptable image. but it has low quality (picture 2, there you can see green lines). After I reordered each high and low bytes in pixel and I got what I whant (picture 3). But is there no way to do it by DCM or DMA? There must be solution. I ask your halp with that. There is my initialization code:

hdcmi->Init.CaptureRate = DCMI_CR_ALL_FRAME;
hdcmi->Init.HSPolarity = DCMI_HSPOLARITY_LOW;
hdcmi->Init.SynchroMode = DCMI_SYNCHRO_HARDWARE;
hdcmi->Init.VSPolarity = DCMI_VSPOLARITY_HIGH;
hdcmi->Init.ExtendedDataMode = DCMI_EXTEND_DATA_8B;
hdcmi->Init.PCKPolarity = DCMI_PCKPOLARITY_RISING;
hdcmi->Init.JPEGMode = DCMI_JPEG_DISABLE;
hdcmi->Instance = DCMI;
camera_Hdma.Init.Channel = DMA_CHANNEL_1;
camera_Hdma.Init.Direction = DMA_PERIPH_TO_MEMORY;
camera_Hdma.Init.PeriphInc = DMA_PINC_DISABLE;
camera_Hdma.Init.MemInc = DMA_MINC_ENABLE;
camera_Hdma.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
camera_Hdma.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; 
// DMA_MDATAALIGN_WORD - DMA_MDATAALIGN_HALFWORD
camera_Hdma.Init.Mode = DMA_CIRCULAR; 
// DMA_CIRCULAR - DMA_NORMAL
camera_Hdma.Init.Priority = DMA_PRIORITY_HIGH;
camera_Hdma.Init.FIFOMode = DMA_FIFOMODE_DISABLE; 
// DMA_FIFOMODE_DISABLE - DMA_FIFOMODE_ENABLE
camera_Hdma.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; 
// DMA_FIFO_THRESHOLD_1QUARTERFULL - DMA_FIFO_THRESHOLD_HALFFULL - DMA_FIFO_THRESHOLD_3QUARTERSFULL - DMA_FIFO_THRESHOLD_FULL
camera_Hdma.Init.MemBurst = DMA_MBURST_SINGLE;
camera_Hdma.Init.PeriphBurst = DMA_PBURST_SINGLE;
camera_Hdma.Instance = DMA2_Stream1;

0690X000006034oQAA.jpg 0690X000006034yQAA.jpg 0690X000006036kQAA.jpg
1 REPLY 1
Chuev.Vladimir
Associate III
Posted on November 06, 2015 at 12:27

I checked the other camera and found the same probltm. I'm beginning to think that the matter is in the stm32f7