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

esp-storage hangs entire device on write #1714

Closed
sikora77 opened this issue Jun 24, 2024 · 7 comments
Closed

esp-storage hangs entire device on write #1714

sikora77 opened this issue Jun 24, 2024 · 7 comments
Labels
package:esp-storage Issues related to the esp-storage package

Comments

@sikora77
Copy link

When I try to write to the FlashStorage the ESP32 hangs with no logs or panics regardless of write offset

@jessebraham jessebraham added the package:esp-storage Issues related to the esp-storage package label Jun 24, 2024
@bjoernQ
Copy link
Contributor

bjoernQ commented Jun 25, 2024

Does the flash_read_write example (in-tree) work for you? Which exact dev-board/module/chip are you using?
You need to make sure to use the release profile (ESP32 really, really shouldn't access flash during reading/writing).

@sikora77
Copy link
Author

sikora77 commented Jun 25, 2024

I am using an ESP32-WROOM-32, the exact chip is ESP32, the example doesn't work, it hangs after the read, saying the flash size is 4194304 and the read section is just "ff" 32 times. I am using the release profile

@bjoernQ
Copy link
Contributor

bjoernQ commented Jul 1, 2024

What does espflash board-info print?

@sikora77
Copy link
Author

sikora77 commented Jul 2, 2024

➜  ~ cargo espflash board-info
[2024-07-02T11:02:46Z INFO ] 🚀 A new version of cargo-espflash is available: v3.1.0
[2024-07-02T11:02:46Z INFO ] Serial port: '/dev/ttyUSB0'
[2024-07-02T11:02:46Z INFO ] Connecting...
[2024-07-02T11:02:47Z INFO ] Using flash stub
Chip type:         esp32 (revision v1.0)
Crystal frequency: 40MHz
Flash size:        4MB
Features:          WiFi, BT, Dual Core, 240MHz, Coding Scheme None
MAC address:       24:0a:c4:ee:02:e0

@sikora77
Copy link
Author

sikora77 commented Sep 4, 2024

For some reason it stopped hanging, but writing to flash just doesn't work with the provided example code. This is the output:

Flash size = 4194304

Read from 9000:  [68, 65, 6c, 6c, 6f, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff]
Written to 9000: [69, 67, 6f, 70, 70, 01, 02, 03, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff]
Read from 9000:  [68, 65, 6c, 60, 60, 01, 02, 03, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff]
Reset (CTRL-R in espflash) to re-read the persisted data.

@bjoernQ
Copy link
Contributor

bjoernQ commented Sep 4, 2024

@sikora77 can you attach the compiled binary, please? Just to try it on my side and have a look

@sikora77
Copy link
Author

sikora77 commented Sep 4, 2024

after playing around with reading the flash with esptool it started working as intented

@sikora77 sikora77 closed this as completed Sep 4, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:esp-storage Issues related to the esp-storage package
Projects
Archived in project
Development

No branches or pull requests

3 participants