aboutsummaryrefslogtreecommitdiffstats
path: root/testex
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-09-30 14:37:45 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-09-30 14:37:45 +0000
commit638d27eabf74c2ea7f12f61336836f467a52d05b (patch)
tree07ce1a805a20beda5a12b69307c25f5112b4b5bb /testex
parent52bdd5d866ddb47a6251957168d2750a73417aaf (diff)
downloadChibiOS-638d27eabf74c2ea7f12f61336836f467a52d05b.tar.gz
ChibiOS-638d27eabf74c2ea7f12f61336836f467a52d05b.tar.bz2
ChibiOS-638d27eabf74c2ea7f12f61336836f467a52d05b.zip
Improved LIS3DSH driver and related demos: improved bias and sensitivity handling.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9830 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testex')
-rw-r--r--testex/STM32/STM32F4xx/SPI-LIS3DSH/Makefile4
-rw-r--r--testex/STM32/STM32F4xx/SPI-LIS3DSH/mcuconf.h8
-rw-r--r--testex/STM32/STM32F4xx/SPI-LIS3DSH/readme.txt10
3 files changed, 13 insertions, 9 deletions
diff --git a/testex/STM32/STM32F4xx/SPI-LIS3DSH/Makefile b/testex/STM32/STM32F4xx/SPI-LIS3DSH/Makefile
index de0645ee7..08f63d3e0 100644
--- a/testex/STM32/STM32F4xx/SPI-LIS3DSH/Makefile
+++ b/testex/STM32/STM32F4xx/SPI-LIS3DSH/Makefile
@@ -71,7 +71,7 @@ endif
# Enables the use of FPU (no, softfp, hard).
ifeq ($(USE_FPU),)
- USE_FPU = hard
+ USE_FPU = no
endif
#
@@ -114,7 +114,7 @@ CSRC = $(STARTUPSRC) \
$(HALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
- $(LIS3DSHSRC) \
+ $(LIS3DSHSRC) \
$(STREAMSSRC) \
$(SHELLSRC) \
usbcfg.c main.c
diff --git a/testex/STM32/STM32F4xx/SPI-LIS3DSH/mcuconf.h b/testex/STM32/STM32F4xx/SPI-LIS3DSH/mcuconf.h
index 0d478ebf8..9617cff3f 100644
--- a/testex/STM32/STM32F4xx/SPI-LIS3DSH/mcuconf.h
+++ b/testex/STM32/STM32F4xx/SPI-LIS3DSH/mcuconf.h
@@ -44,7 +44,11 @@
#define STM32_CLOCK48_REQUIRED TRUE
#define STM32_SW STM32_SW_PLL
#define STM32_PLLSRC STM32_PLLSRC_HSE
+#if defined(BOARD_ST_STM32F4_DISCOVERY)
#define STM32_PLLM_VALUE 8
+#else
+#define STM32_PLLM_VALUE 12
+#endif
#define STM32_PLLN_VALUE 336
#define STM32_PLLP_VALUE 2
#define STM32_PLLQ_VALUE 7
@@ -264,8 +268,8 @@
* SPI driver system settings.
*/
#define STM32_SPI_USE_SPI1 TRUE
-#define STM32_SPI_USE_SPI2 TRUE
-#define STM32_SPI_USE_SPI3 TRUE
+#define STM32_SPI_USE_SPI2 FALSE
+#define STM32_SPI_USE_SPI3 FALSE
#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0)
#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
diff --git a/testex/STM32/STM32F4xx/SPI-LIS3DSH/readme.txt b/testex/STM32/STM32F4xx/SPI-LIS3DSH/readme.txt
index c5d7d7bfb..226822f2d 100644
--- a/testex/STM32/STM32F4xx/SPI-LIS3DSH/readme.txt
+++ b/testex/STM32/STM32F4xx/SPI-LIS3DSH/readme.txt
@@ -1,19 +1,19 @@
*****************************************************************************
-** ChibiOS/HAL + ChibiOS/EX - SPI + LIS3DSH demo for STM32F4xx. **
+** ChibiOS/HAL - USB-CDC driver demo for STM32. **
*****************************************************************************
** TARGET **
-The demo runs on an STM32F407 Discovery board rev MB997C and MB997D.
+The demo runs on both Olimex STM32-E407 or STM32F4-Discovery boards, just
+change the board reference in the Makefile.
** The Demo **
-The demo flashes the board LED using a thread, read data from LIS3DSH printing
-it on a BaseSequentialStream (SDU1, mapped on USB virtual COM port).
+The application demonstrates the use of the STM32 USB (OTG) driver.
** Build Procedure **
-The demo has been tested by using the free Codesourcery GCC-based toolchain
+The demo has been tested using the free Codesourcery GCC-based toolchain
and YAGARTO.
Just modify the TRGT line in the makefile in order to use different GCC ports.