I am facing a problem with USART functionality and I am trying to debug it for last four days without success. Finally I am coming back to forum for some help. I am trying to transmit three characters over USART in STM8L. Here is the code that i am using:
I am not seeing anything on TX pin (PC3). It remain high. Please let me know what I am doing wrong. Has anyone else able to get USART working on STM8L. If yes, I would be very thankful if you can forward me the code. Also i have verified that UART pins are not externally stuck in hardware by making pins configured as GPIO and changing them. I could see proper transitions when pins are GPIO. Thanks & Regards, Mandeep
You should perhaps add the line below. /* Enable USART clock */ CLK_PeripheralClockConfig(CLK_Peripheral_USART, ENABLE); In STM8L family, peripheral clock should be enabled to be able to access to peripheral registers. With regards,