working on a program using STM32F103C8T6 where I encounter a problem reading files from an SD card
Good evening guys ,
I'm working on a program using an STM32F103C8T6 microcontroller where I encounter a problem reading files from an SD card. Here's the relevant part of my program:
Solution:Jump to solution
Check the available memory before and after each file operation to see if you're running out of RAM.
6 Replies
When I comment out reading the second file (
MaJDate.txt
), reading the ProgFP.txt
file works fine. However, when MaJDate.txt
is uncommented, the program gets stuck while reading that file.
Additional Information:
-I did not receive a specific error message; the program simply hangs.
-Both ProgFP.txt
and MaJDate.txt
are text files.
-ProgFP.txt
contains several lines of text, and MaJDate.txt
contains numerical data separated by new lines.
-I am using the Arduino SD library for file operations.
-No other code sections interact with the SD card or file operations directly.
What might be causing this issue with reading both files sequentially???@Camila_99$$ is the file path to your MajDate.txt correct, and wats it's size
Thanks @Marvee Amasi @Camila_99$$ this was indeed really helpful I would let u guys know how it panned out
Hii yes, the file path to MaJDate.txt is correct. The file is located in the root directory of the SD card, just like ProgFP.txt. The size of MaJDate.txt is approximately 13 bytes.
Could the size or format of the file be causing this issue, or is there something else I should check? @Enthernet Code
Solution
Check the available memory before and after each file operation to see if you're running out of RAM.