board.c 952 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * File : board.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2009 - 2011 RT-Thread Develop Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2011-02-24 Bernard first implementation
  13. */
  14. #include <rthw.h>
  15. #include <rtthread.h>
  16. #include "board.h"
  17. #include "mb9bf506r.h"
  18. #include "core_cm3.h"
  19. extern const uint32_t SystemFrequency;
  20. /**
  21. * @addtogroup FM3
  22. */
  23. /*@{*/
  24. /**
  25. * This is the timer interrupt service routine.
  26. *
  27. */
  28. void SysTick_Handler(void)
  29. {
  30. /* enter interrupt */
  31. rt_interrupt_enter();
  32. rt_tick_increase();
  33. /* leave interrupt */
  34. rt_interrupt_leave();
  35. }
  36. /**
  37. * This function will initial FM3 Easy Kit board.
  38. */
  39. void rt_hw_board_init()
  40. {
  41. /* init systick */
  42. SysTick_Config(SystemFrequency/RT_TICK_PER_SECOND);
  43. }
  44. /*@}*/