strange behavior in the spi_flash example #49971
Unanswered
msfassarella
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
I'm learning Zephyr and I'm using the code at sample/drivers/spi_flash.
I have the board RAK5010 that has a Nordic NRF52840 whit an external IS25WP064 qspi flash device.
Everything looks to work fine, but when I put a k_msleep(500) in some points of the code it returns strange results.
For example, if I put the k_msleep at beginning of the code, the first while loop returns zero in the buffer, but if comments this delay the first loop returns the right data.
`
`
**Output without delay **
00> *** Booting Zephyr OS build v2.7.99-ncs1 ***
00>
00> JEDEC QSPI-NOR NORDIC SPI flash testing
00>
00> ==========================
00>
00> ret: 0, loop #: 1, jedecid: 9d 70 17
00>
**Output with delay **
00>
00> JEDEC QSPI-NOR NORDIC SPI flash testing
00>
00> ==========================
00>
00> ret: 0, loop #: 1, jedecid: 0 0 0 ======> Something is wrong here
00>
00> ret: 0, loop #: 2, jedecid: 9d 70 17
There are many other places where the k_msleep causes an unexpected behavior.
The complete code can be viewed here.
main.zip
I will appreciate very much if someone would explain why this happen.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions