cancel
Showing results for 
Search instead for 
Did you mean: 

Pin configuration for USART.

hello
Associate II
Posted on June 23, 2012 at 00:01

hi all,

readme.txt say like..

- STM3210C-EVAL Set-up 

    - Connect USART2 Tx pin (PD.05) to USART3 Rx pin (PC.11)

    - Connect USART2 Rx pin (PD.06) to USART3 Tx pin (PC.10)

@note In this case USART3 Tx and Rx pins are remapped by software.

            Make sure that jumpers JP19 and JP18 are open.

my board use 

USART2 Tx pin (PD.05)

USART2 Rx pin (PD.06)

and 

USART3 Rx pin (PD.09)

USART3 Tx pin (PD.08)

when i look in to stm3210c_eval.h

#define COMn                        1

/**

 * @brief Definition for COM port1, connected to USART2 (USART2 pins remapped on GPIOD)

 */ 

#define EVAL_COM1                   USART2

#define EVAL_COM1_GPIO              GPIOD

#define EVAL_COM1_CLK               RCC_APB1Periph_USART2

#define EVAL_COM1_GPIO_CLK          RCC_APB2Periph_GPIOD

#define EVAL_COM1_RxPin             GPIO_Pin_6

#define EVAL_COM1_TxPin             GPIO_Pin_5

so my problem is... now i want to change the USART3 as PD9 and PD8.

how can i do that?

they said USART3 Tx and Rx pins are remapped by software.... how can i change the pin?

thanks...

1 REPLY 1
Posted on June 23, 2012 at 01:48

Given that the IAR board is not the same as the ST STM3210C-EVAL I'd be tempted to just skip the whole STM_EVAL_COM stuff, which is ST's attempt to abstract the development effort for multiple boards. For you with a single, different, board the extra level of abstraction might not be very helpful/useful.

You'd need to change the pin settings in

STM32F10x_StdPeriph_Lib_V3.5.0\Utilities\STM32_EVAL\STM3210C_EVAL\stm3210c_eval.h

And then add some remapping code in

STM32F10x_StdPeriph_Lib_V3.5.0\Utilities\STM32_EVAL\STM3210C_EVAL\stm3210c_eval.c

function STM_EVAL_COMInit()

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