[stm32f3]Selecting uart pin

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
lesto
Posts: 55
Joined: Thu May 22, 2014 11:27 am

[stm32f3]Selecting uart pin

Post by lesto »

Hi,
just an easy question, to choose from possible pin to use for usartX, i just have to activate their alternative mode them with:

Code: Select all

palSetPadMode(GPIOC, 4, PAL_MODE_ALTERNATE(7)); // used function : USART1_TX
palSetPadMode(GPIOC, 5, PAL_MODE_ALTERNATE(7)); // used function : USART1_RX


so does this also mean activanting altenate mode on two or more pair of TX/RX (of the same uart) use them all as uart?
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [stm32f3]Selecting uart pin

Post by Giovanni »

Hi,

Note that the alternate modes must be selected only for a single pair of pins, you must not map the UART (or any other peripherals) to more than one pin so verify the defaults in board.h.

Giovanni
lesto
Posts: 55
Joined: Thu May 22, 2014 11:27 am

Re: [stm32f3]Selecting uart pin

Post by lesto »

got this. thank you
Post Reply