From 347b801809d0c9c30c046d3a60277d05b1c8d86c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 28 Mar 2010 08:04:45 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1797 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/LPC11xx/hal_lld.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'os/hal/platforms/LPC11xx') 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; } /** -- cgit v1.2.3