AnsweredAssumed Answered

STM8L152C6T6 USART1 Interrupt mode

Question asked by verma.sushil on Jan 13, 2015
I am trying to transfer and read data from USART1 in interrupt mode but failed to do so. I successfully communicated with the polled method. I am not able to run any interrupt.
No interrupt is executed as I write in ISR to on led but not reached to interrupt handler. that means inerrupt is not executed.

My codes are

void USART_init(unsigned int BaudRate);
void USART_Tx_Buffer(char *Str);
     /* Select HSI as system clock source */
     #ifdef USE_HSI
          /* Select 2MHz HSE as system clock source */

void USART_init(unsigned int BaudRate)
 CLK_PeripheralClockConfig(CLK_Peripheral_USART1, ENABLE);      
 USART_ClockInit(USART1,USART_Clock_Enable,USART_CPOL_Low, USART_CPHA_1Edge,USART_LastBit_Disable); 

void USART_Tx_Buffer(char *Str)

    char Str_Length=0,i=0;
               while(USART_GetFlagStatus(USART1,USART_FLAG_TXE) == RESET);      
               while (USART_GetFlagStatus(USART1, USART_FLAG_RXNE) == RESET);
               //Rx_Data_Buffer[i] = USART_ReceiveData8(USART1);                         

In stm8it.c file

/* In order to detect unexpected events during development,
   it is recommended to set a breakpoint on the following instruction.
  //while (1);