AnsweredAssumed Answered

USART with stm8l

Question asked by Abhishek Kulkarni on Jun 19, 2017
Latest reply on Jun 23, 2017 by Abhishek Kulkarni

I am trying to interface USART1 with the stm8l. However I am getting a problem that whatever the value I assign to the USART1_DR , it always takes the value of 0xff no matte what. my code is as follows:

(I am working with a 16 MHz internal clock and have already done the initialisation)

USART1_CR1 = 0x00;

USART1_CR1 = 0x0C;

USART1_CR3 = 0x0F;

USART1_BRR2 = 0x0A;

USART1_BRR1 = 0x08;

USART1_DR = 'HELLO';  (still shows the value 0xff in the DR register)