cancel
Showing results for 
Search instead for 
Did you mean: 

Getting OV7670 camera data in STM32F7 SRAM memory to computer

alex50504u2
Associate
Posted on November 21, 2016 at 22:25

Hi,

I have interfaced OV7670 camera to STM32F7 using DCMI DMA in snapshot mode. The OV7670 is configured to provide with QVGA resolution.image data in RGB565 format 

I am saving the data to the SRAM1 memory (starting from 0x2001 0000). 

I am not able to transfer the data from SRAM using USART since source memory location parameter of the HAL_UART_Transmit_DMA is limited to uint8_t (but the SRAM memory location address is uint32_t).

could anyone help me to understand

1. how i can get the data from the SRAM memory location to computer?

2. how the data received can be used to view it as image?

Thanks in advance for the help.

P.S.

i am able to say that the data is getting saved in the SRAM memory location, because when i print the data in the memory location(pointer to the memory address) using printf (in hex format) i am able to view data after the frame capture is over.  

#ov7670 #stm32f7 #sram
2 REPLIES 2
Posted on November 22, 2016 at 07:28

> I am not able to transfer the data from SRAM using USART since source memory location parameter of the HAL_UART_Transmit_DMA is limited to uint8_t (but the SRAM memory location address is uint32_t).

- pick an uint32_t from SRAM, e.g. l = uint32_t_array[i];

- split it into 4 uint8_t, e.g.

uint8_t a[4];

a[0] = (l >> 0) & 0xFF;

a[1] = (l >> 😎 & 0xFF;

a[2] = (l >> 16) & 0xFF;

a[3] = (l >> 24) & 0xFF;

- transfer the 4 uint8_t into PC

- reassemble in PC

- repeat until the whole array is transferred

JW

alex50504u2
Associate
Posted on November 22, 2016 at 15:51

Thanks 🙂