/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / TIM2_IRQHandler disturb USART2 during sending.

Username:     
Password:     
             

Forum

# 1   2010-02-14 21:04:01 TIM2_IRQHandler disturb USART2 during sending.

FunRice
Member
Registered: 2009-10-19
Posts: 18

TIM2_IRQHandler disturb USART2 during sending.

Hello,

after solving the problems with sending over USART2 (with your great help at this forum) I implement the timer and interrupt library

* File Name          : stm32f10x_tim.c
* Author             : MCD Application Team
* Version            : V2.0.3
* Date               : 09/22/2008

and

stm32f10x_it.c

Unfortunately the TIM2_IRQHandler disturb USART2 during sending.
USART2 should send 45 bytes, but send with aktiv timer interrupt only 28 bytes.

But why can the TIM2_IRQHandler disturb USART2 ?


Regards, FunRice



The content of TIM2_IRQHandler  is

void TIM2_IRQHandler(void)
{

  if (TIM_GetITStatus(TIM2, TIM_IT_CC1) != RESET)
  {

    TIM_ClearITPendingBit(TIM2, TIM_IT_CC1);

    GPIO_WriteBit(GPIOB, GPIO_Pin_6, (BitAction)(1 - GPIO_ReadOutputDataBit(GPIOB, GPIO_Pin_6)));
    capture = TIM_GetCapture1(TIM2);
    TIM_SetCompare1(TIM2, capture + CCR1_Val);
  }
 
}

Offline

 

# 2   2010-02-22 09:49:14 TIM2_IRQHandler disturb USART2 during sending.

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: TIM2_IRQHandler disturb USART2 during sending.

What is the configuration of your TIM2 ?
Is USART2 also using IT ?

Offline

 

Board footer