cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407 + OV9655+ UART2. I have a difficulty with communicating with PC.

manjae
Associate II
Posted on January 10, 2016 at 07:57

The original post was too long to process during our migration. Please click on the attachment to read the original post.
5 REPLIES 5
nguyenngocsang1411
Associate II
Posted on January 10, 2016 at 13:14

Hi friend,

I have a same project with you. However, i use stm32f4 and ov7670, i use code of wareshare too and i have a problem like you when i try to send image data to PC. 

 When i use DMA_InitStructure.DMA_Memory0BaseAddr =  (uint32_t)&frame_buffer; DCMI seem not run, and i don't see anything in DCMI->DR. And other problem is i can't send data to usart when DCMI_Cmd(ENABLE); 

Are you finish, can you check whether it can send data usart while DCMI enable 
Posted on January 10, 2016 at 15:29

Probably want to think about the USART output routines, sending one character is not a string output function.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
manjae
Associate II
Posted on January 11, 2016 at 02:08

@clivel

Actually, I sent like this. Can this code be possible to send the frame?

printf(''%d \n'',Buffervalue(K+1));

  printf(''%d \n'',Buffervalue(K+3));

  if((K+1)%40==0)

  printf(''; \r\n'');

And I also found the other problem which is when you see the DMA interruput part, there is the code that change frame_flag=1;

Actually, It changed well (I did debug by using printf function). However, In the while loop in main function. It wasn't changed.

I set the frame_flag as volatile int frame_flag as an global variable. any ideas could you give me?

Thank you

manjae
Associate II
Posted on January 24, 2016 at 11:36

@clivel

Actually, I sent like this. Can this code be possible to send the frame?

printf(''%d \n'',Buffervalue(K+1));

  printf(''%d \n'',Buffervalue(K+3));

  if((K+1)%40==0)

  printf(''; \r\n'');

And I also found the other problem which is when you see the DMA interruput part, there is the code that change frame_flag=1;

Actually, It changed well (I did debug by using printf function). However, In the while loop in main function. It wasn't changed. 

I set the frame_flag as volatile int frame_flag as an global variable. any ideas could you give me?

Thank you

Posted on January 24, 2016 at 15:04

Ok, and if you stop it in a debugger does it provide any insight into where exactly it is stuck, or that the variable has changed? Can you look at and review the generated assembler code to see why that might not be working?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..