Skip to content

Commit

Permalink
fix interrupt handlers for FreeRTOS usage
Browse files Browse the repository at this point in the history
  • Loading branch information
pwittich committed Apr 6, 2019
1 parent e4f0a57 commit 40a58e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 40 deletions.
6 changes: 0 additions & 6 deletions projects/project2/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,6 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )


/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
standard names. */
//#define xPortPendSVHandler PendSVHandler
//#define vPortSVCHandler SVCHandler
//#define xPortSysTickHandler SysTick_Handler

/* Normal assert() semantics without relying on the provision of an assert.h
header file. */
//#define configASSERT( x ) if( ( x ) == 0UL ) { taskDISABLE_INTERRUPTS(); for( ;; ); }
Expand Down
10 changes: 0 additions & 10 deletions projects/project2/project2.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,16 +343,6 @@ void SystemInit()

volatile uint32_t g_ui32SysTickCount;

//*****************************************************************************
//
// This is the interrupt handler for the SysTick interrupt.
//
//*****************************************************************************
void
SysTickHandler(void)
{
g_ui32SysTickCount++;
}



Expand Down
30 changes: 6 additions & 24 deletions projects/project2/startup_gcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ void ResetISR(void);
static void NmiSR(void);
static void FaultISR(void);
static void IntDefaultHandler(void);
void SVHandler(void);
static void PendSVHandler(void);
extern void SysTickHandler(void);
extern void UARTIntHandler(void);
extern void xPortPendSVHandler(void);
extern void vPortSVCHandler(void);
extern void xPortSysTickHandler(void);

//*****************************************************************************
//
Expand Down Expand Up @@ -75,11 +75,11 @@ void (* const g_pfnVectors[])(void) =
0, // Reserved
0, // Reserved
0, // Reserved
SVHandler, // SVCall handler
vPortSVCHandler, // SVCall handler
IntDefaultHandler, // Debug monitor handler
0, // Reserved
PendSVHandler, // The PendSV handler
SysTickHandler, // The SysTick handler
xPortPendSVHandler, // The PendSV handler
xPortSysTickHandler, // The SysTick handler
IntDefaultHandler, // GPIO Port A
IntDefaultHandler, // GPIO Port B
IntDefaultHandler, // GPIO Port C
Expand Down Expand Up @@ -318,24 +318,6 @@ IntDefaultHandler(void)
}
}

void SVHandler(void)
{
//
// Go into an infinite loop.
//
while(1)
{
}
}

static void PendSVHandler(void)
{
//
// Go into an infinite loop.
//
while(1)
{
}
}


0 comments on commit 40a58e6

Please sign in to comment.