Hi Thiha, First you need to create a stm32_adxl345.c to call the SPIn that you want to initialize/use and initialize the adxl372 driver passing this spi interface.
Please look at boards/arm/kl/freedom-kl25z/src/kl_adxl345.c to see how it is done for other board. Note that ADXL345 also uses an interruption pin, so you need to do it too, the functions name for stm32 arch is a different function (stm32_gpiosetevent). Look other examples inside boards/arm/stm32/stm32f4discovery/src and you will get it. I suggest you to create the driver inside boards/arm/stm32/common/src/ to be generic for all other stm32 boards. This is relatively recent modification that simplifies the board association with sensors. About which SPI pins to hook up, it will depend on what SPIn you are using and you can create a define inside "boards/arm/stm32/stm32f4discovery/include/board.h" Example: #define GPIO_SPI1_MISO GPIO_SPI1_MISO_1 #define GPIO_SPI1_MOSI GPIO_SPI1_MOSI_1 #define GPIO_SPI1_SCK GPIO_SPI1_SCK_1 You can "git grep" for these *_1 symbols to discovery where they were declared. This is an way to learn more about NuttX. BR, Alan On 12/2/20, Thiha Kyaw <thiha....@gmail.com> wrote: > Hi, > > I would like to test stm32f4discovery with adxl372_test. > > How to hook up the module with STM32F4Discovery board? > > If I want to change SPI, how I can do it. > > Please advise. > > Thanks. > > -- > Yours Sincerely, > Thiha Kyaw > > > -- > Yours Sincerely, > Thiha Kyaw >