tdk-invn-oss / motion.arduino.ICM45605

Arduino Driver for TDK InvenSense consumer motion sensor ICM45605
https://invensense.tdk.com/smartmotion
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

begin() hangs #2

Open AnalogSteve opened 1 day ago

AnalogSteve commented 1 day ago

I believe there is a problem with the polling_I2C and read from FIFO_inturrupt examples. When I run either example the code hangs. As a debug I placed print statements in the example and narrowed it down to the .begin() statement. The print before the begin sends but there is no activity after that. I have tried this on an arduino UNO and an adafruit feather M0. I have tried this with a Mikroe 6DOF IMU 16 Click breakout board. The connections to the breakout are 3.3v, gnd, SDA and SCK. The code acts the same with the breakout connected or not connected. Thank you for looking into this.

tdk-opensource commented 1 day ago

Thank you for opening this issue! We will look into it shortly.

Notifying @tdk-invn-oss/motion-maintainers @tdk-invn-oss/arduino-maintainers

rbuisson-invn commented 1 day ago

Hi @AnalogSteve,

I had a look to the Mikroe 6DOF IMU 16 Click board, and it looks like by default, only SPI is connected: image

Did you change the resistors to enable I2C? If you want to try using SPI, you can use Polling_SPI sketch instead.

Regards,

AnalogSteve commented 1 day ago

HI I have switched the board over to I2c before starting. I find it interesting that the begin function returns no value after being called, with or without the part being installed. It seems like it is unable to respond to a failure to configure the part. I was able to hook up the SDA and SCL lines to a scope and saw no activity during code execution on those lines with the part connected or not. Both remained high. I will have more time this weekend to take a deeper look to be sure I have no hardware problems and dig a little into the library code and see if I can get a clue. Thank you Steve Bennett

