Explains how to generate a log screen.
#include <stm32f4xx.h>
#include <stdio.h>
static __IO uint32_t TimingDelay;
void Delay(__IO uint32_t nTime) {
TimingDelay = nTime;
while (TimingDelay != 0);
}
void SysTick_Handler(void) {
if (TimingDelay) {
TimingDelay--;
}
}
int main(void) {
uint8_t i = 0;
char str[20];
if (SysTick_Config(SystemCoreClock / 1000)) {
while (1);
}
for (;;) {
sprintf(str, "Log message %u", i++);
Delay(1000);
}
return 0;
}