UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer ruijie
Observer
158 Views
Registered: ‎08-06-2018

configuration for xilisf with Micron n25q nor flash

Hi, 

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:

xilisf.PNG

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. 

isf init.PNG

parameter.PNG

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?

 

Best regards

0 Kudos
6 Replies
Observer ruijie
Observer
117 Views
Registered: ‎08-06-2018

Re: configuration for xilisf with Micron n25q nor flash

Is that I didn't describe my problem clear?

Can anyone help me out?

0 Kudos
Moderator
Moderator
96 Views
Registered: ‎03-19-2014

Re: configuration for xilisf with Micron n25q nor flash

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.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer ruijie
Observer
82 Views
Registered: ‎08-06-2018

Re: configuration for xilisf with Micron n25q nor flash

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.

xilisf setting.PNG

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.

xilisf compile error.PNG

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.

0 Kudos
Moderator
Moderator
64 Views
Registered: ‎03-19-2014

Re: configuration for xilisf with Micron n25q nor flash

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

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer ruijie
Observer
52 Views
Registered: ‎08-06-2018

Re: configuration for xilisf with Micron n25q nor flash

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 ?

0 Kudos
Moderator
Moderator
28 Views
Registered: ‎03-19-2014

Re: configuration for xilisf with Micron n25q nor flash

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.  

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos