alt_qspi_read() is returning data from the QSPI address -1. I've written data to the QSPI by two different methods. quartus_hps.exe and also using alt_qspi_write function it in both cases the data from QSPI is returned out by 1byte address.
I am using the Altera Cyclone V dev kit.
QSPI is setup in PlatformDesigner as per the GSRD examples.
I have debugged through the alt_qspi_read() code and I cannot see any obvious "out by one" issues.
The hardware must be OK I assume since the preloader runs correctly from QSPI and loads my bare metal application and runs it.
The problem is quite easy for me to work around BUT I'm worried that it is the sign of something bad elsewhere!! Has anyone seen similar?
Intel? Can you comment please?
I see, that's the same IC as I have on the Dev Kit board. My gut is that the Altera C code is to blame rather than the IC/board...... something in the QSPI indirect read code............. but no comment yet from Intel/Altera....
I've worked around the issue by adjusting the requests into alt_qspi_read(). I wrote a wrapper around this function and I read to address -4 with size +4. Hence I read the preceeding 4 bytes also.... then I pull out the data that I really want........ it's a total HACK of course but it is a reliable HACK for now until I find out the real source of the issue.
@INTEL ----- please give us some more input guys/girls.... your FPGA SoC is awesome.... loadsa folks wanna make solutions out of it and give you loads more money for these ICs but you really need to support us better..... pleeeease
Forgive me if I'm telling you something that you already know here but you have to word align your read requests in your workaround....... Hence you cannot read address-1 as a work around.... you have to read address-4 -- to the end of where you want to read and then copy the data out of the buffer....... forgive me if I'm teaching grannies to suck eggs 🙏