cancel
Showing results for 
Search instead for 
Did you mean: 

USART1 & TIM1 working parallel ?

infoinfo976
Associate II
Posted on December 17, 2010 at 10:53

USART1 & TIM1 working parallel ?

3 REPLIES 3
Posted on May 17, 2011 at 14:18

''Is there a known reason why my first initialization example not works''

Take a look at the spreadsheet here:

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32VLDiscovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32VLDiscovery/STM32VL Discovery Kit Global Pinouts View&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000491D59B8574F8049B5DFA3E8B21CBA51&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32VLDiscovery/AllItems.aspx&currentviews=382]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32VLDiscovery/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fSTM32VLDiscovery%2fSTM32VL%20Discovery%20Kit%20Global%20Pinouts%20View&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000491D59B8574F8049B5DFA3E8B21CBA51&TopicsView=https%3A%2F%2Fmy%2Est%2Ecom%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32VLDiscovery%2FAllItems%2Easpx&currentviews=382

It shows you the full pinout, and what functions are shared on pins...

''have I to check my code ?''

 

Yes, of course you do!
infoinfo976
Associate II
Posted on May 17, 2011 at 14:18

Thank you, I know this fine spreadsheet.

My question was if I use TIM1_CH1 at PA8 that damage my

USART1 or not. And why using TIM1_CH4 don't do that.

The source for using CH1 or CH4 is nearly the same. Have I reconfigure

the USART1 for that ?

infoinfo976
Associate II
Posted on May 17, 2011 at 14:18

After checking the TIM1 register against the manual I saw a false value

in the TIM1->CCER register in case I use TIM1-CH1.

I've forgotton the struct  initialization

TIM_OCStructInit (&TIM_OCInitStructure)

After that everything is fine.

Thank you for pointing me in the right direction.