-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
size limitation in filesystem_file_read? #42
Comments
such small and arbitrary limitation is highly unlikely.
Please check if there is any other problems in your program (e.g. stack
overflow).
Anyway, we will need a small standalone reproduction case to be able to
diagnose the problem.
… |
I have tested the code under Kendryte standalone sdk and it works fine but the same code doesn’t work in FreeRtos sdk.There is no stack overflowing and I am using the example sd card code in FreeRtos demo repository and just did a little change to get the size of file and then read it. If size iz higher than 1000, it try to read in 1000 bytes block ( In the standalone sdk I was able to read 65535 bytes in each reading).However, I’ll attach the code here by Monday. |
Hi @minux @sunnycase int main() FIL file; char *path = "DCIM/100VIG/VPH_00001.BMP"; //printf("/sd read write test/\n"); if((ret = f_open(&file, path, FA_READ)) == FR_OK)
printf("DONE mm%d ,len=%u\n",mm,len); }
} while (1); I should mention that if I remove " vTaskDelay(pdMS_TO_TICKS(1));" in the else statement it doesn't work fine but with this delay I was able to read the file . Also If try to read in 1024 bytes block it won't work fine either. As I mentioned before , I tested this code in K210-SDK standalone and I was able to read it in 65535 bytes block without any problem. VPH_00001.BMP is a 300kb files. |
Hello.I cannot get your problem.you can test my code or give the whole test code to me. handle_t install_sdcard() int main()
} |
Hi @minux Problem it's resolved since you have updated the branch ( I've seen that with old develop branch , then I've noticed that you have done some changes in SPI and then I updated my FREERTOS around two weeks ago and problem was resolved, however still for writing on sd card I need to break down the file into 512 bytes block otherwise doesn't work fine with large files and can't write. Have you tried to write large files? I wan't able to use fwrite even with breaking down to small blocks , However f_write can store the large files if it's broken down to 512bytes block. |
Hi All,
I am trying to read a file ( file size is 300kb) from sdcard using filesystem_file_read function. I tried to read in 1000bytes blocks but it doesn't work properly and after reading some blocks it doesn't respond anymore. I'd appreciate if you can help me with that.
The text was updated successfully, but these errors were encountered: