Task Manager/Serial Scheduler

Moldy01
Posts: 2
Joined: Fri Mar 29, 2024 2:59 pm

Task Manager/Serial Scheduler

Postby Moldy01 » Fri Mar 29, 2024 3:39 pm

I'm new to the ESP32 playground, so I'm hoping to get some help with an issue I'm finding with one of our devices. I was NOT the designer/architect so I'm not exactly sure about the code, but I believe it is a lift from the Arduino libraries, obviously with a few modifications.

So, right now, after the device has been running for a while, the serial port goes into a weird state. It will run for 3-5 seconds but then stops sending/receiving. I've traced it down to the lack of an expected ACK.

Quick background, this is a keypad with a capacitive sense LCD screen. The design is such that pressing and holding a "button" will activate a motor until it is released. Two buttons, one for each direction of the motor (CW and CCW).

I found out, quite by accident actually, that doing a "Factory Reset" fixes the problem (for a week or so, anyway). So, I'm currently thinking that the Task Manager is getting overloaded, and an ACK set into the Queue, is getting delayed too long for the expected timing.

More history. We are using the mesh networking with these keypads. It turns out that running them at 240 MHz is bad for an initialization algorithm they use to get the mesh network up and running. So, I recently started compiling them to run at 160 MHz. It has occurred to me that this may have affected the Task Scheduling (prior to this change things were running ok).

At any rate, any thought??

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: Task Manager/Serial Scheduler

Postby ESP_Sprite » Sun Mar 31, 2024 4:19 am

There's not enough information at all here to debug a problem like this, and you're taking a shotgun approach to debugging this. Rather than guessing something something scheduler 'overloaded' (which is a very vague issue in general), I'd suggest seeing if you can actually see what's going on, either by deducing what the source code does, or instrumenting the devices (add logging, for instance) and seeing what is going on.

Who is online

Users browsing this forum: No registered users and 2 guests