mpy issue in while loop

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
jk3ger
Posts: 6
Joined: Thu Jun 25, 2020 7:06 am

mpy issue in while loop

Post by jk3ger » Mon Aug 03, 2020 1:05 pm

Hello everybody.
I'm using frozen module for my project.
So I found problem which I don't know how to solve.

For example I use .mpy module from link https://docs.micropython.org/en/latest/ ... atmod.html
Everything works correctly when I run factorial method once
But when I use factorial method under while loop my board start rebooting.
I found problem it connects with heap fragmentation. So when .mpy method can't allocate memory in heap then board reboots.

What can I do to avoid such problem?

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

Re: mpy issue in while loop

Post by Roberthh » Mon Aug 03, 2020 3:21 pm

You may try tomorrow the most recent build of the firmware. Today Damien published a change that may affect what you noticed.
See: https://github.com/micropython/micropyt ... e211d7779c

Post Reply