"Failed to Initialize IMU!" Nano 33 BLE

Hello!
I am testing out my Nano 33 BLE with the example SimpleAcceleration code. When I upload the code, it takes a long time (4.08 seconds) and produces a long list of documentation that I do not see in other uploads (I will include a copy down below). When I open the serial monitor, it says "Failed to initialize IMU!" and I do not know why. I have all the libraries installed and my software is up to date. Can someone please help me.
Thanks

" Sketch uses 96232 bytes (9%) of program storage space. Maximum is 983040 bytes.

Global variables use 45952 bytes (17%) of dynamic memory, leaving 216192 bytes for local variables. Maximum is 262144 bytes.

Upload started

Programming with: Serial

Restarting in bootloader mode

Flashing with command:C:/Users/gabri/.arduino-create/arduino/bossac/1.9.1-arduino2/bossac.exe -d --port=COM14 -U -i -e -w C:/Users/gabri/AppData/Local/Temp/arduino-create-agent942966937/sketch_mar6a.bin -R

Set binary mode

version()=Arduino Bootloader (SAM-BA extended) 2.0 [Arduino:IKXYZ]

Connected at 921600 baud

identifyChip()=nRF52840-QIAA

write(addr=0,size=0x34)

writeWord(addr=0x30,value=0x400)

writeWord(addr=0x20,value=0)

version()=Arduino Bootloader (SAM-BA extended) 2.0 [Arduino:IKXYZ]

Device : nRF52840-QIAA

Version : Arduino Bootloader (SAM-BA extended) 2.0 [Arduino:IKXYZ]

Address : 0x0

Pages : 256

Page Size : 4096 bytes

Total Size : 1024KB

Planes : 1

Lock Regions : 0

Locked : none

Security : false

Erase flash

chipErase(addr=0)

Done in 0.000 seconds

Write 96240 bytes to flash (24 pages)

[ ] 0% (0/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0, size=0x1000)

[= ] 4% (1/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x1000, size=0x1000)

[== ] 8% (2/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x2000, size=0x1000)

[=== ] 12% (3/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x3000, size=0x1000)

[===== ] 16% (4/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x4000, size=0x1000)

[====== ] 20% (5/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x5000, size=0x1000)

[======= ] 25% (6/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x6000, size=0x1000)

[======== ] 29% (7/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x7000, size=0x1000)

[========== ] 33% (8/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x8000, size=0x1000)

[=========== ] 37% (9/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x9000, size=0x1000)

[============ ] 41% (10/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0xa000, size=0x1000)

[============= ] 45% (11/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0xb000, size=0x1000)

[=============== ] 50% (12/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0xc000, size=0x1000)

[================ ] 54% (13/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0xd000, size=0x1000)

[================= ] 58% (14/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0xe000, size=0x1000)

[================== ] 62% (15/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0xf000, size=0x1000)

[==================== ] 66% (16/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x10000, size=0x1000)

[===================== ] 70% (17/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x11000, size=0x1000)

[====================== ] 75% (18/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x12000, size=0x1000)

[======================= ] 79% (19/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x13000, size=0x1000)

[========================= ] 83% (20/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x14000, size=0x1000)

[========================== ] 87% (21/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x15000, size=0x1000)

[=========================== ] 91% (22/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x16000, size=0x1000)

[============================ ] 95% (23/24 pages)write(addr=0x34,size=0x1000)

writeBuffer(scr_addr=0x34, dst_addr=0x17000, size=0x1000)

[==============================] 100% (24/24 pages)

Done in 4.083 seconds

reset() "

1 Like

@gab1430, your topic has been moved to a more suitable location on the forum.

Do you mean the "SimpleAccelerometer" example of the "Arduino_LSM9DS1" library?

I just tried it out on my Arduino Nano 33 BLE and didn't have any error like that.

Do you have any wiring or other external circuitry connected to your Nano 33 BLE?

no external wiring. just the nano 33 ble.

I have the same question

I have now tried this on 2 seperate Arduino Nano 33 BLE's and get the same error on both of them.
Nothing wired into either of them. I have reinstalled the Arduino create agent and am writting and running this off the create.arduino.cc website.

Any advice is much appreciated.

#include <Arduino_LSM9DS1.h>

void setup() {
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Started");

  if (!IMU.begin()) {
    Serial.println("Failed to initialize IMU!");
    while (1);
  }

  Serial.print("Accelerometer sample rate = ");
  Serial.print(IMU.accelerationSampleRate());
  Serial.println(" Hz");
  Serial.println();
  Serial.println("Acceleration in G's");
  Serial.println("X\tY\tZ");
}

void loop() {
  float x, y, z;

  if (IMU.accelerationAvailable()) {
    IMU.readAcceleration(x, y, z);

    Serial.print(x);
    Serial.print('\t');
    Serial.print(y);
    Serial.print('\t');
    Serial.println(z);
  }
}

Hi @alexnewtonstrath

Just so we can be sure, by "same error", do you mean this is printed on the Serial Monitor?:

Failed to initialize IMU!
2 Likes

Yes @in0 , I also had a quick look through some of the error codes and got the same results as the ones gab1430 posted. Such as restarting in bootloader and the lines of writeBuffer(...

Well I feel like a dummy but will leave this here just incase anyone else makes this mistake.
I have an Arduino Nano 33 IoT. Not the Arduino Nano 33 IoT sense, I guess I looked over the 'sense' part when reading up on the capabilities of my Arduino.

Thanks for taking the time to post an update with your findings. It is easy to get mixed up between this series of boards that are similar in form and name, but with quite different capabilities.

Here is the reference for the library of the LSM6DS3 IMU of the Nano 33 IoT:

https://www.arduino.cc/en/Reference/Arduino_LSM6DS3

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.