Skip to main content
Visitor II
September 10, 2009
Question

USART doesn't work at STM8A5188T, Help please !

  • September 10, 2009
  • 2 replies
  • 635 views
Posted on September 10, 2009 at 21:37

USART doesn't work at STM8A5188T, Help please !

    This topic has been closed for replies.

    2 replies

    zsuAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:04

    I'm using USART in STM8A5188T (48pin package) at 16MHZ. Timer and ADC works well. But USART does not work at all. No any USART special register could been updated (modified) even during debugging. instructions as below. Any help will be appreciated.

    (BTW, LINUART in STM8A5188T works fine.)

    USART_BRR2 = 0x02 ;

    USART_BRR1 = 0x68 ; // Baud rate at 9600.

    USART_CR1 = 0x00 ;

    USART_CR3 = 0x00 ;

    USART_CR4 = 0x00 ;

    USART_CR5 = 0x00 ;

    USART_CR2 = 0x2c ;

    :-Y

    zsuAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:04

    :p

    Solved. Clock to USART was turned off.

    Hope it help you to avoid same mistake.