Caveats of using mp_sched_schedule() ?

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
MrSurly
Posts: 7
Joined: Wed Apr 19, 2017 6:08 pm

Caveats of using mp_sched_schedule() ?

Post by MrSurly » Wed May 17, 2017 2:57 pm

I'm using mp_sched_schedule() to trigger callbacks into µPy. This by-and-large works fine, but if I have some code in the callback that writes to flash, it crashes spectacularly, but without usefull backtrace (see https://github.com/espressif/esp-idf/issues/611).

Are there any known caveats to using mp_sched_schedule() that might be causing problems?

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: Caveats of using mp_sched_schedule() ?

Post by Damien » Thu May 18, 2017 4:58 am

Did I see correctly that this problem is now fixed? There shouldn't be any problems using mp_sched_schedule() like the kind you describe.

Sent from my GT-I9105P using Tapatalk

MrSurly
Posts: 7
Joined: Wed Apr 19, 2017 6:08 pm

Re: Caveats of using mp_sched_schedule() ?

Post by MrSurly » Thu May 18, 2017 6:16 am

Yes, the problem is resolved (probably by your fixups for IDF sync), but I still don't know why the flash writes only failed from within the function that was called by mp_sched_schedule(), thus this question.

It was a long shot, but I figured it was worth asking.

Thanks.

Post Reply