Search found 74 matches

by nelfata
Wed Oct 15, 2014 2:48 pm
Forum: General Discussion and Questions
Topic: OSError: [Errno 5]
Replies: 28
Views: 11850

Re: OSError: [Errno 5]

Oh, interesting. I thought gc.collect() performs some defragmentation.
If not, what would you recommend in this case?
by nelfata
Wed Oct 15, 2014 12:47 pm
Forum: General Discussion and Questions
Topic: OSError: [Errno 5]
Replies: 28
Views: 11850

Re: OSError: [Errno 5]

At least we are both seeing the same results :)

Can you please tell me why with 27K of memory left, reading with 2048 block size fails?
Does the underlying read IO use that much RAM?
by nelfata
Wed Oct 15, 2014 5:25 am
Forum: General Discussion and Questions
Topic: OSError: [Errno 5]
Replies: 28
Views: 11850

Re: OSError: [Errno 5]

So it must be memory related. I have modules that are being loaded in main, and after all the modules are imported I am trying the SDIO test and the test I pasted earlier. It fails for 2048 blocks. If I disable any imports, then I start seeing what you are seeing. Here is the output of pyb.info(): q...
by nelfata
Wed Oct 15, 2014 5:02 am
Forum: General Discussion and Questions
Topic: OSError: [Errno 5]
Replies: 28
Views: 11850

Re: OSError: [Errno 5]

I wrote the size in my previous comment: 25517 bytes.
by nelfata
Wed Oct 15, 2014 4:50 am
Forum: General Discussion and Questions
Topic: OSError: [Errno 5]
Replies: 28
Views: 11850

Re: OSError: [Errno 5]

Ok, that changed some behavior. Here is one to try: l=0 aFile = open('/sd/cup.jpg', 'rb') while True: try: a = aFile.read(512) if a == '': print('done') break except OSError: print('OSError') break except : print('Some error') break l = l + len(a) print(l) aFile.close() --- You can see that after it...
by nelfata
Wed Oct 15, 2014 2:53 am
Forum: General Discussion and Questions
Topic: OSError: [Errno 5]
Replies: 28
Views: 11850

Re: OSError: [Errno 5]

Hello again, it seem that bug came back. I am having the same read file issues. Please could someone try the zip file I sent earlier. Changing the buffer size from 1024 to 512 gives another behavior. With 1024 size, I get: SmartCup>import SDIO Bytes to read 25517 Read block 1024 so far 0 next 1024 R...
by nelfata
Sun Oct 12, 2014 12:33 am
Forum: General Discussion and Questions
Topic: File I/O
Replies: 5
Views: 3331

Re: File I/O

So what I understand from you now, is that mass storage access from the host PC connected through the MP USB interface could interfere with the MP access to the SD Card. If the host is not connected, the flush and sync should perform the same function. I looked briefly through the code, and the flus...
by nelfata
Sat Oct 11, 2014 10:46 pm
Forum: General Discussion and Questions
Topic: Timer usage
Replies: 8
Views: 2701

Re: Timer usage

Tested. Works great.
by nelfata
Sat Oct 11, 2014 8:37 pm
Forum: General Discussion and Questions
Topic: File I/O
Replies: 5
Views: 3331

Re: File I/O

Does the flush() or sync() work as expected?
by nelfata
Sat Oct 11, 2014 8:37 pm
Forum: General Discussion and Questions
Topic: Timer usage
Replies: 8
Views: 2701

Re: Timer usage

Excellent. Thanks.