Hi,
I am using RIOT-OS in STM32F4discovery. The hello world program runs very well.
Unfortunately I can compile the lis3dh example (located in
/RIOT/tests/driver_lis3dh) but the program didn’t run on the board correctly.
Because I read 255 from the LIS3DH_REG_WHO_AM_I Register. Did you have any idea
how to let the lis3dh example run correctly in STM32F4discovery properly.
Many thanks,
Abdel
Similar to the hello world program, I copied the /RIOT/tests/driver_lis3dh in a
new directory.
I added at the beginning of the main program:
#include <stdio.h>
#include "board.h"
#include "xtimer.h"
#include "periph/spi.h"
#include "periph/gpio.h"
#include "lis3dh.h"
#include "vtimer.h"
#define LIS3DH_CS GPIO_PIN(PORT_E, 3)
#define LIS3DH_SPI SPI_0
#define LIS3DH_INT1 GPIO_PIN(PORT_E, 0)
#define LIS3DH_INT2 GPIO_PIN(PORT_E, 1)
I used the following Makefile:
APPLICATION = driver_lis3dh
#include ../Makefile.tests_common
RIOTBASE ?= $(CURDIR)/../RIOT
QUIET ?= 1
FEATURES_REQUIRED = periph_spi periph_gpio
USEMODULE += lis3dh
USEMODULE += xtimer
USEMODULE += vtimer
include $(RIOTBASE)/Makefile.include
_______________________________________________
users mailing list
[email protected]
https://lists.riot-os.org/mailman/listinfo/users