AnsweredAssumed Answered

STM8L Discovery USART

Question asked by p.r on Jul 3, 2012
Latest reply on Jan 19, 2014 by zhang.alex.004
i want to transmit using the stm8l152 on the stm8l discovery board. For that i have used sys config registers to remap the clk and the tx pin to the Port A. I use stvd and raisonance compiler. i cannot understand why i cannot write to any usart register even though i can write in the other registers. 
eg.   if i write into the CR1 register of the USART of the stm8 

USART1->CR1 = 0x10 ;

After this when i check the value of the peripheral register CR1 of the usart using stvd the value is always 0x00
Even when using any other functions like usart init , usart clock init etc. the value of the usart registers does not change. 
Is there something files or initializations i should specifically do. ? should the gpio pins be initialized to a certain state or should some remapping of registers be done?
any help will be appreciated. thanks