1 /* 2 * Copyright (c) 2006-2021, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2014-08-03 aozima first implementation 9 */ 10 11 #include <rthw.h> 12 #include <rtthread.h> 13 14 #include "board.h" 15 16 /** 17 * @addtogroup CME_M7 18 */ 19 20 /*@{*/ 21 22 /** 23 * This is the timer interrupt service routine. 24 * 25 */ SysTick_Handler(void)26void SysTick_Handler(void) 27 { 28 /* enter interrupt */ 29 rt_interrupt_enter(); 30 31 rt_tick_increase(); 32 33 /* leave interrupt */ 34 rt_interrupt_leave(); 35 } 36 idle_hook(void)37static void idle_hook(void) 38 { 39 __WFI(); 40 } 41 42 /** 43 * This function will initial board. 44 */ rt_hw_board_init()45void rt_hw_board_init() 46 { 47 //rt_thread_idle_sethook(idle_hook); 48 49 /* Configure the NVIC Preemption Priority Bits */ 50 NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); 51 52 SysTick_Config(SYSTEM_CLOCK_FREQ / RT_TICK_PER_SECOND); 53 54 rt_components_board_init(); 55 rt_console_set_device(RT_CONSOLE_DEVICE_NAME); 56 } 57 58 /*@}*/ 59