DEV 1143 and reset

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
rosenrot
Posts: 30
Joined: Mon Dec 12, 2016 9:39 pm

DEV 1143 and reset

Post by rosenrot » Fri Apr 21, 2017 7:19 am

I do have a TCP client implemented and I do wait for data and writing it to an apa102 led strip.

Code: Select all

while True:
    data=sock.recv(1024)
    esp.apa102_write(pin1,pin2,data)
If I send data via the TCP every 0.01s, the esp8266 runs into the dev 1143 error randomly.

I found here http://bbs.espressif.com/viewtopic.php?t=2615 that this occurs when a client tries to connect when a I/O interrupt happens. for me it seems to happen when I do receive data at the same time I try to write to the apa102.

Does anyone have an idea how to solve this?
Can I somehow disable interrupts while writing to the apa102?
Maybe using the Neopixel implementation could work?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: DEV 1143 and reset

Post by Roberthh » Fri Apr 21, 2017 7:23 am

You could try machine.disable() and machine.enable()

rosenrot
Posts: 30
Joined: Mon Dec 12, 2016 9:39 pm

Re: DEV 1143 and reset

Post by rosenrot » Fri Apr 21, 2017 7:29 am

Roberthh wrote:You could try machine.disable() and machine.enable()
In 1.8.7 this should be machine.disable_irq()? http://docs.micropython.org/en/latest/w ... isable_irq
I guess this would be time critical? I read that one should not disable irqs for more than 50us?

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: DEV 1143 and reset

Post by kfricke » Fri Apr 21, 2017 12:09 pm

I think if you just introduce a very few microseconds of delay/sleep in your code, will let the RTOS, in which Micropython is embedded in, handle the WiFi stuff and avoid the reset.

Of course you must calculate the delay with you favoured refresh rate of the display.

Post Reply