Skip to content

ECMA-419 Serial exception on ESP32 when re-opening #1462

@mauroForlimpopoli

Description

@mauroForlimpopoli

Moddable Six. Windos, IDF 5.3.0
This is my funcion to open the Serial port:
(RX: GPIO2 TX: GPIO3)

let serial17;
function activeSerial(baud, port, type , size) {
	serial17 = new device.io.Serial({
		...device.Serial.default,
		baud: baud,
		port: port,
		format: type,
		onReadable: function(count) {
                 // my code
		}
	});	 
}

it works fine, but I can run the following instruction once.

	serial17.close()
	Timer.delay(1000);
	activeSerial(Preference.get("baudRateSet", "integer"), 1 , "buffer", 200) 

The second one I get the error

	xsUnknownError("uart_isr_register failed");

Can you help me?
Regards

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