nakhonthai / ESP32IGate

ESP32IGate is a APRS Internet Gateway + TNC Built In that is implemented for Espressif ESP32 processor.

Home Page:http://aprs.dprns.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: V1.2b - IGate -> RF causes ESP32 to reset.

M0XZS opened this issue · comments

Since moving from V1.1 to 1.2, I have noticed that the ESP starts to reset when the INET to RF is turned on in the IGGate.

I am using an external radio (with RF shielding) - nothing changed other than the firmware, and it looks like the transmitter does into an extended transmission with no APRS modulation, and then the ESP32 resets.

I did a Diff on the V1.1 and V1.4b changes, and I can not see any reason this would happen.

I put the debugging on and found this just before the reset:

[I][esp32-hal-i2c.c:1138] i2cProcQueue(): Bus busy, reinit
[W][esp32-hal-i2c.c:1419] i2cCheckLineState(): invalid state sda(21)=0, scl(22)=1
[D][esp32-hal-i2c.c:1427] i2cCheckLineState(): Recovered after 1 Cycles
[I][esp32-hal-i2c.c:1138] i2cProcQueue(): Bus busy, reinit
[W][esp32-hal-i2c.c:1419] i2cCheckLineState(): invalid state sda(21)=0, scl(22)=1
[D][esp32-hal-i2c.c:1427] i2cCheckLineState(): Recovered after 1 Cycles
[I][esp32-hal-i2c.c:1138] i2cProcQueue(): Bus busy, reinit
E (176382) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (176382) task_wdt: - IDLE0 (CPU 0)
E (176382) task_wdt: Tasks currently running:
E (176382) task_wdt: CPU 0: taskAPRS
E (176382) task_wdt: CPU 1: IDLE1
E (176382) task_wdt: Aborting.
abort() was called at PC 0x4018d32c on core 0

Returning Task 1 to priority 1 seems to fix the problem:

// Task 1
xTaskCreatePinnedToCore(
    taskAPRS,        /* Function to implement the task */
    "taskAPRS",      /* Name of the task */
    8192,            /* Stack size in words */
    NULL,            /* Task input parameter */
    1,               /* Priority of the task */
    &taskAPRSHandle, /* Task handle. */
    0);              /* Core where the task should run */

This did improve it but did not fix it.

This seems to be the problem, but not sure why yet:

[I][esp32-hal-i2c.c:1138] i2cProcQueue(): Bus busy, reinit
[I][esp32-hal-i2c.c:1138] i2cProcQueue(): Bus busy, reinit
[I][esp32-hal-i2c.c:1138] i2cProcQueue(): Bus busy, reinit
[I][esp32-hal-i2c.c:1138] i2cProcQueue(): Bus busy, reinit
[I][esp32-hal-i2c.c:1138] i2cProcQueue(): Bus busy, reinit
[I][esp32-hal-i2c.c:1138] i2cProcQueue(): Bus busy, reinit

and it gets into a loop.

EDIT: I think this was due to there being no 4K7 pull-up resistors on the display I2C lines. I have added these and will check.

Adding the two pull-up resistors on the I2C bus to the OLED, and changing the priority on the task taskAPRS has fixed all of my problems, so closing this issue.