Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have qspi flash polled example code which is writing unique value for some counts.
For my requirements have restore a file of size 4Mbytes to qspi memory. But after 256 bytes the values are repeating continuously, not getting the values what I restored into memory.....

What I have tried:

I commented unique value for loop, taken page count=16210 and page size=256(since max data=page count * page size). I restored the file to qspi memory, but when read the file back for confirmation I'm getting 256 bytes of continuous values repatedly...

Here I'm attaching example program...
tps://github.com/Xilinx/embeddedsw/blob/master/XilinxProcessorIPLib/drivers/qspips/examples/xqspips_flash_polled_example.c
Posted
Comments
Jochen Arndt 8-Sep-17 5:25am    
You have an error in your program that probably does not increment an address pointer. But that error is in your code and not in the example code at GitHub.
Veerendra-13142768 8-Sep-17 5:58am    
I'm getting 4Mbytes of value. But its repetition of first 256 bytes, not getting what I exactly restored....
Jochen Arndt 8-Sep-17 6:47am    
"You have an error in your program that probably does not increment an address pointer"

But without seeing your code nobody can help because the posted link to the example program does not contain your code.
Veerendra-13142768 9-Sep-17 2:28am    
Hi,
The write capability of a QSPI is limited to a page size at a time (almost always 256 bytes).
As the SpiWriteFlash() send the write request and exit after the end of the bus transfer, it is normal only 256 byte can be written at a time.But i want to write a file size of 4Mbytes. I tried to increase the writebuffer length only....

#define PAGE_SIZE 256
#define PAGE_COUNT 16211
#define MAX_DATA PAGE_COUNT * PAGE_SIZE
u8 WriteBuffer[MAX_DATA + DATA_OFFSET];
u8 ReadBuffer[MAX_DATA + DATA_OFFSET + DUMMY_SIZE];

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900