From: rbuisson-invn @.> Sent: Friday, October 25, 2024 12:48 AM To: tdk-invn-oss/motion.arduino.ICM45605 @.> Cc: Steve Bennett @.>; Mention @.> Subject: Re: [tdk-invn-oss/motion.arduino.ICM45605] begin() hangs (Issue #2)

Hi @AnalogSteve [github. com], I had a look to the Mikroe 6DOF IMU 16 Click board, and it looks like by default, only SPI is connected: image. png (view on web) [github. com] Did you change the resistors to enable I2C? If you want to try using ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd

Hi @AnalogSteve [github.com]https://urldefense.com/v3/__https:/github.com/AnalogSteve__;!!FtrhtPsWDhZ6tw!AjxtmxJ1jCQtwe3yAPgyPNWYAi9gljYsiRwn9R9TCFkDiab7JZNniir2aaOAOf4Xlgq9-fipAh9XLPWMNUAZmyD1yQ$,

I had a look to the Mikroe 6DOF IMU 16 Click board, and it looks like by default, only SPI is connected: image.png (view on web) [github.com]https://urldefense.com/v3/__https:/github.com/user-attachments/assets/ed5d16ee-7ba2-46f4-a74e-110ee718af68__;!!FtrhtPsWDhZ6tw!AjxtmxJ1jCQtwe3yAPgyPNWYAi9gljYsiRwn9R9TCFkDiab7JZNniir2aaOAOf4Xlgq9-fipAh9XLPWMNUA6L4Z89A$

Did you change the resistors to enable I2C? If you want to try using SPI, you can use Polling_SPI sketch instead.

Regards,

— Reply to this email directly, view it on GitHub [github.com]https://urldefense.com/v3/__https:/github.com/tdk-invn-oss/motion.arduino.ICM45605/issues/2*issuecomment-2437121324__;Iw!!FtrhtPsWDhZ6tw!AjxtmxJ1jCQtwe3yAPgyPNWYAi9gljYsiRwn9R9TCFkDiab7JZNniir2aaOAOf4Xlgq9-fipAh9XLPWMNUBJlH3qsQ$, or unsubscribe [github.com]https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/BLR3GKNM3FZRJBX4IO5XI6LZ5HZRTAVCNFSM6AAAAABQR7DL3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZXGEZDCMZSGQ__;!!FtrhtPsWDhZ6tw!AjxtmxJ1jCQtwe3yAPgyPNWYAi9gljYsiRwn9R9TCFkDiab7JZNniir2aaOAOf4Xlgq9-fipAh9XLPWMNUDwdu6jXQ$. You are receiving this because you were mentioned.Message ID: @.**@.>>

AnalogSteve commented 23 hours ago

HI I had a few minutes, so I tried the SPI mode example with a UNO and no ICM45605. The begin function acted correctly in SPI mode. It returned a “ ICM456xx initialization failed: -1” after the begin command. This is normal behavior for a missing part. I tried the I2C polling example and the uno hung up. I placed print statements before and after the begin() command and only got a “before” print. Please see a code snip below:

include "ICM45605.h"

// Instantiate an ICM456XX with LSB address set to 0 ICM456xx IMU(Wire,0);

void setup() { int ret; Serial.begin(115200); while(!Serial) {}

// Initializing the ICM456XX Serial.print("before"); ret = IMU.begin(); Serial.print("after");

I only see one “before” for each reset of the UNO. I would expect the begin statement to return an integer after execution no matter if the installation was successful or not.

Thank you for looking into this. Steve Bennett

From: rbuisson-invn @.> Sent: Friday, October 25, 2024 12:48 AM To: tdk-invn-oss/motion.arduino.ICM45605 @.> Cc: Steve Bennett @.>; Mention @.> Subject: Re: [tdk-invn-oss/motion.arduino.ICM45605] begin() hangs (Issue #2)

Hi @AnalogSteve [github. com], I had a look to the Mikroe 6DOF IMU 16 Click board, and it looks like by default, only SPI is connected: image. png (view on web) [github. com] Did you change the resistors to enable I2C? If you want to try using ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd

Hi @AnalogSteve [github.com]https://urldefense.com/v3/__https:/github.com/AnalogSteve__;!!FtrhtPsWDhZ6tw!AjxtmxJ1jCQtwe3yAPgyPNWYAi9gljYsiRwn9R9TCFkDiab7JZNniir2aaOAOf4Xlgq9-fipAh9XLPWMNUAZmyD1yQ$,

I had a look to the Mikroe 6DOF IMU 16 Click board, and it looks like by default, only SPI is connected: image.png (view on web) [github.com]https://urldefense.com/v3/__https:/github.com/user-attachments/assets/ed5d16ee-7ba2-46f4-a74e-110ee718af68__;!!FtrhtPsWDhZ6tw!AjxtmxJ1jCQtwe3yAPgyPNWYAi9gljYsiRwn9R9TCFkDiab7JZNniir2aaOAOf4Xlgq9-fipAh9XLPWMNUA6L4Z89A$

Did you change the resistors to enable I2C? If you want to try using SPI, you can use Polling_SPI sketch instead.

Regards,

— Reply to this email directly, view it on GitHub [github.com]https://urldefense.com/v3/__https:/github.com/tdk-invn-oss/motion.arduino.ICM45605/issues/2*issuecomment-2437121324__;Iw!!FtrhtPsWDhZ6tw!AjxtmxJ1jCQtwe3yAPgyPNWYAi9gljYsiRwn9R9TCFkDiab7JZNniir2aaOAOf4Xlgq9-fipAh9XLPWMNUBJlH3qsQ$, or unsubscribe [github.com]https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/BLR3GKNM3FZRJBX4IO5XI6LZ5HZRTAVCNFSM6AAAAABQR7DL3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZXGEZDCMZSGQ__;!!FtrhtPsWDhZ6tw!AjxtmxJ1jCQtwe3yAPgyPNWYAi9gljYsiRwn9R9TCFkDiab7JZNniir2aaOAOf4Xlgq9-fipAh9XLPWMNUDwdu6jXQ$. You are receiving this because you were mentioned.Message ID: @.**@.>>