Skip to content

[Serial] Guru meditation error when changing baudrate and using Wire #2015

Closed
@toomasz

Description

@toomasz

Hardware:

Board: ESP32 OLED V2.0 TTGO
Core Installation/update date: 04.11.2018
IDE name: Visual Micro
Flash Frequency: 40Mhz
PSRAM enabled: no
Upload Speed: 115200
Computer OS: Windows 10

Description:

I'm building a library for sim800l modem which needs to find it's current baudrate.
Guru meditation error occurs when program try to iterate through baudrates for the second time.
It seems that Serial.begin hangs sometimes.

When im not initializing Wire in setup, Guru meditation error does not occur but Serial.begin is stuck anyway.

#include <Wire.h>

const int _baudRates[] =
{
	460800,
	115200,
	19200,
	38400,
	230400,
	9600,
	4800,
	57600,
	2400,
	1200,
	0
};

void setup() 
{

	Serial.begin(500000);
	Wire.begin(4, 15);
	Wire.beginTransmission(188);
	Wire.endTransmission();
}

void loop() 
{
	int i = 0;
	do
	{
		int baudRate = _baudRates[i];
		Serial.printf("trying baud rate: %d\n",baudRate);
		Serial2.end();
		Serial2.begin(baudRate, SERIAL_8N1, 16, 12, false);	
		Serial2.println("AT");
		i++;
	} 
	while (_baudRates[i] != 0);

	Serial.println("loop");
	delay(300);
}

Debug Messages:

Opening port
Port open
�trying baud rate: 460800
trying baud rate: 115200
trying baud rate: 19200
trying baud rate: 38400
trying baud rate: 230400
trying baud rate: 9600
trying baud rate: 4800
trying baud rate: 57600
trying baud rate: 2400
trying baud rate: 1200
loop
trying baud rate: 460800
Guru Meditation Error: Core  1 panic'ed (Interrupt wdt timeout on CPU1)
Core 1 register dump:
PC      : 0x40081a07  PS      : 0x00050034  A0      : 0x40081e0c  A1      : 0x3ffbe790  
A2      : 0x3ffbec48  A3      : 0x00000000  A4      : 0x00000001  A5      : 0x400880a0  
A6      : 0x00000000  A7      : 0x3ffbe7d0  A8      : 0x3ff40000  A9      : 0x00000001  
A10     : 0x3ffbe7c8  A11     : 0x00000001  A12     : 0x00000000  A13     : 0x00000001  
A14     : 0x00000000  A15     : 0x3ffb8414  SAR     : 0x00000015  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xffffffff  
Core 1 was running in ISR context:
EPC1    : 0x4000bff0  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x40081a07

Backtrace: 0x40081a07:0x3ffbe790 0x40081e09:0x3ffbe7c0 0x4000bfed:0x00000000

Core 0 register dump:
PC      : 0x400d543a  PS      : 0x00060134  A0      : 0x80087225  A1      : 0x3ffbbfd0  
A2      : 0x00000008  A3      : 0x00000000  A4      : 0x00000001  A5      : 0x80000020  
A6      : 0x00000000  A7      : 0x3ffbbb2c  A8      : 0x3ffc11dc  A9      : 0x3ffc11c0  
A10     : 0x00000000  A11     : 0x00000001  A12     : 0x00000000  A13     : 0x00000001  
A14     : 0x00060120  A15     : 0x00000000  SAR     : 0x00000000  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  


Decoded:
PC: 0x40081a07: _uart_isr at C:\Users\xxx\Documents\Arduino\hardware\espressif\esp32\cores\esp32\esp32-hal-uart.c line 81
EXCVADDR: 0x00000000

Decoding stack results
0x40081a07: _uart_isr at C:\Users\xxx\Documents\Arduino\hardware\espressif\esp32\cores\esp32\esp32-hal-uart.c line 81

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions