AnsweredAssumed Answered

110 baud stm32f103

Question asked by pvtk.m2m2m on Dec 25, 2015
Latest reply on Dec 28, 2015 by Clive One
Hello,
I am using STM32F103, library version V3.1.2. 
I have to  use USE, USART2 and USART3. 
I am trying to set 110 baud but usart2 and usart3 doesn't work correct. I see these 3 peripheral clocked by APB1.
When I set APB1 like: 
/* HCLK = SYSCLK */
RCC->CFGR |= (uint32_t)RCC_CFGR_HPRE_DIV1;
   
/* PCLK2 = HCLK */
RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE2_DIV1;
 
/* PCLK1 = HCLK/2 */
RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE1_DIV8; //default DIV1
I am able to use 300 baud, 110 baud is trouble.

When I set it like:
/* HCLK = SYSCLK */
RCC->CFGR |= (uint32_t)RCC_CFGR_HPRE_DIV1;
   
/* PCLK2 = HCLK */
RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE2_DIV1;
 
/* PCLK1 = HCLK/2 */
RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE1_DIV16//default DIV1
USB device doesn't recognized. 

Is there any other way to solve this problem?
Thank you.

Outcomes