F
Reaction score
3

Latest activity Postings About

    • F
      Yes, subdirectories are the way to go. I have to decide whether I want to organize the files by sorting them into a few subdirectories, or just use one big subdirectory whose sole strength will be that it's not the root. In any event, I...
    • F
      if (TheFile) is essentially what I'm doing (see post #14), and it prevents crashes. The crash-prevention problem is solved, but since then this thread has been concerned with trying to find under what circumstances the result of...
    • F
      OK, some form of the TMF hypothesis is correct; it is µSD-card-format-dependent. This code const int msOneSecond = 1000; const char RootFileName[] = "/"; const char PERIOD = '.'; #include <SD.h> const int chipSelect =...
    • F
      Considering the size of the program and the infrequency of crashes, I doubted that anyone would or should try to understand the whole thing, buy a hodgepodge of sensors to duplicate my environment, try somehow to duplicate the sensors'...
    • F
      I have instrumented the top-level loop() of my code using the routines at https://github.com/mpflaga/Arduino-MemoryFree, and after limited (and continuing) testing, there is no sign of a memory leak. I incidentally may have found the origin of...
    • F
      Right. As I noted in post #25, I am treating the memory provided by AF_VC0706.readPicture with neither more nor less care than the example program in the Adafruit library.
    • F
      Thanks for the if (nullptr == mightBeNULLptr) idea. No, I'm not accessing the µSD card from inside an ISR. Good thought, though.
    • F
      I copied the core of my code from Adafruit's MotionDetect.ino example: File imgFile = SD.open(filename, FILE_WRITE); uint32_t jpglen = cam.frameLength(); Serial.print(jpglen, DEC); Serial.println(" byte image"); Serial.print("Writing...
    • F
      The test eliminates the null-pointer crashes that used to occur. Would if (SnapshotFile == null) have been more correct?
    • F
      SD.open should return an object, yes. But sometimes it returns a null pointer, and I now detect that (as shown in post #14), so the program doesn't crash any more.. I'll fix the uint16_t/uint32_t business, but all of the frameLengths from the...
    • F
      I may not understand your comment. I agree that writing short strings to the µSD is inefficient, but SD.write should be able to handle them without poisoning itself or SD.open, if only because it needs to handle short strings as the tail ends of...
    • F
      Thanks for your suggestion. Except here (where I copied the use of 64B gulps from some Adafruit code somewhere, and the comment ("32 might be more stable") comes from there too), I always read & write µSD cards in 512-byte bufferloads, for...
    • F
      As noted in my original post in this thread, my bug leaves the µSD drive in a state that is resistant to SD.begin() but is reset by power cycling. Using CrashReport & its associated breadcrumbs, I've found that the problem arises when...
    • F
      Thanks. I had no doubt that the problem was in my code Right. I don't use String, and I don't directly do any dynamic memory allocation. . I am waiting for the next crash, and then I'll be closing in with more breadcrumbs.
    • F
      OK, CrashReport says A problem occurred at (system time) 21:49:23 Code was executing from address 0x1C358 CFSR: 82 (DACCVIOL) Data Access Violation (MMARVALID) Accessed Address: 0x0 (nullptr) Check code at 0x1C358 - very likely...
    • F
      You're right, I didn't think it through. I have added code to look for the existence of CrashReport and save it to a file on the µSD card. Now I'm just waiting for my app to crash again. Incidentally, some of the directory structure used by...
    • F
      I'm willing to try; the hardware now connected to that board is an XBee transceiver (UART) an anemometer, connected through a debouncer board to an interrupt a VC0706 camera (UART) an ILI9341 TFT display (SPI) an SPS30 (UART) misc analog inputs...
    • F
      Thanks again to @h4ynnym0u5e. Retrying the call to SD.begin gets things back on track. My app is still crashing now and then, but it is a data-collecting satellite, sending data to a central station, and the system as a whole tolerates brief...
    • F
      I have a large (counting libraries, > 400K lines) application that now crashes every few days. I have a clue as to what is going on, but I don't know how to interpret the clue. I wonder if it will ring a bell with anyone else. What I see is...
  • Loading…
  • Loading…
Back
Top