Hi all
I'm seeing this problem where if I have an interrupt driven task and then try to access the filesystem on a pi pico, it just hangs. This behaviour is explained here https://www.raspberrypi.org/forums/view ... 6&t=310648 with code examples and some comments and a member of that forum confirming the same error is in official micropython as that distributed by the raspberry pi foundation. I don't know the guts of micropython, being merely a user, so I don't really know what to do about it. Can anyone in here help out?
thanks
roy
Hard hang on accessing the filesystem
Re: Hard hang on accessing the filesystem
I can replicate that with the my own build, using the script below based on the script in the cited forum:
It runs typically up to count=5 and then stops.
Edit: This is worth raising an issue at the git repository https://github.com/micropython/micropython
Code: Select all
from machine import Pin, Timer
import uos, time
led = Pin(25, Pin.OUT)
timer = Timer()
count = 0
f = open("afile", "w")
f.write("This is a file\n")
f.close()
def blink(timer):
global count; count = count + 1
led.toggle()
timer.init(freq=4, mode=Timer.PERIODIC, callback=blink)
while True:
uos.rename("afile", "bfile")
time.sleep(0.1111)
uos.rename("bfile", "afile")
time.sleep(0.1111)
print("count =", count)
Edit: This is worth raising an issue at the git repository https://github.com/micropython/micropython
Re: Hard hang on accessing the filesystem
Please let the title of that isseu start with 'rp2:', which makes it better visible. You can edit the title.