summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-28 08:59:27 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-28 08:59:27 -0600
commit99fcf79fc071360adc4a105c0fc77ae9d05260cb (patch)
tree8d0c757f6ef15b0c0e7bb4f09c85da1d9fef6970
parente448f541cc0861569472833960e52fd519280be2 (diff)
downloadpx4-nuttx-99fcf79fc071360adc4a105c0fc77ae9d05260cb.tar.gz
px4-nuttx-99fcf79fc071360adc4a105c0fc77ae9d05260cb.tar.bz2
px4-nuttx-99fcf79fc071360adc4a105c0fc77ae9d05260cb.zip
EFM32: Correct a typo in LFXO bit in clock configuration
-rw-r--r--nuttx/arch/arm/src/efm32/efm32_clockconfig.c3
-rw-r--r--nuttx/configs/efm32-g8xx-stk/README.txt67
2 files changed, 65 insertions, 5 deletions
diff --git a/nuttx/arch/arm/src/efm32/efm32_clockconfig.c b/nuttx/arch/arm/src/efm32/efm32_clockconfig.c
index db6171926..13428e619 100644
--- a/nuttx/arch/arm/src/efm32/efm32_clockconfig.c
+++ b/nuttx/arch/arm/src/efm32/efm32_clockconfig.c
@@ -166,7 +166,7 @@ static void efm32_enable_lfxo(void)
{
/* Enable the LFXO */
- putreg32(CMU_OSCENCMD_LFRCOEN, EFM32_CMU_OSCENCMD);
+ putreg32(CMU_OSCENCMD_LFXOEN, EFM32_CMU_OSCENCMD);
efm32_statuswait(CMU_STATUS_LFXORDY);
}
@@ -610,6 +610,7 @@ static inline uint32_t efm32_lfaclk_config(uint32_t lfaclksel, bool ulfrco,
case CMU_LFCLKSEL_LFA_LFRCO:
{
efm32_enable_lfrco();
+ lfaclk = BOARD_LFRCO_FREQUENCY;
}
break;
diff --git a/nuttx/configs/efm32-g8xx-stk/README.txt b/nuttx/configs/efm32-g8xx-stk/README.txt
index 2ce5d1718..7f51388e1 100644
--- a/nuttx/configs/efm32-g8xx-stk/README.txt
+++ b/nuttx/configs/efm32-g8xx-stk/README.txt
@@ -16,11 +16,20 @@ README
• On-board SEGGER J-Link USB emulator
• ARM 20 pin JTAG/SWD standard Debug in/out connector
+CONTENTS
+=======
+
+ • Status
+ • LEDs
+ • Serial Console
+ • Using the J-Link GDB Server
+ • Configurations
+
STATUS
======
- My board is on order and has not arrived as of this writing. So no debug
- has yet been done. So the status is code-complete but untested.
+ Testing has just begun. So the status is code-complete but only
+ partially tested.
LEDs
====
@@ -64,7 +73,7 @@ LEDs
on a small proportion of the time.
*** LED2 may also flicker normally if signals are processed.
-Serial Console
+SERIAL CONSOLE
==============
Pin Availability
@@ -133,8 +142,58 @@ Serial Console
send commands to the BC. When EFM_BC_EN is low, EFM_BC_TX and EFM_BC_RX
can be used by other applications.
-Configurations
+USING THE J-LINK GDB SERVER
+===========================
+
+ 1. Star the J-Link GDB server. You should see the start-up confiration
+ window. SelectL
+
+ a. Target device = EFM32G880F128
+ b. Select Target interface = SWD
+
+ 2. Press OK. The GDB server should start and the last message in the Log
+ output should be "Waiting for GDB connection".
+
+ 3. In a terminal window, start GDB:
+
+ arm-none-eabi-gdb
+
+ 4. Connect to the J-Link GDB serer:
+
+ (gdb) target remote local host
+
+ 5. Load and run nuttx
+
+ (gdb) mon halt
+ (gdb) load nuttx
+ (gdb) mon reset go
+
+ I had to tinker with the setup a few times repeating the same steps above
+ before things finally began to work. Don't know why.
+
+ To debug code already burned into FLASH:
+
+ 1. Start the GDB server as above.
+
+ 2. In a terminal window, start GDB:
+
+ arm-none-eabi-gdb
+
+ 3. Connect to the J-Link GDB serer:
+
+ (gdb) target remote local host
+
+ 3. Load the nuttx symbol file, reset, and debug
+
+ (gdb) mon halt
+ (gdb) file nuttx
+ (gdb) mon reset
+ (gdb) s
+ ...
+
+CONFIGURATIONS
==============
+
Each EFM32 Gecko Starter Kit configuration is maintained in a sub-directory
and can be selected as follow: