2012-07-04 02:08 AM
i cant seem to be able to write in any of the usart registers. i use STVD with raisonance compiler.
eg. when i write USART1->CR1 = 0x01; i don´t see any change in CR1 perpheral registers (that i view in STVD window). This works with the other registers.I also remap the usart clk ans tx pin to port A. Do i have to inlude some other files or do some more remapping etc. to be able to write in the USART register?2012-08-07 06:37 AM
Like enabling the USART clock?
2017-06-20 01:58 AM
I am getting some what of a similar problem. Whatever value I give to the USART_DR register it always takes the value 0xff though the other registers work fine. Even if I give char value to the USART_DR it still takes value 0xff.
My initialization code is
void usartinit(void) //usart initialisation (115200 , 8bit , no parity , 1 stop bit{ char X; PC_DDR = 0x10; PC_CR1 = 0x10; X = USART1_SR; X = USART1_DR; USART1_CR1 = 0x00; USART1_CR2 = 0x0C; USART1_CR3 = 0x0f; USART1_CR4 = 0x03; USART1_BRR2 = 0x0A; USART1_BRR1 = 0x08;}2018-05-16 03:15 PM
What was your outcome. I am seeing the same issue. I also saw this with TIM1 registers. I switched to using TIM3 and that was fine.
Thank you,
Shawn