I am using a custom MQTT application. It posts data to an MQTT endpoing on my AWS cloud application once every 5 seconds. In generall evreything is working well. Unfortunately, I am getting spurious reboots and I would like to get more information. Is is a stack overflow? Is it a heap problem?
Is there any way I can enable more debug as to why Zephyr reboots. I am enclosing the serial trace in case that is useful.
[Sun Aug 31 14:25:28.208 2025] gateway/readings
[Sun Aug 31 14:25:28.258 2025] clientId: 8944502210209248862
[Sun Aug 31 14:25:28.258 2025] topic: gateway/readings len: 16
[Sun Aug 31 14:25:28.263 2025] Publishing: { "gateway_id": "G2000-022500","analyzer_id": "PS4550-04143","owner": "Powersight","customer_id": "500","client_id": "101","data":{"V1":284.0,"V2":279.3,"V3":275.5,"I1":100.9,"I2":106.4,"I3":109.4,"In":10.2,"W1":22924.4,"W2":23778.4,"W3":24104.8,"Wt":70808.0,"Hz":60.4,"VA1":28655.2,"VA2":29722.4,"VA3":30131.2,"VAt":88508.8,"TPF1":80.0,"TPF2":80.0,"TPF3":80.0,"TPFt":80.0,"THDv1":38.7,"THDv2":44.7,"THDv3":44.5,"THDi1":45.7,"THDi2":46.2,"THDi3":46.0,"THDin":46.2},"createdAt": "2025-08-31T14:25:40-08:00","updatedAt": "2025-08-31T14:25:40-08:00" }
[Sun Aug 31 14:25:28.402 2025] +CSCON: 1
[Sun Aug 31 14:25:33.182 2025] mqtt_handle_packet 64
[Sun Aug 31 14:25:33.182 2025] [mqtt_evt_handler:412] mqtt_evt_handler (3)!
[Sun Aug 31 14:25:33.191 2025] [mqtt_evt_handler:511] PUBACK packet id: 22742
[Sun Aug 31 14:25:33.191 2025] **** polling loop
[Sun Aug 31 14:25:33.265 2025] gateway/readings
[Sun Aug 31 14:25:33.319 2025] clientId: 8944502210209248862
[Sun Aug 31 14:25:33.319 2025] topic: gateway/readings len: 16
[Sun Aug 31 14:25:33.326 2025] Publishing: { "gateway_id": "G2000-022500","analyzer_id": "PS4550-04143","owner": "Powersight","customer_id": "500","client_id": "101","data":{"V1":279.8,"V2":280.0,"V3":275.5,"I1":103.7,"I2":106.7,"I3":109.7,"In":10.9,"W1":23209.6,"W2":23891.6,"W3":24182.0,"Wt":71283.2,"Hz":60.4,"VA1":29012.0,"VA2":29864.8,"VA3":30227.2,"VAt":89104.0,"TPF1":80.0,"TPF2":80.0,"TPF3":80.0,"TPFt":80.0,"THDv1":38.7,"THDv2":44.7,"THDv3":44.5,"THDi1":45.7,"THDi2":46.2,"THDi3":46.0,"THDin":46.2},"createdAt": "2025-08-31T14:25:45-08:00","updatedAt": "2025-08-31T14:25:45-08:00" }
[Sun Aug 31 14:25:34.228 2025] mqtt_handle_packet 64
[Sun Aug 31 14:25:34.228 2025] [mqtt_evt_handler:412] mqtt_evt_handler (3)!
[Sun Aug 31 14:25:34.240 2025] [mqtt_evt_handler:511] PUBACK packet id: 27801
[Sun Aug 31 14:25:34.240 2025] **** polling loop
[Sun Aug 31 14:25:37.944 2025] +CSCON: 0
[Sun Aug 31 14:25:38.226 2025] gateway/readings
[Sun Aug 31 14:25:38.279 2025] clientId: 8944502210209248862
[Sun Aug 31 14:25:38.279 2025] topic: gateway/readings len: 16
[Sun Aug 31 14:25:38.286 2025] Publishing: { "gateway_id": "G2000-022500","analyzer_id": "PS4550-04143","owner": "Powersight","customer_id": "500","client_id": "101","data":{"V1":275.1,"V2":282.2,"V3":282.0,"I1":105.8,"I2":102.4,"I3":101.6,"In":10.8,"W1":23290.8,"W2":23117.6,"W3":22909.6,"Wt":69318.4,"Hz":60.3,"VA1":29113.6,"VA2":28896.8,"VA3":28636.8,"VAt":86648.0,"TPF1":80.0,"TPF2":80.0,"TPF3":80.0,"TPFt":80.0,"THDv1":38.7,"THDv2":44.7,"THDv3":44.5,"THDi1":45.7,"THDi2":46.2,"THDi3":46.0,"THDin":46.2},"createdAt": "2025-08-31T14:25:50-08:00","updatedAt": "2025-08-31T14:25:50-08:00" }
[Sun Aug 31 14:25:38.422 2025] +CSCON: 1
[Sun Aug 31 14:25:43.286 2025] gateway/readings
[Sun Aug 31 14:25:43.336 2025] clientId: 8944502210209248862
[Sun Aug 31 14:25:43.336 2025] topic: gateway/readings len: 16
[Sun Aug 31 14:25:43.343 2025] Publishing: { "gateway_id": "G2000-022500","analyzer_id": "PS4550-04143","owner": "Powersight","customer_id": "500","client_id": "101","data":{"V1":280.7,"V2":284.1,"V3":275.5,"I1":108.5,"I2":100.4,"I3":109.7,"In":10.5,"W1":24371.2,"W2":22818.8,"W3":24175.6,"Wt":71364.8,"Hz":60.6,"VA1":30464.0,"VA2":28523.2,"VA3":30219.2,"VAt":89206.4,"TPF1":80.0,"TPF2":80.0,"TPF3":80.0,"TPFt":80.0,"THDv1":38.7,"THDv2":44.7,"THDv3":44.5,"THDi1":45.7,"THDi2":46.2,"THDi3":46.0,"THDin":46.2},"createdAt": "2025-08-31T14:25:55-08:00","updatedAt": "2025-08-31T14:25:55-08:00" }
[Sun Aug 31 14:25:48.245 2025] gateway/readings
[Sun Aug 31 14:25:48.294 2025] clientId: 8944502210209248862
[Sun Aug 31 14:25:48.294 2025] topic: gateway/readings len: 16
[Sun Aug 31 14:25:48.303 2025] Publishing: { "gateway_id": "G2000-022500","analyzer_id": "PS4550-04143","owner": "Powersight","customer_id": "500","client_id": "101","data":{"V1":276.8,"V2":284.5,"V3":275.5,"I1":100.3,"I2":101.2,"I3":107.6,"In":10.8,"W1":22201.2,"W2":23026.0,"W3":23723.6,"Wt":68950.4,"Hz":60.3,"VA1":27751.2,"VA2":28782.4,"VA3":29654.4,"VAt":86188.8,"TPF1":80.0,"TPF2":80.0,"TPF3":80.0,"TPFt":80.0,"THDv1":38.7,"THDv2":44.7,"THDv3":44.5,"THDi1":45.7,"THDi2":46.2,"THDi3":46.0,"THDin":46.2},"createdAt": "2025-08-31T14:26:00-08:00","updatedAt": "2025-08-31T14:26:00-08:00" }
[Sun Aug 31 14:25:53.303 2025] gateway/readings
[Sun Aug 31 14:25:53.352 2025] clientId: 8944502210209248862
[Sun Aug 31 14:25:53.352 2025] topic: gateway/readings len: 16
[Sun Aug 31 14:25:53.357 2025] Publishing: { "gateway_id": "G2000-022500","analyzer_id": "PS4550-04143","owner": "Powersight","customer_id": "500","client_id": "101","data":{"V1":284.1,"V2":281.1,"V3":283.0,"I1":102.8,"I2":102.2,"I3":106.1,"In":10.6,"W1":23364.0,"W2":22973.6,"W3":24027.6,"Wt":70364.8,"Hz":60.4,"VA1":29204.8,"VA2":28716.8,"VA3":30034.4,"VAt":87956.8,"TPF1":80.0,"TPF2":80.0,"TPF3":80.0,"TPFt":80.0,"THDv1":38.7,"THDv2":44.7,"THDv3":44.5,"THDi1":45.7,"THDi2":46.2,"THDi3":46.0,"THDin":46.2},"createdAt": "2025-08-31T14:26:05-08:00","updatedAt": "2025-08-31T14:26:05-08:00" }
[Sun Aug 31 14:25:58.260 2025] gateway/readings
[Sun Aug 31 14:25:58.311 2025] clientId: 8944502210209248862
[Sun Aug 31 14:25:58.311 2025] topic: gateway/readings len: 16
[Sun Aug 31 14:25:58.318 2025] Publishing: { "gateway_id": "G2000-022500","analyzer_id": "PS4550-04143","owner": "Powersight","customer_id": "500","client_id": "101","data":{"V1":276.5,"V2":282.4,"V3":278.9,"I1":102.3,"I2":100.8,"I3":100.3,"In":10.3,"W1":22619.6,"W2":22774.8,"W3":22376.4,"Wt":67771.2,"Hz":60.7,"VA1":28274.4,"VA2":28468.0,"VA3":27970.4,"VAt":84713.6,"TPF1":80.0,"TPF2":80.0,"TPF3":80.0,"TPFt":80.0,"THDv1":38.7,"THDv2":44.7,"THDv3":44.5,"THDi1":45.7,"THDi2":46.2,"THDi3":46.0,"THDin":46.2},"createdAt": "2025-08-31T14:26:10-08:00","updatedAt": "2025-08-31T14:26:10-08:00" }
[Sun Aug 31 14:26:03.221 2025] gateway/readings
[Sun Aug 31 14:26:03.274 2025] clientId: 8944502210209248862
[Sun Aug 31 14:26:03.274 2025] topic: gateway/readings len: 16
[Sun Aug 31 14:26:03.281 2025] Publishing: { "gateway_id": "G2000-022500","analyzer_id": "PS4550-04143","owner": "Powersight","customer_id": "500","client_id": "101","data":{"V1":275.3,"V2":278.9,"V3":275.7,"I1":100.2,"I2":102.0,"I3":107.4,"In":10.5,"W1":22061.2,"W2":22766.8,"W3":23681.2,"Wt":68508.8,"Hz":60.3,"VA1":27576.8,"VA2":28458.4,"VA3":29601.6,"VAt":85636.8,"TPF1":80.0,"TPF2":80.0,"TPF3":80.0,"TPFt":80.0,"THDv1":38.7,"THDv2":44.7,"THDv3":44.5,"THDi1":45.7,"THDi2":46.2,"THDi3":46.0,"THDin":46.2},"createdAt": "2025-08-31T14:26:15-08:00","updatedAt": "2025-08-31T14:26:15-08:00" }
[Sun Aug 31 14:26:08.278 2025] gateway/readings
[Sun Aug 31 14:26:08.329 2025] clientId: 8944502210209248862
[Sun Aug 31 14:26:08.329 2025] topic: gateway/readings len: 16
[Sun Aug 31 14:26:08.339 2025] Publishing: { "gateway_id": "G2000-022500","analyzer_id": "PS4550-04143","owner": "Powersight","customer_id": "500","client_id": "101","data":{"V1":280.3,"V2":276.3,"V3":275.9,"I1":106.8,"I2":103.3,"I3":102.4,"In":10.9,"W1":23939.6,"W2":22826.8,"W3":22597.2,"Wt":69363.2,"Hz":60.4,"VA1":29924.8,"VA2":28532.8,"VA3":28246.4,"VAt":86704.0,"TPF1":80.0,"TPF2":80.0,"TPF3":80.0,"TPFt":80.0,"THDv1":38.7,"THDv2":44.7,"THDv3":44.5,"THDi1":45.7,"THDi2":46.2,"THDi3":46.0,"THDin":46.2},"createdAt": "2025-08-31T14:26:20-08:00","updatedAt": "2025-08-31T14:26:20-08:00" }
[Sun Aug 31 14:26:13.236 2025] gateway/readings
[Sun Aug 31 14:26:13.286 2025] clientId: 8944502210209248862
[Sun Aug 31 14:26:13.286 2025] topic: gateway/readings len: 16
[Sun Aug 31 14:26:13.292 2025] Publishing: { "gateway_id": "G2000-022500","analyzer_id": "PS4550-04143","owner": "Powersight","customer_id": "500","client_id": "101","data":{"V1":275.5,"V2":279.6,"V3":284.5,"I1":109.4,"I2":102.3,"I3":101.7,"In":10.9,"W1":24104.8,"W2":22871.2,"W3":23144.4,"Wt":70120.0,"Hz":60.6,"VA1":30131.2,"VA2":28588.8,"VA3":28930.4,"VAt":87651.2,"TPF1":80.0,"TPF2":80.0,"TPF3":80.0,"TPFt":80.0,"THDv1":38.7,"THDv2":44.7,"THDv3":44.5,"THDi1":45.7,"THDi2":46.2,"THDi3":46.0,"THDin":46.2},"createdAt": "2025-08-31T14:26:25-08:00","updatedAt": "2025-08-31T14:26:25-08:00" }
[Sun Aug 31 14:26:18.296 2025] gateway/readings
[Sun Aug 31 14:26:18.347 2025] clientId: 8944502210209248862
[Sun Aug 31 14:26:18.347 2025] topic: gateway/readings len: 16
[Sun Aug 31 14:26:18.358 2025] Publishing: { "gateway_id": "G2000-022500","analyzer_id": "PS4550-04143","owner": "Powersight","customer_id": "500","client_id": "101","data":{"V1":275.5,"V2":278.8,"V3":281.7,"I1":109.7,"I2":109.2,"I3":104.6,"In":10.7,"W1":24182.0,"W2":24351.2,"W3":23568.0,"Wt":72100.8,"Hz":60.3,"VA1":30227.2,"VA2":30439.2,"VA3":29460.0,"VAt":90126.4,"TPF1":80.0,"TPF2":80.0,"TPF3":80.0,"TPFt":80.0,"THDv1":38.7,"THDv2":44.7,"THDv3":44.5,"THDi1":45.7,"THDi2":46.2,"THDi3":46.0,"THDin":46.2},"createdAt": "2025-08-31T14:26:30-08:00","updatedAt": "2025-08-31T14:26:30-08:00" }
[Sun Aug 31 14:26:47.593 2025] *** Booting Zephyr OS build v2.4.0-ncs2 ***
[Sun Aug 31 14:26:47.593 2025] Flash regions Domain Permissions
[Sun Aug 31 14:26:47.599 2025] 00 02 0x00000 0x18000 Secure rwxl
[Sun Aug 31 14:26:47.599 2025] 03 31 0x18000 0x100000 Non-Secure rwxl
[Sun Aug 31 14:26:47.604 2025]
[Sun Aug 31 14:26:47.604 2025] Non-secure callable region 0 placed in flash region 2 with size 32.
[Sun Aug 31 14:26:47.612 2025]
[Sun Aug 31 14:26:47.785 2025] SRAM region Domain Permissions
[Sun Aug 31 14:26:47.785 2025] 00 07 0x00000 0x10000 Secure rwxl
[Sun Aug 31 14:26:47.792 2025] 08 31 0x10000 0x40000 Non-Secure rwxl
[Sun Aug 31 14:26:47.792 2025]
[Sun Aug 31 14:26:47.792 2025] Peripheral Domain Status
[Sun Aug 31 14:26:47.799 2025] 00 NRF_P0 Non-Secure OK
[Sun Aug 31 14:26:47.799 2025] 01 NRF_CLOCK Non-Secure OK
[Sun Aug 31 14:26:47.811 2025] 02 NRF_RTC0 Non-Secure OK
[Sun Aug 31 14:26:47.817 2025] 03 NRF_RTC1 Non-Secure OK
[Sun Aug 31 14:26:47.817 2025] 04 NRF_NVMC Non-Secure OK
[Sun Aug 31 14:26:47.817 2025] 05 NRF_UARTE1 Non-Secure OK
[Sun Aug 31 14:26:47.817 2025] 06 NRF_UARTE2 Secure SKIP
[Sun Aug 31 14:26:47.820 2025] 07 NRF_TWIM2 Non-Secure OK
[Sun Aug 31 14:26:47.824 2025] 08 NRF_SPIM3 Non-Secure OK
[Sun Aug 31 14:26:47.824 2025] 09 NRF_TIMER0 Non-Secure OK
[Sun Aug 31 14:26:47.829 2025] 10 NRF_TIMER1 Non-Secure OK
[Sun Aug 31 14:26:47.829 2025] 11 NRF_TIMER2 Non-Secure OK
[Sun Aug 31 14:26:47.834 2025] 12 NRF_SAADC Non-Secure OK
[Sun Aug 31 14:26:47.840 2025] 13 NRF_PWM0 Non-Secure OK
[Sun Aug 31 14:26:47.840 2025] 14 NRF_PWM1 Non-Secure OK
[Sun Aug 31 14:26:47.845 2025] 15 NRF_PWM2 Non-Secure OK
[Sun Aug 31 14:26:47.845 2025] 16 NRF_PWM3 Non-Secure OK
[Sun Aug 31 14:26:47.850 2025] 17 NRF_WDT Non-Secure OK
[Sun Aug 31 14:26:47.856 2025] 18 NRF_IPC Non-Secure OK
[Sun Aug 31 14:26:47.856 2025] 19 NRF_VMC Non-Secure OK
[Sun Aug 31 14:26:47.862 2025] 20 NRF_FPU Non-Secure OK
[Sun Aug 31 14:26:47.862 2025] 21 NRF_EGU1 Non-Secure OK
[Sun Aug 31 14:26:47.867 2025] 22 NRF_EGU2 Non-Secure OK
[Sun Aug 31 14:26:47.874 2025] 23 NRF_DPPIC Non-Secure OK
[Sun Aug 31 14:26:47.874 2025] 24 NRF_GPIOTE1 Non-Secure OK
[Sun Aug 31 14:26:47.879 2025] 25 NRF_REGULATORS Non-Secure OK
[Sun Aug 31 14:26:47.884 2025]
[Sun Aug 31 14:26:47.884 2025] SPM: NS image at 0x1c200
[Sun Aug 31 14:26:47.884 2025] SPM: NS MSP at 0x2003cb58
[Sun Aug 31 14:26:47.884 2025] SPM: NS reset vector at 0x24dfd
[Sun Aug 31 14:26:47.890 2025] SPM: prepare to jump to Non-Secure image.
[Sun Aug 31 14:26:48.165 2025]
[Sun Aug 31 14:26:48.165 2025]
[Sun Aug 31 14:26:48.165 2025] PS-Cloud Gateway v 0.48 : Configure MQTT timeout to 60 seconds from 300 seconds
[Sun Aug 31 14:26:48.171 2025]
[Sun Aug 31 14:26:48.172 2025] serial_init()
[Sun Aug 31 14:26:48.172 2025] dk_buttons_init
[Sun Aug 31 14:26:48.172 2025] aws_provision
[Sun Aug 31 14:26:48.180 2025] uart simple rxthread : started