cancel
Showing results for 
Search instead for 
Did you mean: 

Remapping USART

shorosky
Associate
Posted on March 16, 2016 at 09:25

Hello, I would like to have access to uart1 and USB on stm32f105rc, but they both are on the same pins.

My question is that, if I remap the USART1 to alternate pins, USB still working on original pins.

I have readed this on the reference manual:

To optimize the number of peripherals available for the 64-pin or the 100-pin or the 144-pin

 

package, it is possible to remap some alternate functions to some other pins. This is

 

achieved by software, by programming the AF remap and debug I/O configuration register

 

(AFIO_MAPR) on page 184. In this case, the alternate functions are no longer mapped to

 

their original assignations.

Thank you.

Regards

#stm32f105 #afio-usart
3 REPLIES 3
Nesrine M_O
Lead II
Posted on March 16, 2016 at 14:30

Hi cuesta.eliot.001,

I recommend you to have a look to the Table 5. Pin definitions in your related datasheet.

-Syrine-

shorosky
Associate
Posted on March 16, 2016 at 16:27

Hello Syrine:

Thanks for answering.

I can read on the table that USART1_TX and USART1_RX can be remaped from PA10 and PA9 to PB6 and PB7 respectively.

But Im not sure if remaping USART1 will let the USB working on original PINs (PA8, PA9, PA10, PA11 and PA12).

I think that it should work, but Im not sure about it.

Thank you.

Regards.

Posted on March 16, 2016 at 20:34

Remapping the USART pins resolves the way they would clash with the USB usage. With the USART remapped, the USB pins can be used for USB connectivity.

The F1 supports peripheral base remapping, the new series parts support pin level remapping, which provide greater flexibility.

IC design seeks to find the simplest solution, don't over-think the problem into something more complicated than it needs to be.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..