Skip to content

Feather STM32F405 intermittent exception on close() and flush() #6082

Open
@RealAbsurdity

Description

@RealAbsurdity

CircuitPython version

Adafruit CircuitPython 7.1.1 on 2022-01-14; Adafruit Feather STM32F405 Express with STM32F405RG
Board ID:feather_stm32f405_express

Code/REPL

# can't so the entire program... the code in the traceback is here, line 223 is the last line  

            if SDWRITE:
                # save the data to the data_log.txt file
                with open(DFN, "a") as dl:
                    dl.write(ds)
                    dl.write('\n')
                    dl.close()   # error on line 223

Behavior

Traceback (most recent call last):
File "code.py", line 223, in
OSError: [Errno 5] Input/output error

Code done running.

Press any key to enter the REPL. Use CTRL-D to reload.

Description

  • Exception after writing data to a file on the local microsd card using sdioio and closing it
  • Exception is intermittent and can be caught with an exception handler
  • Error occurs intermittently when calling close() on a file
  • Same error occurs intermittently when using flush() on same file
  • Only occurs on Adafruit Feather STM32F405 Express with STM32F405RG

Additional information

Can be resolved by removing the call to close() or flush() but possibly an issue with the io.BytesIO methods

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions