In our project, most communication is handled with a Mdash shadow but we need access to a rest API for some functionality. During the development, these requests went over http but for production, we need to use https. We changed the endpoint urls to https and at first everything seemed to work just fine. All the requests completed. But when the device is running for a while and these requests are done again the hardware watchdog timer triggers.
[Jun 24 12:13:48.399] LedTimer.c:603 free heap size: 22328 [Jun 24 12:13:48.451] mg_ssl_if_mbedtls.c:35 0x3fff231c ciphersuite: TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 [Jun 24 12:13:48.966] SW ECDH curve 3 [Jun 24 12:13:50.139] [Jun 24 12:13:50.139] HW WDT @ 0x40268c05 [Jun 24 12:13:50.139] A0: 0x40268b58 A1: 0x3ffffba0 A2: 0x00000028 A3: 0x3fff2890 [Jun 24 12:13:50.145] A4: 0x0000000c A5: 0x00000000 A6: 0x3ffffbdc A7: 0x3ffffbdc [Jun 24 12:13:50.151] A8: 0x00000009 A9: 0x000018ce A10: 0x3ffeec90 A11: 0xffff8000 [Jun 24 12:13:50.156] A12: 0x3ffffbdc A13: 0x3fff2890 A14: 0xffffffff A15: 0x3ffffbdc [Jun 24 12:13:50.162] [Jun 24 12:13:50.162] (exc SP: 0x3ffff9e0) [Jun 24 12:13:50.165] [Jun 24 12:13:50.165] --- BEGIN CORE DUMP --- [Jun 24 12:13:50.167] mos: catching core dump [Jun 24 12:13:53.013] .... [Jun 24 12:14:01.718] ---- END CORE DUMP ----
Once it has failed, it reboots and all consecutive https requests also fail, causing even more reboots. The minimum free heap when it first happens is 22328 bytes. Could to little heap space be what is causing this? I would have expected a memory related exception in this case and not a HW WDT reset. There are three separate API requests that need to take place periodically when I only upgrade one of them to https it will keep working but when I enable https on 2 or all three requests the above behaviour happens. Any Ideas on what this is caused by is much appreciated!