-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This might help to achieve faster SPI transfer speeds #61
Comments
yes, your are right, requiring a lot of overhead in small packets. xfel write32 0x01c13040 0x29860 this command don't work, because of byte access not work with usb register.
you may need blow code:
|
Great, will try it out, thanks! |
I made these changes to
Hardcoded the scratchpad to use 0x8800: (It's a small payload, so it fits, also will execute faster from sram)
This is the code switching USB mode:
I get
|
I copied the read/write functions from sunxi-fel and adapted them, this works:
|
Hi, based on xfel, I made a program to backup/restore the SPI NAND of a F1C200s-based device (Hantek DSO2C10).
Originally the transfer speeds were very low, about 40KB/s, so 128MB took a very long time.
After analyzing how xfel worked, I made some modifications and was able to read/write to the nand at 300KB/s.
The cmd/swap buffers are very small, so it can't run large queues, requiring a lot of overhead in small packets.
I modified the SPI init to also initialize the SDRAM, and the payload + SPI run function to use the SDRAM address instead the sram buffer at 0x9800.
(This could be done for all SoCs having embedded SDRAM).
Now it's possible to run large command queues and read/write huge data blocks.
For example, this program does:
Read 128*2K flash pages, store in SDRAM
, thenTransfer 128*2K bytes from SDRAM
.Transfer 128*2K bytes to SDRAM
, thenWrite 128*2K flash pages from SDRAM
.Though the speed will be still limited to ~100KB/s due the USB speed.
It's possible to set the USB in HS mode, see here.
But doesn't work with
xfel write32 0x01c13040 0x29860
, getting usb bulk error...So, I'm using
sunxi-fel writel 0x01c13040 0x29860
.It's not in Gihub, but I'm attaching it here.
Due the nature of the program, all the unnecessary code / soc support (Else than for the F1C200s) was removed.
dsoflash-src_cygwin64.zip
The text was updated successfully, but these errors were encountered: