Forum Discussion
Bug in hwlibs alt_qspi.c driver ?
- 7 years ago
I have pushed this issue thru our supplier to Intel to get an answer.
This is their response:
I have reproduced the issue and I believe I have found the root cause. Please poll for QSPI controller register cfg field idle until it is equal to 1 at the end of the function alt_qspi_stig_cmd_helper() and it will fix the issue.I have patched alt_qspi.c with this change and it does fix the issue we were seeing.
Hello sir,
This behavior might be due to bufferable transaction.
Can you add isb() or dsb() equivalent function within HWLib after function call alt_qspi_stig_addr_cmd?
Thanks
Hi @FJumaah -
This has not made a difference - the test still fails.
I added an __asm("DSB") instruction after the call to alt_qspi_stig_addr_cmd. I also tried __asm("ISB"), __asm("DMB") and a combination of the three.
I wasn't sure which transaction was bufferable, and so also tried adding the same instructions around the register writes in alt_qspi_sitg_addr_cmd() and alt_qspi_sitg_cmd_helper(). The test still failed for all these cases.
Did you manage to reproduce the problem there? I have realised that the project I sent referenced the incorrect linker command file, but if you update the project to use the arria10-dk-ram-hosted.ld file that was included in what I sent then you should be able to see the same problem when run on an Arria10 dev board with the QSPI flash present.
Best Regards,
Paul
- MCOUNSELL7 years ago
Occasional Contributor
Hi all,
I've seen what I think seem to be bugs also.
- reads return data from qspi address + 1 .... odd
- sometimes gets stuck in alt_qspi_write_helper() and just busy waits for something ... i think it is related to the indirect fill level.... it is as if cannot write any more so it just busy waits for ever... is this a bug or h/w issue?
I'm using the Altera dev kit hardware which I assume is working OK...