Question
STM32F407 UART problems. PuTTY, FTDI USB to TTL converter
EDIT: For crying out loud. Why is half of my code chopped off?
#if !defined(__SOFT_FP__) && defined(__ARM_FP)
#warning "FPU is not initialized, but the project is compiling for an FPU. Please initialize the FPU before use."
#endif
#include "stm32f4xx.h"
// UART1 is used. Sits on APB2 bus
// GPIOA sits on AHB1 bus. USART1 is AF7 for PA9 and PA10
// PA9: USART1_TX
// PA10: USART1_RX
// Baudrate: 9600
void funcGPIOInit();
void funcUARTInit();
void funcUARTSend();
int main(void)
{
funcGPIOInit();
funcUARTInit();
funcUARTSend();
for(;;)
{
}
}
void funcGPIOInit()
{
// Enable AHB1 bus. Set PA9 and PA10 to AF,
RCC->AHB1ENR |= (1MODER |= (2MODER |= (2OTYPER &= ~(1OTYPER &= ~(1OSPEEDR &= ~(3OSPEEDR &= ~(3PUPDR &= ~(3PUPDR &= ~(3AFR[1] |= (7AFR[1] |= (7APB2ENR |= (1BRR = 0xD03;
USART1->CR1 |= (1CR1 &= ~(1CR1 &= ~(1CR1 |= (1CR2 &= ~(3CR1 |= (1DR = 120;
}