Search found 59 matches

by jomas
Tue May 21, 2019 8:36 am
Forum: ESP8266 boards
Topic: [SOLVED] uasyncio is blocked for 1 hour, 11 minutes on ESP8266
Replies: 26
Views: 12549

Re: uasyncio is blocked for 1 hour, 11 minutes (Bug?)

@pythoncoder, Your suggested mp_hal_ticks_ms will not work because system_get_time() will roll-over after 1:11H. Your assumption that the compiler truncate is true. The result of the 64bit-counter/1000 will just return the lower 32bits as a unsigned int. @kevinkk525, 1. MICROPY_PY_UTIME_TICKS_PERIOD...
by jomas
Mon May 20, 2019 9:59 pm
Forum: ESP8266 boards
Topic: [SOLVED] uasyncio is blocked for 1 hour, 11 minutes on ESP8266
Replies: 26
Views: 12549

Re: uasyncio is blocked for 1 hour, 11 minutes (Bug?)

I Think you are right that only one coroutine is blocking. (in fact it is not blocking it is just scheduled with a much to long delay) You know why I concluded that the whole uasyncio was blocked? Look at my test program (first post) I had one coroutine 'time_loop' that updates self.second. The othe...
by jomas
Mon May 20, 2019 7:19 pm
Forum: ESP8266 boards
Topic: [SOLVED] uasyncio is blocked for 1 hour, 11 minutes on ESP8266
Replies: 26
Views: 12549

Re: uasyncio is blocked for 1 hour, 11 minutes (Bug?)

@pythoncoder, @kevinkk525, I think I found the bug. In ports/esp8266/ets_alt_task.c there is a function 'ets_loop_iter'. This function is called in the main loop/during idle I think. This function implements a 64 bits counter that represents the system time in uSeconds. A snippet of the code is as f...
by jomas
Sun May 19, 2019 5:52 pm
Forum: ESP8266 boards
Topic: [SOLVED] uasyncio is blocked for 1 hour, 11 minutes on ESP8266
Replies: 26
Views: 12549

Re: uasyncio is blocked for 1 hour, 11 minutes (Bug?)

@pythoncoder, all time functions are more or less derived from the esp-sdk call 'system_get_time()' this is just a 32 bits counter that counts from 0 -> 2^32-1 and then rolls over to 0. I hardly can believe that this call would block. I have not found any reports of this. Also my non-uasyncio versio...
by jomas
Sun May 19, 2019 11:10 am
Forum: ESP8266 boards
Topic: [SOLVED] uasyncio is blocked for 1 hour, 11 minutes on ESP8266
Replies: 26
Views: 12549

Re: uasyncio is blocked for 1 hour, 11 minutes (Bug?)

uasyncio imports and uses utimeq. If I look at the source of utimeq I see the following code: STATIC bool time_less_than(struct qentry *item, struct qentry *parent) { mp_uint_t item_tm = item->time; mp_uint_t parent_tm = parent->time; mp_uint_t res = parent_tm - item_tm; if (res == 0) { // TODO: Thi...
by jomas
Sat May 18, 2019 10:22 pm
Forum: ESP8266 boards
Topic: [SOLVED] uasyncio is blocked for 1 hour, 11 minutes on ESP8266
Replies: 26
Views: 12549

Re: uasyncio is blocked for 1 hour, 11 minutes (Bug?)

Thanks kevinkk525 for reporting the problem. @pythoncoder, I have added a coroutine with await asyncio.sleep(0) in my "test" program as you suggested. It is running now. If the testprogram blocks I will report the results. Added code: @asyncio.coroutine def pythoncoder(self): print("Start coroutine ...
by jomas
Fri May 17, 2019 12:21 pm
Forum: ESP8266 boards
Topic: [SOLVED] uasyncio is blocked for 1 hour, 11 minutes on ESP8266
Replies: 26
Views: 12549

[SOLVED] uasyncio is blocked for 1 hour, 11 minutes on ESP8266

UPDATE may 22: Cause found. The blocking is caused by a bug in mp_hal_ticks_ms. Under certain conditions uasyncio is blocked for exactly 1 hour, 11 minutes. This was first reported in topic https://forum.micropython.org/viewtopic.php?f=16&t=4706. I have been running several esp8266 (ESP-12) units t...
by jomas
Mon Mar 04, 2019 8:57 pm
Forum: ESP8266 boards
Topic: [workaround used] esp8266 gets stuck periodically
Replies: 35
Views: 23053

Re: [workaround used] esp8266 gets stuck periodically

I'm facing the same problem as @kevinkk525. I have build a digital clock (esp-12F with 4x max7219 and jq6500 soundmodule). After a few days/weeks I noticed that the clock was 1 hour, 11 minutes behind. I restarted it but again after working for days it was again 1 hour and 11 minutes behind. I also ...
by jomas
Sat Dec 01, 2018 2:48 pm
Forum: Development of MicroPython
Topic: Error building esp8266 port on pfalcon's branch
Replies: 3
Views: 2831

Re: Error building esp8266 port on pfalcon's branch

gccollect.c:36:1: error: unknown type name 'mp_uint_t'
is the problem. mp_uint_t is not defined.
You can fix this by including mpconfigport.h in the beginning of file: gccollect.c
by jomas
Sun Nov 18, 2018 5:26 pm
Forum: ESP8266 boards
Topic: ESP8266 configuring AP channel
Replies: 2
Views: 2528

Re: ESP8266 configuring AP channel

You can not have different channels for station mode an ap mode. That is most likely the problem here.