FX3 SPI How to use more than 256byte page size in DMA mode

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
GM
Level 1
Level 1
First reply posted First question asked First like given

Hi there,

 

I'm using cyusb3014 FX3 usb IC for I2C/SPI/GPIO handling and it all works fine.

SPI is for flash control.

But SPI speed is little slow, so to increase SPI speed, increased clock from 8 to 32Mhz and reduced threadsleep time 10->1ms.

(From reference code - cyfxusbspidmamode.c)

Then SPI is more faster but still slow.

So I increased page size from 256 to 1024 byte then, speed more faster but some read/write data seemed corrupted.

looks like except 256 byte other data is all 0xFF.

 

Please let me know how to expand spi page size over 256 byte

or fix abnormal data bug. 

 

0 Likes
1 Solution
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hello,

The page size is a characteristic of the Flash memory. Only one page can be written at a time in a Flash memory. Generally, if the page size of flash is 256 bytes and greater amount of data is transferred by the master, then it is wrapped around in the page buffer and only 256 bytes will be written into the flash.       

Also, it takes some time for the internal program operation to be completed within the flash. So, the next page write should be done only after this time is elapsed. This is the reason why a delay is added in the firmware

Best Regards,                                                                                                                                                                                       

AliAsgar

View solution in original post

2 Replies
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hello,

The page size is a characteristic of the Flash memory. Only one page can be written at a time in a Flash memory. Generally, if the page size of flash is 256 bytes and greater amount of data is transferred by the master, then it is wrapped around in the page buffer and only 256 bytes will be written into the flash.       

Also, it takes some time for the internal program operation to be completed within the flash. So, the next page write should be done only after this time is elapsed. This is the reason why a delay is added in the firmware

Best Regards,                                                                                                                                                                                       

AliAsgar

GM
Level 1
Level 1
First reply posted First question asked First like given

Hello AliAsgar,

 

Thank for comments. I got it well. 

0 Likes