cancel
Showing results for 
Search instead for 
Did you mean: 

usart and timer interrupt

lakshmikantha85
Associate II
Posted on March 04, 2011 at 15:15

usart and timer interrupt

1 REPLY 1
ColdWeather
Senior
Posted on May 17, 2011 at 14:26

Hi!

I think, the main problem in your program is a bad programming style. For instance, in the TIM3 ISR:

First:

//        if(TIM3->SR && 0x01)flag = 1;

should look like

if (TIM3->SR & 0x01) flag = 1;

Yes, I see, the line is commented out, but at the same time is a clear demonstration of potential mistakes.

Second:

The assignment

num_bytes = i;

 - where is ''i'' declared and/or initialized?

And so on.