MSP432单片机library例程源码库+原理图芯片解密 时间:2026-10-13 来源: 芯片解密 浏览:2次 字号:大 中 小 芯片解密void time_show(void){ printf("\n\r"); timedisplay = 1; /* infinite loop */ while (1) { /* if 1s has paased */ if (timedisplay == 1) { /* display current time */ time_display(rtc_counter_get()); } }}复制代码实现RTC时钟显示功能的主程序为:int main(void){ /* configure systick */ systick_config(); /* configure EVAL_COM1 */ gd_eval_com_init(EVAL_COM1); /* NVIC config */ nvic_configuration(); printf( "\r\nThis is a RTC demo...... \r\n" ); if (bkp_read_data(BKP_DATA_0) != 0xA5A5) { // backup data register value is not correct or not yet programmed //(when the first time the program is executed) printf("\r\nThis is a RTC demo!\r\n"); printf("\r\n\n RTC not yet configured...."); // RTC configuration rtc_configuration(); printf("\r\n RTC configured...."); // adjust time by values entred by the user on the hyperterminal time_adjust(); bkp_write_data(BKP_DATA_0, 0xA5A5); } // display time in infinite loop time_show();} 上一篇:FM33LG0xx系列MCU,基于ARM Cortex-M0+内核单片机解密 下一篇:单片机解密STM32F407触摸屏虚拟按键控制LED灯源程序