Changing Timer1 frequency will effect UART ?

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
Post Reply
DrBanana
Posts: 51
Joined: Fri Apr 22, 2016 11:15 am

Changing Timer1 frequency will effect UART ?

Post by DrBanana » Sat Jan 14, 2017 6:17 am

I have to modify the frequency of timer1, but the same timer is being used for UART(PA9, PA10). So if I change the frequency, will it effect the UART somehow ?

victor_pv
Posts: 1339
Joined: Mon Apr 27, 2015 12:12 pm

Re: Changing Timer1 frequency will effect UART ?

Post by victor_pv » Sun Jan 15, 2017 7:25 am

DrBanana wrote:I have to modify the frequency of timer1, but the same timer is being used for UART(PA9, PA10). So if I change the frequency, will it effect the UART somehow ?
I may be wrong, but I dont think Timer1 is related in any way to the USART. To confirm I just had a quick check at the reference manual and didn't see anything indicating they are related.
Could you point to the document you have seen saying that?

DrBanana
Posts: 51
Joined: Fri Apr 22, 2016 11:15 am

Re: Changing Timer1 frequency will effect UART ?

Post by DrBanana » Sun Jan 15, 2017 12:02 pm

As the pin out shown in the following post
http://www.stm32duino.com/viewtopic.php?t=1501#p19477
The PA9 and PA10, has TIM1_CH2 and TIM1_CH3 attached, so I thought Timer1 is being used with UART ?

User avatar
Pito
Posts: 1268
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Changing Timer1 frequency will effect UART ?

Post by Pito » Sun Jan 15, 2017 1:36 pm

The PA9 and PA10, has TIM1_CH2 and TIM1_CH3 attached
That is for PWM, isn't it?
Pukao Hats Cleaning Services Ltd.

DrBanana
Posts: 51
Joined: Fri Apr 22, 2016 11:15 am

Re: Changing Timer1 frequency will effect UART ?

Post by DrBanana » Sun Jan 15, 2017 3:46 pm

so UART has its own timer other than tim1 ?

User avatar
ahull
Posts: 1528
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Changing Timer1 frequency will effect UART ?

Post by ahull » Sun Jan 15, 2017 3:59 pm

DrBanana wrote:so UART has its own timer other than tim1 ?
The peripheral clocks are, so far as I recall not directly related to the timers. They do however depend on the system clock and its divider.
Full details here -> http://www.st.com/content/ccc/resource/ ... 171190.pdf

Clock tree page 92 to Page 125 or thereabouts.
USART details from page 791

Software serial is described in detail in its own thread on this forum.
- Andy Hull -

victor_pv
Posts: 1339
Joined: Mon Apr 27, 2015 12:12 pm

Re: Changing Timer1 frequency will effect UART ?

Post by victor_pv » Sun Jan 15, 2017 4:29 pm

DrBanana wrote:As the pin out shown in the following post
http://www.stm32duino.com/viewtopic.php?t=1501#p19477
The PA9 and PA10, has TIM1_CH2 and TIM1_CH3 attached, so I thought Timer1 is being used with UART ?
Most of the ports have several possible functions, so that port can be configured as PA9 OR as UART pin OR as TIM_CH2, and so on. that is what those tables mean. So let's say in your sketch you need the USART, then you configure the port for that (the library does it for you), if you wanted to use them for Timer input or output, then the corresponding library can configure them for that function.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests