Guru Mediation Error. L3GD20H Gyro. Communication via i2c

SilentAndromeda
Posts: 1
Joined: Tue Jun 13, 2017 6:44 pm

Guru Mediation Error. L3GD20H Gyro. Communication via i2c

Postby SilentAndromeda » Tue Jun 13, 2017 7:14 pm

Hello,

I've been trying to get my L3GD20H Gyro to work with my ESP32 Thing after switching from my Pro Micro (which the breakout board and sketch worked fine with). I've successfully loaded example sketches onto the ESP32 before via the Arduino IDE, but for reasons I don't yet understand, I get the following message in the Serial Monitor when I tried uploading the same gyro sketch.

At baud of 9600:
⸮Ā⸮HGyroscope Test

Guru Meditation Error of type IllegalInstruction occurred on core 1. Exception was unhandled.
Register dump:
PC : 0x400df4d8 PS : 0x00060530 A0 : 0x800d8f06 A1 : 0x3ffc7e00
A2 : 0x3ffc236c A3 : 0xffffffff A4 : 0x00060023 A5 : 0x3ffc6a70
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x800d07d7 A9 : 0x3ffc7de0
A10 : 0xffffffff A11 : 0x00000001 A12 : 0x0800001c A13 : 0xffffffff
A14 : 0xffffffff A15 : 0x00060023 SAR : 0x00000019 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff

Backtrace: 0x400df4d8:0x3ffc7e00 0x400d8f06:0x3ffc7e20

CPU halted.


And at baud of 115200:
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0008,len:8
load:0x3fff0010,len:160
load:0x40078000,len:10632
load:0x40080000,len:252
entry 0x40080034


I unplugged everything from the device thinking something may have been drawing too much power, but I still get the same error. The sketch uses the SDA and SCL i2c pins. is the gyro code incompatible with the ESP32 or is there a problem with my ESP32?

Below is the gyro code which executes fine on my Pro Micro:
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_L3GD20_U.h>
/* Assign a unique ID to this sensor at the same time */
Adafruit_L3GD20_Unified gyro = Adafruit_L3GD20_Unified(20);
void setup(void)
{
Serial.begin(9600);
Serial.println("Gyroscope Test"); Serial.println("");
/* Enable auto-ranging */
gyro.enableAutoRange(true);
/* Initialise the sensor */
if(!gyro.begin())
{
/* There was a problem detecting the L3GD20 ... check your connections */
Serial.println("Ooops, no L3GD20 detected ... Check your wiring!");
while(1);
}
}
void loop(void)
{
/* Get a new sensor event */
sensors_event_t event;
gyro.getEvent(&event);
/* Display the results (speed is measured in rad/s) */
Serial.print("X: "); Serial.print(event.gyro.x); Serial.print(" ");
Serial.print("Y: "); Serial.print(event.gyro.y); Serial.print(" ");
Serial.print("Z: "); Serial.print(event.gyro.z); Serial.print(" ");
Serial.println("rad/s ");
delay(500);
}


Thanks.

f.h-f.s.
Posts: 214
Joined: Thu Dec 08, 2016 2:53 pm

Re: Guru Mediation Error. L3GD20H Gyro. Communication via i2c

Postby f.h-f.s. » Fri Jun 16, 2017 8:47 pm

You can resolve your addresses with idf_monitor or xtensa-esp32-elf-addr2line http://esp-idf.readthedocs.io/en/latest ... -addresses
You will know which instruction is causing the crash

Who is online

Users browsing this forum: Bing [Bot], PepeTheGreat and 49 guests