Alexan E
/
FlashingLeds
Flashing leds using the four timer interrupts , 100ms, 200ms, 400ms, 800ms
Revision 2:c4ff35a68acd, committed 2012-05-24
- Comitter:
- alexan_e
- Date:
- Thu May 24 15:26:39 2012 +0000
- Parent:
- 1:2de8ee478e07
- Commit message:
- Changed interrupt priority comment, the CortexM0 has four levels 0-3.
Moved the SetPriority function before the interrupt enable. In CortexM0 the priority shouldnt be changed while the interrupt is enabled
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 2de8ee478e07 -r c4ff35a68acd main.cpp --- a/main.cpp Sat May 19 23:32:26 2012 +0000 +++ b/main.cpp Thu May 24 15:26:39 2012 +0000 @@ -183,18 +183,18 @@ Vectored Interrupt initialization ******************************************************************************/ + NVIC_SetPriority(TIMER_16_0_IRQn,0); /* Default priority group 0, can be 0(highest) - 3(lowest) */ NVIC_EnableIRQ(TIMER_16_0_IRQn); /* Enable 16-bit Timer0 Interrupt */ - NVIC_SetPriority(TIMER_16_0_IRQn,0); /* Default priority group 0, can be 0(highest) - 31(lowest) */ - + + NVIC_SetPriority(TIMER_16_1_IRQn,0); /* Default priority group 0, can be 0(highest) - 3(lowest) */ NVIC_EnableIRQ(TIMER_16_1_IRQn); /* Enable 16-bit Timer1 Interrupt */ - NVIC_SetPriority(TIMER_16_1_IRQn,0); /* Default priority group 0, can be 0(highest) - 31(lowest) */ - + + NVIC_SetPriority(TIMER_32_0_IRQn,0); /* Default priority group 0, can be 0(highest) - 3(lowest) */ NVIC_EnableIRQ(TIMER_32_0_IRQn); /* Enable 32-bit Timer0 Interrupt */ - NVIC_SetPriority(TIMER_32_0_IRQn,0); /* Default priority group 0, can be 0(highest) - 31(lowest) */ - + + NVIC_SetPriority(TIMER_32_1_IRQn,0); /* Default priority group 0, can be 0(highest) - 3(lowest) */ NVIC_EnableIRQ(TIMER_32_1_IRQn); /* Enable 32-bit Timer1 Interrupt */ - NVIC_SetPriority(TIMER_32_1_IRQn,0); /* Default priority group 0, can be 0(highest) - 31(lowest) */ - + /****************************************************************************** Timer0(CT32B0) (32bit) *******************************************************************************