USART1 TX troubles on STM32F407
I have an STM32F07IGH6U MCU on an STM3240G-EVAL board, and I'm trying to achieve serial communication with my PC. Receiving works fine, but transmitting is failing in weird ways. I'm quite new to the world of microcontrollers, so please pardon my ignorance.
Here's my setup:
- USART1 parameters:
- 115200 baudrate
- 8 bits word length
- No parity
- 1 stop bit
- PA9 (USART1_TX) and PA10 (USART1_RX) connected to a Sparkfun FTDI Basic board.
- Grounds are connected.
- Resistors R21 and R18 have been removed from the board, per the user guide.
- FTDI Basic board connected to USB 2.0 port on my PC. Monitored in RealTerm.
- Code generated with STM32CubeMX.
- Debugging via CN21 in System Workbench.
All my code is doing is transmitting a continuous stream of "U" characters, which I would expect to produce a square wave with a frequency equal to half the baudrate and an amplitude of 3.3 V. That's exactly what it looks like on the RX line when I send U's via RealTerm and probe between the MCU and the FTDI Basic. But when I probe the TX line, it shows a DC offset of about 2.20 V and an amplitude of about 0.24 V (Figure 1). Why?
I tried another test, disconnecting the FTDI Basic from the MCU. When MX_USART1_UART_Init() runs and initializes the internal pull-up resistor on PA9, the voltage jumps to 3.3 V relatively fast. But when I disconnect power from the board after this occurs and before main() runs, the voltage on PA9 gradually drops toward zero, as if there were a capacitor on PA9 (Figure 2). Repeating with the FTDI Basic results in the same effect, but with a DC offset of about 1 V.
main() function
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_DMA_Init();
MX_USART1_UART_Init();
MX_IWDG_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
uint8_t Test = 0x55; // U == 0101 0101
HAL_UART_Transmit_IT(&huart1, &Test, sizeof(Test));
}
/* USER CODE END 3 */
}Blue is PA9 and yellow is PA10.
Figure 1: Transmitting "U" stream

Figure 2: Powering down from 3.3 V

Where is this apparent capacitance coming from? Is the pin fried? Do I have no idea what I'm doing? Any assistance would be greatly appreciated.
