#define APB_MISC_BASE 0x70000000 #define PIN_UART1_TX 0x70003114 #define PAD_UART1_TX 0x700008BC void _start() { *(volatile unsigned int *)(PIN_UART1_TX) = (1 << 6) | (1 << 4); *(volatile unsigned int *)(PAD_UART1_TX) = 0x00000000; // Reset to defaults *(volatile unsigned int *)(PAD_UART1_TX) |= (0x1F << 12); // Max Drive Up *(volatile unsigned int *)(PAD_UART1_TX) |= (0x1F << 20); // Max Drive Down *(volatile unsigned int *)(0x60006010) |= (1 << 6); *(volatile unsigned int *)(0x7000600C) = 0x83; *(volatile unsigned int *)(0x70006000) = 0x71; // DLL for 1200 Baud @ 12MHz *(volatile unsigned int *)(0x70006004) = 0x02; // DLM *(volatile unsigned int *)(0x7000600C) = 0x03; while (1) { while (!(*(volatile unsigned int *)(0x70006014) & 0x20)) ; *(volatile unsigned int *)(0x70006000) = 0x55; // Alternating bits for (volatile int i = 0; i < 1000000; i++) ; } }