cancel
Showing results for 
Search instead for 
Did you mean: 

USART1 remap

victor239955
Associate II
Posted on March 04, 2008 at 13:05

USART1 remap

3 REPLIES 3
victor239955
Associate II
Posted on May 17, 2011 at 12:25

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6Xz&d=%2Fa%2F0X0000000bqO%2Fr2X2bm12w76ryJ0N81gPRx_xKd19tGBf3ymiWNv_.YY&asPdf=false
asterix
Associate II
Posted on May 17, 2011 at 12:25

Hi Victor,

I have used IAR and Keil Examples for USART on their 64-pin StarterKits and they are working fine, Here attached an example from Keil. Hope this helps you :) You can also refer to ST STM32 library , then USART examples.

Asterix :)

stuart2399
Associate II
Posted on May 17, 2011 at 12:25

Hi

In order to get the USART to work, you need to configure the TX pin to be alternate function push pull and the RX pin to be input floating. Look at the ST example 2 for USART (Use the USART1 interrupts to communicate with the hyperterminal.) in function: GPIO_Configuration()

i.e.

//-------------------------------------------------

void GPIO_Configuration(void)

{

GPIO_InitTypeDef GPIO_InitStructure;

/* Configure USART1 Tx (PA.09) as alternate function push-pull */

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;

GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;

GPIO_Init(GPIOA, &GPIO_InitStructure);

/* Configure USART1 Rx (PA.10) as input floating */

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;

GPIO_Init(GPIOA, &GPIO_InitStructure);

}

//-------------------------------------------------

Remember also to enable the clock for USART1.

Hope this helps.

:)