这是indexloc提供的服务,不要输入任何密码
Skip to content

[ESP32-2432S028] - SD Card file can't be opened to APPEND/WRITE anywhere inside the loop #48

@AllanOricil

Description

@AllanOricil

I can do anything to my file when calling it anywhere during the setup. But whenever I try to open it to append some data, inside the loop and after receiveing a mqtt message, I get and error such as the one shown in the image below:

image

During the setup, I open the file, read it, and then flush and close. Then while the board is running, any time a new mqtt message arrives, I try to write it to the sd card. Again, I open the file in append mode, write, flush and close. But it does not work!

image

Here is the source code if you want to take a look.

https://github.com/AllanOricil/esp32-mfa-totp-generator/tree/feature/ease-adding-new-secrets

UPDATE:
I discovered that if I disable the screen I can finally use sd card operations in the loop
@rzeldent do you know why I cant use the screen and the sd card together?

image

UPDATE 2:
I isolated the problem to lvgl. Im now sure that after starting the UI, i can no longer interact with the SD card

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions