PaulStoffregen / OneWire

Library for Dallas/Maxim 1-Wire Chips
http://www.pjrc.com/teensy/td_libs_OneWire.html
579 stars 382 forks source link

Resolved: Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. #113

Open jvonehr opened 2 years ago

jvonehr commented 2 years ago

Description

Just updated ESP32 to v 2.0.0, and started crashing with Guru Meditation Error. My code worked before the update.

Steps To Reproduce Problem

Called "begin()" on a OneWire 18s20. Crashed.

Hardware & Software

ESP32, Platform IO, ESP core 2.0.0

Arduino Sketch

n/a

Errors or Incorrect Output

Changed my code from using GPIO pin 17 to use GPIO pin 26 and problem stopped.

Noted in table at https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/gpio.html that GPIO 17 does not have an RTC entry, but 26 does.

Your current include file OneWire_direct_gpio.h line 163-164: int pin_io = rtc_io_number_get((gpio_num_t)pin); uint32_t rtc_reg(rtc_io_desc[pin_io].reg); return -1 and 88 when using pin 17, but return 7 and 1072989320 with pin 26.

It might be helpful to throw an error if pin_io comes back -1 from the rtc_io_number_get call.

Thanks for the work you do!

Jason2866 commented 2 years ago

Core 2.0.0 is outdated and not supported anymore from espressif. Update to core 2.0.3. and use latest OneWire version.