This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ICM20948 magnetometer issue

Hi,

I am develloping product witch ICM20948 and need to use magnetometer. I tried to move some existing and working code for arduino. I was able to get data from magnetometer. But next day when i tried the same thing, magnetometer wasnt responding. Just sometimes it ran for a while. In datasheet I founded that reseting i2c master is possible, but after this reset it was working 50/50. Sometimes yes, sometimes not. Now it isnt working at all. I know that it has not much in common with Nordic but I completely ran out of ideas. Please, could someone help me? I thing the problem is in the i2c master, but now also resseting it doesnt work. I could try post this issue to Stackoverflow, but they immediatelly mark this question as non related to programming, so I am asking you. 

Regards

Parents Reply
  • Yes, sorry for lack of information. I have modified this Arduino driver to twi driver from examples for mpu9250 and others. I am attaching my code. I have modified it and added some unnecessary functions just for testing, so some functions are not important. But the arrangement in ICM20948_begin is the same as in Arduino driver. The problem isnt in twi driver i am sure, because data from inetrial accelerometer and gyro i am able to read, but not data from magnetometer. Please see my driver. Using twi driver from 's mpu examples modified for icm and for SDK15.2. Working witch segger embedded studio and pca10040.app_ICM20948.zip

Children
Related