Fix a PIC32 software interrupt bug (pipeline hazard)

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4224 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-12-25 15:56:08 +00:00
parent db207f194a
commit 0e03562b45
3 changed files with 52 additions and 12 deletions

View File

@ -54,6 +54,7 @@ Contents
Powering the Board
Creating Compatible NuttX HEX files
Serial Console
LEDs
PIC32MX Configuration Options
Configurations
@ -596,6 +597,43 @@ Serial Console
26 3.3V
28 GND
LEDs
====
The PIC32MX Ethernet Starter kit has 3 user LEDs labeled LED1-3 on the
board graphics (but referred to as LED4-6 in the schematic):
PIN User's Guide Board Stencil Notes
--- ------------- -------------- -------------------------
RD0 "User LED D4" "LED1 (RD0") High illuminates (RED)
RD2 "User LED D5" "LED3 (RD2)" High illuminates (YELLOW)
RD1 "User LED D6" "LED2 (RD1)" High illuminates (GREEN)
We will use the labels on the board to identify LEDs. If CONFIG_ARCH_LEDS
is defined, then NuttX will control these LEDs as follows:
ON OFF
------------------------- ---- ---- ---- ---- ---- ----
LED1 LED2 LED3 LED1 LED2 LED3
------------------------- ---- ---- ---- ---- ---- ----
LED_STARTED 0 OFF OFF OFF --- --- ---
LED_HEAPALLOCATE 1 ON OFF N/C --- --- ---
LED_IRQSENABLED 2 OFF ON N/C --- --- ---
LED_STACKCREATED 3 ON ON N/C --- --- ---
LED_INIRQ 4 N/C N/C ON N/C N/C OFF
LED_SIGNAL 4 N/C N/C ON N/C N/C OFF
LED_ASSERTION 4 N/C N/C ON N/C N/C OFF
LED_PANIC 5 ON N/C N/C OFF N/C N/C
There are 5 additional LEDs available on the MEB. These are not
used by NuttX.
RD1 LED1
RD2 LED2
RD3 LED3
RC1 LED4
RC2 LED5
PIC32MX Configuration Options
=============================

View File

@ -89,10 +89,10 @@
* board graphics (but referred to as LED4-6 in the schematic):
*
* PIN User's Guide Board Stencil Notes
* --- ------------- -------------- -------------------
* RD0 "User LED D4" "LED1 (RD0") High illuminates
* RD2 "User LED D5" "LED3 (RD2)" High illuminates
* RD1 "User LED D6" "LED2 (RD1)" High illuminates
* --- ------------- -------------- -------------------------
* RD0 "User LED D4" "LED1 (RD0") High illuminates (RED)
* RD2 "User LED D5" "LED3 (RD2)" High illuminates (YELLOW)
* RD1 "User LED D6" "LED2 (RD1)" High illuminates (GREEN)
*
* We will use the labels on the board to identify LEDs
*
@ -107,7 +107,7 @@
* LED_INIRQ 4 N/C N/C ON N/C N/C OFF
* LED_SIGNAL 4 N/C N/C ON N/C N/C OFF
* LED_ASSERTION 4 N/C N/C ON N/C N/C OFF
* LED_PANIC 4 N/C N/C ON N/C N/C OFF
* LED_PANIC 5 ON N/C N/C OFF N/C N/C
*
* There are 5 additional LEDs available on the MEB:
*
@ -125,9 +125,9 @@
#define LED_INIRQ 4
#define LED_SIGNAL 4
#define LED_ASSERTION 4
#define LED_PANIC 4
#define LED_PANIC 5
#define LED_NVALUES 5
#define LED_NVALUES 6
/* Switch definitions *******************************************************/
/* The PIC32 start kit has 3 switches:

View File

@ -64,10 +64,10 @@
* board graphics (but referred to as LED4-6 in the schematic):
*
* PIN User's Guide Board Stencil Notes
* --- ------------- -------------- -------------------
* RD0 "User LED D4" "LED1 (RD0") High illuminates
* RD2 "User LED D5" "LED3 (RD2)" High illuminates
* RD1 "User LED D6" "LED2 (RD1)" High illuminates
* --- ------------- -------------- -------------------------
* RD0 "User LED D4" "LED1 (RD0") High illuminates (RED)
* RD2 "User LED D5" "LED3 (RD2)" High illuminates (YELLOW)
* RD1 "User LED D6" "LED2 (RD1)" High illuminates (GREEN)
*
* We will use the labels on the board to identify LEDs
*
@ -82,7 +82,7 @@
* LED_INIRQ 4 N/C N/C ON N/C N/C OFF
* LED_SIGNAL 4 N/C N/C ON N/C N/C OFF
* LED_ASSERTION 4 N/C N/C ON N/C N/C OFF
* LED_PANIC 4 N/C N/C ON N/C N/C OFF
* LED_PANIC 5 ON N/C N/C OFF N/C N/C
*/
#define GPIO_LED_1 (GPIO_OUTPUT|GPIO_VALUE_ZERO|GPIO_PORTD|GPIO_PIN0)
@ -134,6 +134,7 @@ static const struct led_setting_s g_ledonvalues[LED_NVALUES] =
{LED_OFF, LED_ON, LED_NC, LED_OFF},
{LED_ON, LED_ON, LED_NC, LED_OFF},
{LED_NC, LED_NC, LED_ON, LED_OFF},
{LED_ON, LED_NC, LED_NC, LED_OFF},
};
static const struct led_setting_s g_ledoffvalues[LED_NVALUES] =
@ -143,6 +144,7 @@ static const struct led_setting_s g_ledoffvalues[LED_NVALUES] =
{LED_NC, LED_NC, LED_NC, LED_OFF},
{LED_NC, LED_NC, LED_NC, LED_OFF},
{LED_NC, LED_NC, LED_OFF, LED_OFF},
{LED_OFF, LED_NC, LED_NC, LED_OFF},
};
/****************************************************************************