Hi,
after configuring correctly the USART2 for working with FlowControl, i can see that the RTS is not being working at all .
and the CTS flag is not being used under the RTOS software.
im using RTOS
@version V1.1.1
@date 16-October-2015
configuration :
huart2.Init.BaudRate = 115200;
huart2.Init.WordLength = UART
WORDLENGTH8B;
huart2.Init.StopBits = UART
STOPBITS1;
huart2.Init.Parity = UART
PARITYNONE;
huart2.Init.Mode = UART
MODETX
RX;
huart2.Init.HwFlowCtl = UARTHWCONTROL
RTSCTS;//UART
HWCONTROLRTS
CTS
huart2.Init.OverSampling = UARTOVERSAMPLING
16;
huart2.Init.OneBitSampling = UARTONEBIT
SAMPLINGENABLED;
GPIO_InitStruct.Pin = USART2_RX_FUNCTION_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
GPIO_InitStruct.Pin = USART2_TX_FUNCTION_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
GPIO_InitStruct.Pin = USART2_RTS_FUNCTION_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
// GPIO
InitStruct.Alternate = GPIOAF7
USART2;
HALGPIO
Init(GPIOA, &GPIOInitStruct);
GPIO_InitStruct.Pin = USART2_CTS_FUNCTION_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
// GPIO
InitStruct.Alternate = GPIOAF7
USART2;
HALGPIO
Init(GPIOA, &GPIOInitStruct);