Skip to content
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

writeFile(buff, len) doesn't work reliably. #32

Open
ohbhatt opened this issue Sep 10, 2020 · 4 comments
Open

writeFile(buff, len) doesn't work reliably. #32

ohbhatt opened this issue Sep 10, 2020 · 4 comments

Comments

@ohbhatt
Copy link

ohbhatt commented Sep 10, 2020

Files are left with a single character written. Logically implementing the same code using writeChar(char) gives the desired result.
Felt I should through some light on it.

@djuseeq
Copy link
Owner

djuseeq commented Sep 16, 2020

Hi, that is weird, please can you share more info about your project, i mean using SPI or UART(hw or sw?), speed? Do you use some interrupt in your code? Have you tried the example code? If yes the it have the same behavior? Thanks

@ohbhatt
Copy link
Author

ohbhatt commented Sep 16, 2020

Thank you for your response. I am using Hardware Serial @ 115200 Baud. I have tried the example code and it works well most of the time. Sometimes, it only writes one character to the file. I do use interrupts in the rest of my code, A GPS uses another Hardware Serial port, here this problem is more frequent.

I tried writing the same file again and the frequency of the problem has reduced quite a bit, but it still happens 1/5 times.
Please let me know if another Serial connection could hinder with the functions of the library.

My particular code is very large, but I have exactly replicated what is done in the example.

@djuseeq
Copy link
Owner

djuseeq commented Sep 29, 2020

Sorry but i can't reproduce it. Can you try over SPI? Check the wires and try just with Arduino board without attaching any other modules on it with the example ino file.

@ohbhatt
Copy link
Author

ohbhatt commented Oct 1, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants