Commit 522008aa authored by Christian Eichler's avatar Christian Eichler
Browse files

Make interrupt handler naked

parent 5be1a8f8
......@@ -10,6 +10,8 @@
#include "GPIO.h"
#include "timer.h"
#define IHANDLER __attribute__ ((naked))
void _init() {}
/* Clock configuration */
......@@ -48,14 +50,14 @@ void SystemCoreClockSetup(void)
void gene_main(int);
void gene_init(void);
void PendSV_Handler() { while(1) {} }
void SysTick_Handler() { while(1) {} }
void SVC_Handler() { while(1) {} }
void HardFault_Handler() { while(1) {} }
void NMI_Handler() { while(1) {} }
void MemManage_Handler() { while(1) {} }
void UsageFault_Handler() { while(1) {} }
void BusFault_Handler() { while(1) {} }
IHANDLER void PendSV_Handler() { P1_1_toggle(); while(1) {} }
IHANDLER void SysTick_Handler() { P1_1_toggle(); while(1) {} }
IHANDLER void SVC_Handler() { P1_1_toggle(); while(1) {} }
IHANDLER void HardFault_Handler() { P1_1_toggle(); while(1) {} }
IHANDLER void NMI_Handler() { P1_1_toggle(); while(1) {} }
IHANDLER void MemManage_Handler() { P1_1_toggle(); while(1) {} }
IHANDLER void UsageFault_Handler() { P1_1_toggle(); while(1) {} }
IHANDLER void BusFault_Handler() { P1_1_toggle(); while(1) {} }
static void uint64_to_string(char *buf, uint64_t value) {
int digits = 0;
......@@ -172,8 +174,8 @@ int main(void) {
NVIC_SetPriorityGrouping(0);
NVIC_SetPriority(DebugMonitor_IRQn, 0);
NVIC_SetPriority(SysTick_IRQn, 5);
NVIC_SetPriority(SysTick_IRQn, 5);
for(int i = 0; i < 256; ++i) {
NVIC_SetPriority(i, 5);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment