cancel
Showing results for 
Search instead for 
Did you mean: 

USART doesnot go into interrupt service routine

mehmet.karakaya
Associate III
Posted on September 04, 2010 at 19:36

USART doesnot go into interrupt service routine

12 REPLIES 12
Posted on May 17, 2011 at 14:05

It is provided with IAR workbench installation.

 

Thanks, I've attached ST Micro's portion of the firmware/library code, basically loosing the EWARM projects or anything looking like IAR's

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mehmet.karakaya
Associate III
Posted on May 17, 2011 at 14:05

hello ANN ,

first I use stm32f103ret6

second I use Raisonance RAID7

anyway here is my ISR

-----------------------------------------

void USART1_IRQHandler(void)

{

  volatile unsigned int IIR;

    IIR = USART1->SR;

    if (IIR & USART_FLAG_RXNE) {                  // read interrupt

      USART1->SR &= ~USART_FLAG_RXNE;

  Rx_buffer[Rx_ptr] = USART_ReceiveData(USART1);

  Rx_ptr++ ; if (Rx_ptr > 511) {Rx_ptr=0;com0err=1;}

 if (ending_char()) do_instruction();

  }

    if (IIR & USART_FLAG_TC) {

        USART1->SR &= ~USART_FLAG_TC;           // clear interrupt

        if (Tx_ptr < Tx_len) {

        Tx_ptr++; send_char (Tx_buffer[Tx_ptr]);}

        else USART_ITConfig(USART1, USART_IT_TC, DISABLE);

}

}

nanayakkaraan
Associate II
Posted on May 17, 2011 at 14:05