I'm making a datalogger based around the STM32F405 microcontroller that logs all CANbus traffic onto a micro SD card, but the function File.write() stops being able to write after seemingly random amounts of time
I'm programming this microcontroller using STM32duino, basically treating it as the new Adafruit Feather STM32F405 (since it's the same microcontroller)
I've got it printing out the result of File.write() whenever it tries to write and every time I run the program, it eventually just starts returning 0 when it stops being able to write to the SD card. My question is why?
I'm relatively sure it's not a RAM issue because even after it stops writing the program still runs just fine (other than not being able to write obviously) but it very well could be since I don't have much of a way to actively monitor RAM usage.
Here is the whole code. All the CAN bus handling I did not write, my code starts at "uint8_t insertStr(uint8_t index, char* b1, char* b2)"
Edit by admin: posted the code on Pastebin, rather than a huge chunck here, which possible might freeze the browser (?)
https://pastebin.com/Z3291wCf
If anyone has any insights I would love to hear them. Been banging my head against this problem for the better part of 2 days. Thank you!
I'm programming this microcontroller using STM32duino, basically treating it as the new Adafruit Feather STM32F405 (since it's the same microcontroller)
I've got it printing out the result of File.write() whenever it tries to write and every time I run the program, it eventually just starts returning 0 when it stops being able to write to the SD card. My question is why?
I'm relatively sure it's not a RAM issue because even after it stops writing the program still runs just fine (other than not being able to write obviously) but it very well could be since I don't have much of a way to actively monitor RAM usage.
Here is the whole code. All the CAN bus handling I did not write, my code starts at "uint8_t insertStr(uint8_t index, char* b1, char* b2)"
Edit by admin: posted the code on Pastebin, rather than a huge chunck here, which possible might freeze the browser (?)
https://pastebin.com/Z3291wCf
If anyone has any insights I would love to hear them. Been banging my head against this problem for the better part of 2 days. Thank you!