LPC17xx: Prioritized interrupts are not supported (although hooks are present to prioritize interrupts). Make LPC17 Ethernet default priority to be the system default, not the highest. If the unsupported feature is enabled, then at least it should do no harm

This commit is contained in:
Gregory Nutt 2014-04-19 07:56:59 -06:00
parent a1b862580b
commit c575c00147
2 changed files with 7 additions and 23 deletions

View File

@ -668,9 +668,10 @@ config NET_NRXDESC
config NET_PRIORITY
int "Ethernet interrupt priority"
default 0
default 128
depends on ARCH_IRQPRIO && EXPERIMENTAL
---help---
Ethernet interrupt priority. The is default is the higest priority (0).
Ethernet interrupt priority. The default is the default priority (128).
config NET_WOL
bool "Wake-up on LAN"

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/lpc17xx/lpc17_ethernet.c
*
* Copyright (C) 2010-2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2010-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -72,7 +72,7 @@
#if LPC17_NETHCONTROLLERS > 0
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
@ -104,28 +104,11 @@
#endif
/* If the user did not specify a priority for Ethernet interrupts, set the
* interrupt priority to the maximum (unless CONFIG_ARMV7M_USEBASEPRI is
* defined, then set it to the maximum allowable priority).
* interrupt priority to the default.
*/
#ifndef CONFIG_NET_PRIORITY
# ifdef CONFIG_ARMV7M_USEBASEPRI
# define CONFIG_NET_PRIORITY NVIC_SYSH_DISABLE_PRIORITY
# else
# define CONFIG_NET_PRIORITY NVIC_SYSH_PRIORITY_MAX
# endif
#endif
/* If the priority is set at the max (0) and CONFIG_ARMV7M_USEBASEPRI is
* defined, then silently drop the priority to NVIC_SYSH_DISABLE_PRIORITY.
* In this configuratin, nothing is permitted to run at priority zero
* except for the SVCALL handler. NVIC_SYSH_DISABLE_PRIORITY is the
* maximum allowable priority in that case.
*/
#if CONFIG_NET_PRIORITY == 0 && defined(CONFIG_ARMV7M_USEBASEPRI)
# undef CONFIG_NET_PRIORITY
# define CONFIG_NET_PRIORITY NVIC_SYSH_DISABLE_PRIORITY
# define CONFIG_NET_PRIORITY NVIC_SYSH_PRIORITY_DEFAULT
#endif
/* Debug Configuration *****************************************************/