2008-03-04 04:05 AM
USART1 remap
2011-05-17 03:25 AM
2011-05-17 03:25 AM
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 :)2011-05-17 03:25 AM
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. :)