LoPy4 deepsleep gives guru meditation error

  • I've been trying to get deepsleep working om my LoPy4. What I can find the machine.deepsleep([time_ms]) function puts the LoPy in deepsleep for x amount of seconds. I however get the following error: Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. Any solutions?

    import pycom
    import time
    from machine import Pin
    from machine import ADC
    from SEN0161_V2 import DFRobot_PH
    from onewire import DS18X20
    from onewire import OneWire
    pycom.heartbeat(False)                              #Disable the heartbeat LED to conserve power
    ow = OneWire(Pin('P10'))                            #DS18B20 data line connected to pin P10
    temp = DS18X20(ow)
    ph   = DFRobot_PH()                                 #create an PH sensor object
    adc = ADC(0)                                        #create an ADC object
    adc_c = adc.channel(pin='P13', attn=ADC.ATTN_11DB)  #create an analog pin on P13 and set channel attenuation to 11dB which allows measurment up to 3.3V        
    while True:
        temp.start_conversion()                         #Converts the data received on the one wire bus to a value
        temprature = temp.read_temp_async()             #converts the value to a temprature
        print(temprature)                               #prints the temprature
        adcvoltage = adc_c.voltage()                    #Reads the channels 12 bit value and converts it into a voltage (in millivolts)
        # ph.calibration(adcvoltage)                    #Calibrate the pH sensor using the buffer solutions
        PH = ph.readPH(adcvoltage)                      #Reads the PH value of the solution
        print(str(PH))                                  #prints the PH value
        machine.deepsleep(10000)                        #go to sleep for 60 seconds

    Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
    Core 1 register dump:
    PC : 0x400ffa9a PS : 0x00060130 A0 : 0x800e8383 A1 : 0x3ffd8e90
    A2 : 0x00000000 A3 : 0x00000001 A4 : 0x00000000 A5 : 0x00000009
    A6 : 0x00008000 A7 : 0x8000ffff A8 : 0x3f40fa0c A9 : 0x3ffd8e60
    A10 : 0x00000000 A11 : 0x00000000 A12 : 0x3ff56960 A13 : 0x00000000
    A14 : 0x3ffdec98 A15 : 0x00000001 SAR : 0x0000001e EXCCAUSE: 0x0000001c
    EXCVADDR: 0x00000000 LBEG : 0x400ed52c LEND : 0x400ed56f LCOUNT : 0x00000000

    ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000

    Backtrace: 0x400ffa9a:0x3ffd8e90 0x400e8380:0x3ffd8eb0 0x400e5aec:0x3ffd8ed0 0x4010214a:0x3ffd8f00 0x400fe4d5:0x3ffd8f30 0x400fe565:0x3ffd8f50 0x4010a537:0x3ffd8f70 0x401021e4:0x3ffd9010 0x400fe4d5:0x3ffd9080 0x400fe502:0x3ffd90a0 0x400e1661:0x3ffd90c0 0x400e1905:0x3ffd9160 0x400e0188:0x3ffd9180
    ================= CORE DUMP START =================

Log in to reply

Pycom on Twitter