Topic: STM9s-Discovery UART2 interrupt

Hello

i'm try receive data from hyper with interrupt it not work . i'm using polling receive data from hyper it ok!!

in struct

typedef enum
{
  UART2_FLAG_TXE          = (u16)0x0080, /*!< Transmit Data Register Empty flag */
  UART2_FLAG_TC           = (u16)0x0040, /*!< Transmission Complete flag */
  UART2_FLAG_RXNE         = (u16)0x0020, /*!< Read Data Register Not Empty flag */
  UART2_FLAG_IDLE         = (u16)0x0010, /*!< Idle line detected flag */
  UART2_FLAG_OR_LHE       = (u16)0x0008, /*!< OverRun error flag */
  UART2_FLAG_NF           = (u16)0x0004, /*!< Noise error flag */
  UART2_FLAG_FE           = (u16)0x0002, /*!< Framing Error flag */
  UART2_FLAG_PE           = (u16)0x0001, /*!< Parity Error flag */
  UART2_FLAG_SBK          = (u16)0x0101,  /**< Send Break Complete interrupt flag */
  UART2_FLAG_LBDF         = (u16)0x0210, /**< LIN Break Detection Flag           */
  UART2_FLAG_LHDF         = (u16)0x0302, /**< LIN Header Detection Flag*/
  UART2_FLAG_LSF          = (u16)0x0301  /**< LIN Sync Field Flag*/
} UART2_Flag_TypeDef;


i don't use it! please help me

Re: STM9s-Discovery UART2 interrupt

in file stm8s_it.c

#ifdef _COSMIC_
@far @interrupt void UART2_RX_IRQHandler(void)
#else /* _RAISONANCE_ */
void UART2_RX_IRQHandler(void) interrupt 21
#endif /* _COSMIC_ */
{

}

how config enable uart2 interrupt when receive data jump to UART2_RX_IRQHandler

Re: STM9s-Discovery UART2 interrupt

Hi,

You may want to use the examples from the ST library, which are in the Ride7\examples\STM8 directory. They contain useful information about most peripherals, including UART.

In case you still have a problem, I suggest that you go to the ST support site, as we will only support our tools, but not the STM8 device peripherals.

Regards,
Bruno

Bruno Richard, PhD.
RAISONANCE - 17, avenue Jean Kuntzmann - F-38330 Montbonnot St Martin - FRANCE
There are 10 types of people in the world: Those who understand binary, and those who don't.