cancel
Showing results for 
Search instead for 
Did you mean: 

can I use only RX of USART1 ? what hapens to PA9 if I enable USART1 clock ?

mehmet.karakaya
Associate III
Posted on May 12, 2013 at 18:52

hello forum ,

I want use only RX of USART1 of my F103 becouse I need TIM1_CH2 function on PA9 in what happens to PA9 if I enable both USART1 and TIM1 ? I dont want TX be enabled on PA9 - I want TIM1_CH2 be enabled on PA9 how can I use RX on PA10 and TIM1_CH2 on PA9 ? does this below code work ?

USART_InitStructure.USART_Mode = USART_Mode_Rx ; 
USART_Init(USART1, &USART_InitStructure); 

thank you #f103-usart
3 REPLIES 3
Posted on May 13, 2013 at 16:10

Doesn't appear to be an unreasonable expectation.

You've been doing this long enough to be able to confirm the behaviour yourself.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
adslzd
Associate
Posted on July 17, 2013 at 08:16

I have same problem. Have you solved it?

 

zzdz2
Associate II
Posted on July 17, 2013 at 09:16

F10x errata sheet explains it:

Description

 

In USART receive-mode-only communication (TE = 0 in the USARTx_CR1 register), even

 

when the USARTx_TX pin is not being used, the corresponding I/O port pin cannot be used

 

to output another alternate function (in this mode the USARTx_TX output is set to 1 and

 

thus no other alternate function output can be used).

 

This limitation applies to all USARTx_TX pins that share another alternate function output.

 

Workaround

 

Do not use the corresponding I/O port of the USARTx_TX pin in alternate function output

 

mode. Only the input mode can be used (TE bit in the USARTx_CR1 has to be cleared).