02-11-2019 01:48 AM
I'm new and I'm trying to use xilisf on zynq. I'm using N25Q256A serial nor flash. However I'm a little confused with the configurations.
I add xilisf_5.9 in bsp and set as below:
please help me to check out whether 5 and 3 is the proper value.
And I'm trying to modified the example 'xilisf_qspips_stm_polled_example' (is this example work fine on N25Q256 ?) in sdk to use in my case. This demo uses 3-bytes address and can only address 128Mbit space, while I need to use 4-bytes address to access 256Mbit memory. So I search the source code and try to find where to configure this.
However, in Xilisf.c, I see that in function SpaMicWinFlashInitialize(XIsf *InstancePtr, u8 *BufferPtr), the flash size is configured. But it is not being called, and in fact , no initialization function is being called. This is weird since no proper family is detected.
I check the macros in xparamters.h, they are 5 and 1, isn't it should be 5 and 3 as I set in mss file?
One more problem, when I try to debug this example, the XIsf_Initialize function can't be debugged at c language level, only assemble code can be debugged. Why?
02-12-2019 10:53 AM
Refer to the xilsf library docs or expand out the settings in the MSS and you'll see that serial_flash_family of 5 and serial_flash_interface of 3 are correct for Zynq devices.
#define XPAR_XISF_INTERFACE_PSQSPI 1 is correct, this is setting the interface to PSQSPI. You can see how this is used in xilisf.how
On your debugging issue, make sure you have the symbol table included in your debug session, AR57973 might help.
02-12-2019 07:05 PM
Thank you @glena,
I find out that the serial_flash_family should be 3 for N25QXX according to the xilisf pdf, since I'm using N25Q256A.
However, when I change this setting to 3, the bsp even cannot compile. It's an original bsp and nothing changed except for this setting.
what's the problem?
I'm using xilisf_v5_9 and sdk 2017.4.
Besides, the debug thing still doesn't work, I guess it's because the c source code of xilisf are referenced from the xilisf.a which generated in bsp.
02-13-2019 05:37 AM
When you change the xilsf settings in the BSP, expand the window and you will see that for that version supported QSPI devices are only serial_flash selections 4 and 5. For the N25Q the Micron selection should work
02-13-2019 05:55 PM
Thank you @glena,
However, I keep the serial flash family as 3 and change the serial flash interface to 2 and 1 , all result in same compile error. Why??
Besides, is it that if I want to use 4 bytes address, I must call XIsf_MicronFlashEnter4BAddMode and t XIsf_MicronFlashExit4BAddMode ? Is this the only correct way to access by 4 bytes address ?
02-14-2019 07:42 AM
The device you are using is a Zynq, so the value of 3 is required. A value of 1 is for the AXI QSPI interface, which is in PL farbic, and 2 is for PS SPI, neither of those is your use case so will result in compile errors. The N25Q is a Micron device, so the correct flash family is 5.
I am not familiar with the XIsf_MicronFlashEnter4BAddMode and XIsf_MicronFlashExit4BAddMode commands. You can use the extended address register in your QSPI device. For 32 bit accesses, I/O mode is used.