Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
1925e60d
Commit
1925e60d
authored
12 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
fix LPC177x/8x GPIO debug instrumentation
parent
f66e89b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
ChangeLog
+9
-0
9 additions, 0 deletions
ChangeLog
Kconfig
+40
-12
40 additions, 12 deletions
Kconfig
arch/arm/src/lpc17xx/lpc178x_gpio.h
+0
-6
0 additions, 6 deletions
arch/arm/src/lpc17xx/lpc178x_gpio.h
arch/arm/src/lpc17xx/lpc17_gpiodbg.c
+22
-5
22 additions, 5 deletions
arch/arm/src/lpc17xx/lpc17_gpiodbg.c
with
71 additions
and
23 deletions
ChangeLog
+
9
−
0
View file @
1925e60d
...
...
@@ -4514,4 +4514,13 @@
* arch/arm/src/lpc17xx/lpc17_gpio.c/.h: Separate LPC176x and LPC178x
logic into separate files. The logic is diverging to much to
try to retain common code (2013-4-03).
* net/net_clone.c: Fix compilation error when socket options are
are disabled. Reported by Daniel O'Connor (2013-4-05).
* configs/zkit-arm-1769/src/up_leds.c: Fix a typo introduced into
the button interrupt logic (2013-4-05).
* arch/arm/src/lpc17xx/lpc178x_gpio.c: Re-design of the GPIO
logic for the LPC178x family by Rommel Marcelo (2013-4-05).
* arch/arm/src/lpc17_gpiodbg.c: Updated so that it correctly
reports LPC177x/8x GPIO registers when GPIO debug is enabled
(2013-4-05).
This diff is collapsed.
Click to expand it.
Kconfig
+
40
−
12
View file @
1925e60d
...
...
@@ -398,71 +398,99 @@ config DEBUG_LCD
default n
depends on LCD
---help---
Enable low level debug SYSLOG output from the LCD driver (disabled by default)
Enable low level debug SYSLOG output from the LCD driver (disabled
by default). Support for this debug option is board-specific and
may not be available for some boards.
config DEBUG_LEDS
bool "Enable Low-level LED Debug Output"
default n
depends on ARCH_HAVE_LEDS
---help---
Enable low level debug from board-specific LED logic
Enable low level debug from board-specific LED logic. Support for
this debug option is board-specific and may not be available for
some boards.
config DEBUG_INPUT
bool "Enable Input Device Debug Output"
default n
depends on INPUT
---help---
Enable low level debug SYSLOG output from the input device drivers such as
mice and touchscreens (disabled by default)
Enable low level debug SYSLOG output from the input device drivers
such as mice and touchscreens (disabled by default). Support for
this debug option is board-specific and may not be available for
some boards.
config DEBUG_ANALOG
bool "Enable Analog Device Debug Output"
default n
---help---
Enable low level debug SYSLOG output from the analog device drivers such as
A/D and D/A converters (disabled by default)
Enable low level debug SYSLOG output from the analog device drivers
such as A/D and D/A converters (disabled by default). Support for
this debug option is architecgture-specific and may not be available
for some MCUs.
config DEBUG_I2C
bool "Enable I2C Debug Output"
default n
depends on I2C
---help---
Enable I2C driver debug SYSLOG output (disabled by default)
Enable I2C driver debug SYSLOG output (disabled by default).
Support for this debug option is architecgture-specific and may not
be available for some MCUs.
config DEBUG_SPI
bool "Enable SPI Debug Output"
default n
depends on SPI
---help---
Enable I2C driver debug SYSLOG output (disabled by default)
Enable I2C driver debug SYSLOG output (disabled by default).
Support for this debug option is architecgture-specific and may not
be available for some MCUs.
config DEBUG_CAN
bool "Enable CAN Debug Output"
default n
depends on CAN
---help---
Enable CAN driver debug SYSLOG output (disabled by default)
Enable CAN driver debug SYSLOG output (disabled by default).
Support for this debug option is architecgture-specific and may not
be available for some MCUs.
config DEBUG_SDIO
bool "Enable SDIO Debug Output"
default n
depends on MMCSD_SDIO
---help---
Enable SDIO driver debug SYSLOG output (disabled by default)
Enable SDIO driver debug SYSLOG output (disabled by default).
Support for this debug option is architecgture-specific and may not
be available for some MCUs.
config DEBUG_GPIO
bool "Enable GPIO Debug Output"
default n
---help---
Enable GPIO-releated debug SYSLOG output (disabled by default).
Support for this debug option is architecgture-specific and may not
be available for some MCUs.
config DEBUG_DMA
bool "Enable DMA Debug Output"
default n
depends on ARCH_DMA
---help---
Enable DMA-releated debug SYSLOG output (disabled by default)
Enable DMA-releated debug SYSLOG output (disabled by default).
Support for this debug option is architecgture-specific and may not
be available for some MCUs.
config DEBUG_WATCHDOG
bool "Enable Watchdog Timer Debug Output"
default n
depends on WATCHDOG
---help---
Enable watchdog timer debug SYSLOG output (disabled by default)
Enable watchdog timer debug SYSLOG output (disabled by default).
Support for this debug option is architecgture-specific and may not
be available for some MCUs.
endif
...
...
This diff is collapsed.
Click to expand it.
arch/arm/src/lpc17xx/lpc178x_gpio.h
+
0
−
6
View file @
1925e60d
...
...
@@ -195,12 +195,6 @@ extern "C"
#define EXTERN extern
#endif
/* These tables have global scope only because they are shared between lpc17_gpio.c,
* lpc17_gpioint.c, and lpc17_gpiodbg.c
*/
EXTERN
const
uint32_t
g_ioconport
[
GPIO_NPORTS
];
/****************************************************************************
* Public Functions
****************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
arch/arm/src/lpc17xx/lpc17_gpiodbg.c
+
22
−
5
View file @
1925e60d
/****************************************************************************
* arch/arm/src/lpc17xx/lpc17_gpiodbg.c
*
* Copyright (C) 2010-2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2010-2011
, 2013
Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
...
...
@@ -39,6 +39,7 @@
#include
<nuttx/config.h>
#include
<sys/types.h>
#include
<stdint.h>
#include
<stdbool.h>
#include
<debug.h>
...
...
@@ -48,7 +49,6 @@
#include
"chip.h"
#include
"lpc17_gpio.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
...
...
@@ -80,6 +80,7 @@
*
****************************************************************************/
#ifdef LPC176x
static
uint32_t
lpc17_pinsel
(
unsigned
int
port
,
unsigned
int
pin
)
{
if
(
pin
<
16
)
...
...
@@ -91,6 +92,7 @@ static uint32_t lpc17_pinsel(unsigned int port, unsigned int pin)
return
g_hipinsel
[
port
];
}
}
#endif
/* LPC176x */
/****************************************************************************
* Name: lpc17_pinmode
...
...
@@ -101,6 +103,7 @@ static uint32_t lpc17_pinsel(unsigned int port, unsigned int pin)
*
****************************************************************************/
#ifdef LPC176x
static
uint32_t
lpc17_pinmode
(
unsigned
int
port
,
unsigned
int
pin
)
{
if
(
pin
<
16
)
...
...
@@ -112,6 +115,7 @@ static uint32_t lpc17_pinmode(unsigned int port, unsigned int pin)
return
g_hipinmode
[
port
];
}
}
#endif
/* LPC176x */
/****************************************************************************
* Global Functions
...
...
@@ -125,12 +129,16 @@ static uint32_t lpc17_pinmode(unsigned int port, unsigned int pin)
*
****************************************************************************/
int
lpc17_dumpgpio
(
uint16
_t
pinset
,
const
char
*
msg
)
int
lpc17_dumpgpio
(
lpc17_pinset
_t
pinset
,
const
char
*
msg
)
{
irqstate_t
flags
;
uint32_t
base
;
#if defined(LPC176x)
uint32_t
pinsel
;
uint32_t
pinmode
;
#elif defined(LPC178x)
uint32_t
iocon
;
#endif
/* LPC176x */
unsigned
int
port
;
unsigned
int
pin
;
...
...
@@ -138,19 +146,28 @@ int lpc17_dumpgpio(uint16_t pinset, const char *msg)
port
=
(
pinset
&
GPIO_PORT_MASK
)
>>
GPIO_PORT_SHIFT
;
pin
=
(
pinset
&
GPIO_PIN_MASK
)
>>
GPIO_PIN_SHIFT
;
#if defined(LPC176x)
pinsel
=
lpc17_pinsel
(
port
,
pin
);
pinmode
=
lpc17_pinmode
(
port
,
pin
);
#elif defined(LPC178x)
iocon
=
LPC17_IOCON_P
(
port
,
pin
);
#endif
/* LPC176x */
/* The following requires exclusive access to the GPIO registers */
flags
=
irqsave
();
lldbg
(
"GPIO%c pinset: %08x -- %s
\n
"
,
port
+
'0'
,
pinset
,
msg
);
lldbg
(
"GPIO%c
pin%d (
pinset: %08x
)
-- %s
\n
"
,
port
+
'0'
,
pin
,
pinset
,
msg
);
#if defined(LPC176x)
lldbg
(
" PINSEL[%08x]: %08x PINMODE[%08x]: %08x ODMODE[%08x]: %08x
\n
"
,
pinsel
,
pinsel
?
getreg32
(
pinsel
)
:
0
,
pinmode
,
pinmode
?
getreg32
(
pinmode
)
:
0
,
g_odmode
[
port
],
getreg32
(
g_odmode
[
port
]));
#elif defined(LPC178x)
lldbg
(
" IOCON[%08x]:
\n
"
,
getreg32
(
iocon
));
#endif
base
=
g_fiobase
[
port
];
lldbg
(
" FIODIR[%08x]: %08x FIOMASK[%08x]: %08x FIOPIN[%08x]: %08x
\n
"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment