Skip to main content
zsu
Associate II
Sep 10, 2009 7:37 PM UTC
Question

USART doesn't work at STM8A5188T, Help please !

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

    zsu
    zsuAuthor
    Associate II
    May 17, 2011 1:04 PM UTC
    Posted on May 17, 2011 at 15:04

    :p

    Solved. Clock to USART was turned off.

    Hope it help you to avoid same mistake.

    zsu
    zsuAuthor
    Associate II
    May 17, 2011 1:04 PM UTC
    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