universam1 / iSpindel

electronic Hydrometer
http://www.ispindel.de
Other
827 stars 322 forks source link

Exception (28) on plain modules #614

Closed lowPerformer closed 1 year ago

lowPerformer commented 1 year ago

I'm submitting a ...

Did you follow the general troubleshooting steps first:

Report

Flashing firmware on a plain module (not installed on iSpindle PCB) throws an exception at boot. This is due to the missing hardware, especially in the function:

void requestTemp()
{
  if (!DSreqTime)
  {
    DS18B20.requestTemperatures();
    DSreqTime = millis();
  }
}

DS18B20 never gets initialized when no sensor found (s.a. initDS18B20()) and Exception 28 (Access to invalid address; NULL pointer) is thrown.

My workaround was:

void requestTemp()
{
  if (myData.OWpin == -1)
    return;

  if (!DSreqTime)
  {
    DS18B20.requestTemperatures();
    DSreqTime = millis();
  }
}

Console Logs

FW 7.3.3
2.2.2-dev(38a443e)
Worker run!
mounting FS... mounted!
ERROR: failed to load json config

ERROR config corrupted
scanning for OW device on pin: 5
No devices found!
scanning for OW device on pin: 12
No devices found!
scanning for OW device on pin: 0
No devices found!
scanning for OW device on pin: 0
No devices found!
ERROR: cannot find a OneWire Temperature Sensor!
Acc Test Connection ERROR!
offsets not available
Boot-Mode: Deep-Sleep Wake

Double Reset detected
...........
ERROR no Wifi credentials

going to Config Mode
Acc Test Connection ERROR!

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Exception (28):
epc1=0x402106dd epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

>>>stack>>>

ctx: sys
sp: 3fffed60 end: 3fffffb0 offset: 0150
...

Context

Wanted to flash several modules an configure them prior to mounting them on the PCBs. This is impossible with this bug. This may also happen if the DS18B20 is malfunctioning in some way and is not found on boot-up!

ErikdBr commented 1 year ago

It is not a bug, works as designed.

You can flash the module prior to assembling but to configure it you have to have it fully build.

universam1 commented 1 year ago

Closing as per design