I am having problems getting hardware control (CTS/RTS) to work on the STM32L chip.
Below is how I setup the GPIO lines: void CommPort_SetupCtsRtsLine ( void ) { GPIO_InitTypeDef GPIO_InitStructure;
// Enable GPIO Periph bus clock. RCC_AHBPeriphClockCmd ( RCC_AHBPeriph_GPIOA, ENABLE );
/* Configure USART2 RTS and USART2 Tx as alternate function push-pull */ GPIO_InitStructure.GPIO_Pin = COMM_PORT_RTS_PIN_NAME | USART2_TXD_PIN_NAME; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_Init(USART2_PORT_NAME, &GPIO_InitStructure);
/* Configure USART2 CTS and USART2 Rx as input floating */ GPIO_InitStructure.GPIO_Pin = COMM_PORT_CTS_PIN_NAME | USART2_RXD_PIN_NAME; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN; GPIO_Init(USART2_PORT_NAME, &GPIO_InitStructure); }
When I connect to the board using Hyperterminal I don't see any handshaking going on.
I hope that someone can help me with this problem.