machine.reset_cause() reports back wrong reset cause



  • Dear community,

    aside the other issue with the strange python code execution, we face a LOT of reboots of the device (1.20.2.r4 as well as 1.20.2.r6), especially when there is constant heavy load on the webserver (microWebSrv2) (and it gets even worse if there is bad WiFi reception). Idling and just measuring data from sensors, the device can work days without a reboot (but they still occur).

    In order to react differently on a core panic reboot and a normal power cycle, we are evaluating
    machine.reset_cause(). But sometimes (around 2 out of 3) it reports back the constant for power cycle/an external reset event, while the UART output of the device reports always the same reset cause value 0xC:

    21.12.2021 22:43:41.150690:================= CORE DUMP END =================
    21.12.2021 22:43:41.150690:Rebooting...
    21.12.2021 22:43:41.150690:ets Jun  8 2016 00:22:57
    21.12.2021 22:43:41.150690:
    21.12.2021 22:43:41.150690:rst:0xc (SW_CPU_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
    

    Happens with 1.20.2.r4, with removed BT and CAN module.
    Is this a known issue? Is there a workaround?


Log in to reply
 

Pycom on Twitter