From 638d27eabf74c2ea7f12f61336836f467a52d05b Mon Sep 17 00:00:00 2001 From: Rocco Marco Guglielmi Date: Fri, 30 Sep 2016 14:37:45 +0000 Subject: 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 --- testex/STM32/STM32F4xx/SPI-LIS3DSH/Makefile | 4 ++-- testex/STM32/STM32F4xx/SPI-LIS3DSH/mcuconf.h | 8 ++++++-- testex/STM32/STM32F4xx/SPI-LIS3DSH/readme.txt | 10 +++++----- 3 files changed, 13 insertions(+), 9 deletions(-) (limited to 'testex') 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. -- cgit v1.2.3