2019-09-20 10:01 AM
I need to know how to take the magnetic sensor data from the built in sensor in the discovery board. I'm using CubeMX to generate the basic configuration code and i'm also using HAL library for programming the MCU in Embedded C. All I need is just to read and store the sensor data into some variables.
2019-09-24 07:05 AM
Hi @KShar , don't think there is a plug-play version of E-Compass library for the discovery kit. So I suggest you to start from the X-CUBE-MEMS1 library package, which is however designed for the STM32 Nucleo development board. You can refer to the UM2225 app note, where the function:
void MotionEC_Run(MEC_input_t *data_in, MEC_output_t *data_out)
is described. This function gets the sensor data into the variable *data_in and returns the calculated values in the *data_out variable. Regards
2019-09-24 07:14 AM
The F303 discovery board came with an e-compass demo firmware.
2019-09-24 07:23 AM
Don't know if it's better to start from a STM32F3 Discovery FW or STM32F4 Nucleo FW...