STM8L Discovery USART
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-07-03 10:59 AM
Posted on July 03, 2012 at 19:59
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 0x00Even 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 #uart-clock-enable
Labels:
- Labels:
-
UART-USART
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-07-06 1:43 AM
Posted on July 06, 2012 at 10:43
On the STM8L parts the clock to the peripherals is OFF by default. You need to enable the uart clock before it will work.
CLK_PeripheralClockConfig(CLK_Peripheral_USART1,ENABLE);Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-01-19 12:03 PM
Posted on January 19, 2014 at 21:03the default usart is in pa or pc of 20 pin packet?
