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

qspi_flash example broken (at least on ESP32-S2 - most probably for all chips) since b5f0246 #2229

Closed
bjoernQ opened this issue Sep 25, 2024 · 5 comments · Fixed by #2231
Closed
Assignees
Labels
bug Something isn't working peripheral:spi SPI peripheral status:needs-attention This should be prioritized

Comments

@bjoernQ
Copy link
Contributor

bjoernQ commented Sep 25, 2024

Bug description

Since b5f0246

Output from the example is

[21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21]
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

While it should be

[48, 65, 6c, 6c, 6f, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 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, 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, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff]
Hello!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!................................................................

To Reproduce

Run the qspi_flash example with an SPI flash chip attached

Environment

Tested on ESP32-S2 but most probably broken for all chips.

(We should also make sure to improve our HIL-tests to catch this)

@bjoernQ bjoernQ added bug Something isn't working peripheral:spi SPI peripheral status:needs-attention This should be prioritized labels Sep 25, 2024
@bugadani bugadani self-assigned this Sep 25, 2024
@bugadani
Copy link
Contributor

bugadani commented Sep 25, 2024

Thanks, I will take care of this.

@bugadani
Copy link
Contributor

I'm somewhat confused here about what's happening. Are you sure you were checking newest main? You switched the buffer sizes back to what they are supposed to be in #2139 and since then, dma_rx_buf should be 320 bytes long. However, in the OP you pasted a 256 byte long output. (And while I don't yet have a flash chip attached to my S2, I get 320 bytes of 0's).

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Sep 25, 2024

I'm somewhat confused here about what's happening. Are you sure you were checking newest main? You switched the buffer sizes back to what they are supposed to be in #2139 and since then, dma_rx_buf should be 320 bytes long. However, in the OP you pasted a 256 byte long output. (And while I don't yet have a flash chip attached to my S2, I get 320 bytes of 0's).

I did git bisect and the "good" output was the last good output, the "bad" was the last bad output I have seen. I can repeat the tests

@bugadani
Copy link
Contributor

If it isn't a huge time sink, please paste the output of the example from the main branch. It shouldn't be 256 bytes, that's for sure.

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Sep 25, 2024

[88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 88, 98, 88, 89, 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, 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, ff, ff, ff, ff, ff, ff, ff, ff, ff, ff]
................................................................................................................................................................................................................................................................................................................................

commit 3bb49b0

@bugadani bugadani mentioned this issue Sep 25, 2024
6 tasks
@bjoernQ bjoernQ linked a pull request Sep 25, 2024 that will close this issue
6 tasks
@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working peripheral:spi SPI peripheral status:needs-attention This should be prioritized
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants