#include "cos_lpc51u68_bsp.h" int main(void) { uint32_t next_report_ms = 1000u; uint32_t report_count = 0u; cos_lpc51u68_uart0_init_9600_8n1(); cos_lpc51u68_systick_init_1ms(); cos_lpc51u68_uart0_puts("\r\nCOS LPC51U68 SysTick UART smoke test\r\n"); for (;;) { uint32_t now = cos_lpc51u68_systick_ms(); if ((int32_t)(now - next_report_ms) >= 0) { cos_lpc51u68_uart0_puts("systick ms "); cos_lpc51u68_uart0_put_hex32(now); cos_lpc51u68_uart0_puts(" report "); cos_lpc51u68_uart0_put_hex32(report_count++); cos_lpc51u68_uart0_puts("\r\n"); next_report_ms += 1000u; } __asm volatile("wfi"); } }