diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-03-28 08:04:45 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-03-28 08:04:45 +0000 |
commit | 347b801809d0c9c30c046d3a60277d05b1c8d86c (patch) | |
tree | 0a6f90a4cb0a67772ecb2b7c19743dd35125a8f0 /os/hal/platforms/LPC11xx | |
parent | 193bbcc9dd5305cb40057cfb7731006ac3600e35 (diff) | |
download | ChibiOS-347b801809d0c9c30c046d3a60277d05b1c8d86c.tar.gz ChibiOS-347b801809d0c9c30c046d3a60277d05b1c8d86c.tar.bz2 ChibiOS-347b801809d0c9c30c046d3a60277d05b1c8d86c.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1797 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/LPC11xx')
-rw-r--r-- | os/hal/platforms/LPC11xx/hal_lld.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/os/hal/platforms/LPC11xx/hal_lld.c b/os/hal/platforms/LPC11xx/hal_lld.c index 7d831dfa9..d513a6156 100644 --- a/os/hal/platforms/LPC11xx/hal_lld.c +++ b/os/hal/platforms/LPC11xx/hal_lld.c @@ -53,6 +53,16 @@ */
void hal_lld_init(void) {
+ /* Note: PRIGROUP 2:0 (2:6).*/
+// SCB->AIRCR = AIRCR_VECTKEY | SCB_AIRCR_PRIGROUP_0 | SCB_AIRCR_PRIGROUP_1;
+ NVICSetSystemHandlerPriority(HANDLER_SVCALL, CORTEX_PRIORITY_SVCALL);
+ NVICSetSystemHandlerPriority(HANDLER_SYSTICK, CORTEX_PRIORITY_SYSTICK);
+ NVICSetSystemHandlerPriority(HANDLER_PENDSV, CORTEX_PRIORITY_PENDSV);
+
+ /* Systick initialization.*/
+ SysTick->LOAD = LPC11xx_SYSCLK / (8000000 / CH_FREQUENCY) - 1;
+ SysTick->VAL = 0;
+ SysTick->CTRL = SysTick_CTRL_ENABLE_Msk | SysTick_CTRL_TICKINT_Msk;
}
/**
|