Skip to main content
JLiew.1162
Associate II
October 15, 2021
Solved

Obtaining 3 axis data from LIS2DW12 using Steval-Smartag 1 board

  • October 15, 2021
  • 2 replies
  • 1383 views

Hi there! I was wondering if I am able to obtain 3 axis data from LIS2DW12 using Steval-Smartag 1 board. If this is possible could you provide the software and programs to be installed.

Thanks!

    This topic has been closed for replies.
    Best answer by Eleon BORLINI

    Hi @JLiew.1162​ ,

    you can refer to the FP-SNS-SMARTAG1 function pack, that implements some examples with the Steval-Smartag 1 board and motion and environmental sensors.

    In particular, you can refer to the below functions, that you can find in the \Drivers\BSP\SmarTag folder (SmarTag_motion_sensors.c):

    int32_t SMARTAG_MOTION_SENSOR_GetAxesRaw(uint32_t Instance, uint32_t Function, SMARTAG_MOTION_SENSOR_AxesRaw_t *Axes)
     
    int32_t SMARTAG_MOTION_SENSOR_GetAxes(uint32_t Instance, uint32_t Function, SMARTAG_MOTION_SENSOR_Axes_t *Axes)

    For the NFC transmission you probably have to call this other function in the main.c:

    void MEMS_Sensors_ReadData(void)

    If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster. 

    -Eleon

    2 replies

    Eleon BORLINI
    Eleon BORLINIBest answer
    ST Employee
    October 15, 2021

    Hi @JLiew.1162​ ,

    you can refer to the FP-SNS-SMARTAG1 function pack, that implements some examples with the Steval-Smartag 1 board and motion and environmental sensors.

    In particular, you can refer to the below functions, that you can find in the \Drivers\BSP\SmarTag folder (SmarTag_motion_sensors.c):

    int32_t SMARTAG_MOTION_SENSOR_GetAxesRaw(uint32_t Instance, uint32_t Function, SMARTAG_MOTION_SENSOR_AxesRaw_t *Axes)
     
    int32_t SMARTAG_MOTION_SENSOR_GetAxes(uint32_t Instance, uint32_t Function, SMARTAG_MOTION_SENSOR_Axes_t *Axes)

    For the NFC transmission you probably have to call this other function in the main.c:

    void MEMS_Sensors_ReadData(void)

    If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster. 

    -Eleon

    JLiew.1162
    Associate II
    October 15, 2021

    Dear @Eleon BORLINI​ ,

    Thanks for the quick reply! Sorry could you clarify if any software would be required to run this code? As I currently obtain measurements from the SMARTAG-1 by using a ST25R3911B-DISCO reader.

    Thanks again,

    Jia Xiang

    Eleon BORLINI
    ST Employee
    October 15, 2021

    Hi Jia,

    you can use the STM32CubeIDE to build the project.

    You can program it by connecting P201 is a JTAG/SWD interface to assist in software development. It can be connected to an external ST-LINK/V2 device using a 9-pin Cortex-M adapter.

    -Eleon

    JLiew.1162
    Associate II
    October 15, 2021

    Dear Eleon,

    Thanks for the reply. To clarify, would I be able to build the project using STM32CubeIDE and program it with a ST25R3911B-DISCO reader wirelessly?

    Thanks and have a great weekend,

    Jia Xiang