-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
H7 QSPI Transfer Error #5441
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
Comments
Found this in the Errata (DM00368411), not sure if it's related:
|
I have another update on this, I changed
|
@iabdalkader do you have any further updates on this, is it still working ok with the fix mentioned just above (rewrite AR after setting indirect read mode)? On our boards we only use QSPI in memory-mapped mode and have not seen this issue. Do you have the MPU enabled and configured for the QSPI memory-mapped region (it should be if you use the default QSPI code). It could be that the CPU is doing speculative fetch and writing to AR. Although if the bug is 100% reproducible with the same sequence of events then it's unlikely to be speculative fetch. Reading the H7 errata, it doesn't seem any of the QSPI errata apply to our driver, although some are very close... In the end I'd be happy to apply the patch you suggest because it looks harmless. |
Hi, yes that patch is still working as far as I can tell the QSPI is working normally. The QSPI is used for internal flash storage (so it's not memory-mapped, and the MMU is not used). Note: the bug is reproducible, it happens with the exact same sequence and the same address, but only on Linux, my guess is the requested blocks are different between win/linux when mounting the storage. |
You should be using the MPU. It should be enabled to disallow access to the QSPI region starting at 0x90000000. |
I see now that I'm using an older qspi.c revision (MicroPython-1.11 + some recent patches) that predates this 8da39fd so maybe that's the issue here. I'll pull the MPU code and try again. Thanks for the hint. |
Hi I just tested the QSPI again with MPU enabled and without that patch, and it still gets stuck at the same address, in Linux when the storage is mounted...
|
…100-update changing MICROPY_HW_BOARD_NAME from Dongle to DK
* See issue micropython#5441. * This issue is now reproducible with upstream Micropython on the Arduino Portenta H747, QSPI flash PN MX25L12833F.
* See issue micropython#5441. * This issue is now reproducible with upstream Micropython on the Arduino Portenta H747, QSPI flash PN MX25L12833F.
* See issue micropython#5441. * This issue is now reproducible with upstream Micropython on the Arduino Portenta H747, QSPI flash PN MX25L12833F.
* See issue micropython#5441. * This issue is now reproducible with upstream Micropython on the Arduino Portenta H747, QSPI flash PN MX25L12833F.
* See issue micropython#5441. * This issue is now reproducible with upstream Micropython on the Arduino Portenta H747, QSPI flash PN MX25L12833F.
* See issue micropython#5441. * This issue is now reproducible with upstream Micropython on the Arduino Portenta H747, QSPI flash PN MX25L12833F.
See issue #5441. This issue is now reproducible on the Arduino Portenta H747, QSPI flash PN MX25L12833F.
Uh oh!
There was an error while loading. Please reload this page.
QSPI transfer error flag (TEF) is set while reading a certain block in
qspi_read_cmd_qaddr_qdata
this happens exactly when the host (in this case arch/Linux) mounts the storage. I tested a lot of things (disabling cache, IRQs, changing timing etc..) nothing works except if I clear the error flag and restart the transfer it works. There must be something different in the way the host reads/requests blocks because this issue does Not happen on Windows. Unfortunately I don't have any other board with a QSPI flash to test with, the flash I'm using right now is W25Q256JV. This is gdb backtrace from where it gets stuck, thought it might be helpful.EDIT: forgot to mention that the QSPI is used for the internal storage/filesystem.
Note SR=0x1
Edit2: Clearing the flag and setting the address again allows the transfer to finish:
Edit 3: So this makes it work, meaning I don't get a TEF if I do the following:
The text was updated successfully, but these errors were encountered: