Strange magnetometer values

By dan_leland , 17 July 2012

Hi to all,

I work with mpu6050 for UC3 (with the compass included), UC3 A3 xplained evaluation kit and JTAGICE mkII debugger.
I called back, in the main, the function inv_get_magnetometer_float, which allows me to evaluate the magnetic field, and I noticed that assumes exactly zero values ​​for all axes. I would like to know what these strange values ​​depend.

Thanks

guy_mcilroy

13 years 8 months ago

The most likely cause is that the device is operating in 6-axis mode, or the compass is not yet configured. Are you able to read registers from the device?

phpbb Post ID
20742

dan_leland

13 years 8 months ago

I consulted the document "MPU and MPU-6000-6050 Revision 3.2 Register Map and Descriptions" to find a way to access the records without success, thus can you tell me a solution to access the registers using atmel studio?

phpbb Post ID
20745

guy_mcilroy

13 years 8 months ago

Based on the datasheets, you can interface to the compass through the secondary I2C port, using the MPU 6050 as a bypass. If you want to use the 9-axis sensors in the UC3 Project and MotionApps functions, make sure UMPL_NINE_AXIS is defined within your project.

phpbb Post ID
20748

dan_leland

13 years 8 months ago

Hi,
I declared the symbol UMPL_NINE_AXIS but, when I compile I get the following error:

UMPL_NINE_AXIS not supported with MPU6050A2

I've seen that the AVR project available on the Donwload section if for 6-axis implementation (no compass).

Furthermore, in umpl-setup.c the following file is included


#ifdef UMPL_NINE_AXIS
#include "akm/inv_external_slave_akm8975.h"
#endif


but I don't see this file in the project. Where can I get these files?

Any help?

Regards


Following you can see the list of symobols on AVR32/GNU C Compiler:

-DBOARD=UC3_A3_XPLAINED -DEXT_BOARD=SENSORS_XPLAINED_INERTIAL_2 -DUMPL -DBIG_ENDIAN -DINV_UMPL=1 -DUMPL_TARGET_AT32 -DUMPL_ELIMINATE_ADVFUSION -DCONFIG_MPU_SENSORS_MPU6050B1 -DINV_FEATURE_GYROTC_UTC -DDMPDEFAULT_UNSORTEDKEYLOOKUP -DINV_CACHE_DMP=0 -DUMPL_ENABLE_TEMPCOMP -DUMPL_NINE_AXIS -I"../src" -I"../src/asf/avr32/boards" -I"../src/asf/avr32/boards/uc3_a3_xplained" -I"../src/asf/avr32/drivers/gpio" -I"../src/asf/avr32/drivers/intc" -I"../src/asf/avr32/utils" -I"../src/asf/avr32/utils/preprocessor" -I"../src/asf/common/applications/user_application/at32uc3a3256_uc3_a3_xplained" -I"../src/asf/common/boards" -I"../src/asf/common/utils" -I"../src/config" -I"../src/asf/avr32/drivers/pm" -I"../src/asf/avr32/drivers/flashc" -I"../src/asf/common/services/sleepmgr" -I"../src/asf/common/services/clock" -I"../src/asf/avr32/drivers/usbb" -I"../src/asf/common/services/usb/class/cdc/device" -I"../src/asf/common/services/usb/class/cdc" -I"../src/asf/common/services/usb" -I"../src/asf/common/services/usb/udc" -I"../src/asf/avr32/drivers/cpu/cycle_counter" -I"../src/asf/avr32/services/delay" -I"../src/asf/avr32/drivers/rtc" -I"../src/targets/uc3/bsp/umpl/platform/at32" -I"../src/targets/uc3/bsp/umpl" -I"../src/targets/uc3/bsp" -I"../src/targets/uc3/bsp/umpl/adv" -I"../src/targets/uc3/bsp/umpl/lite" -I"../src/targets/uc3/bsp/umpl/lite/accel" -I"../src/targets/uc3/bsp/umpl/platform/include" -I"../src/targets/uc3/bsp/umpl/platform/include/linux" -O0 -fdata-sections -ffunction-sections -g3 -Wall -c -std=gnu99 -Wstrict-prototypes -Werror-implicit-function-declaration -Wmissing-prototypes -Wpointer-arith -mrelax -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -mpart=uc3a3256
phpbb Post ID
20751

guy_mcilroy

13 years 8 months ago

Check out the umpl_setup.c file located here: srctargetsuc3bspumpl. Are you able to locate the source of that error? Make sure that CONFIG_MPU_SENSORS_MPU6050B1 is defined, and the MPU6050A2 is not.

phpbb Post ID
20754
phpbb Topic ID
14535