Yes, the Winbond chip. But that code looks like the config for single SPI. Where do you set the Quad-SPI basepin? The four consecutive pins I'm using are P22, P23, P24, P25 for SIO0 thru SIO3 respectively.
Oops, sorry. I misread your pin definitons. How about this?
clkfreq: 80000000
clkmode: XTAL1+PLL16X
baudrate: 115200
rxpin: 31
txpin: 30
tvpin: 12 # only used if TV_DEBUG is defined
cache-driver: winbond_sqi_flash_cache.dat
cache-size: 8K
cache-param1: (22<<24) | (23<<16) | (26<<8) | 0x01 # 0xiiooccpp - ii=mosi oo=miso cc=sck pp=cs-clr
cache-param2: (27<<24) # 0xaabbccdd - aa=cs
The MOSI pin is used as the base of a set of four D0-D3 pins. MISO value isn't really used but it makes the board definition the same if you decide to put a single-SPI chip in instead of the quad-SPI chip.
Okay, good! Propeller-load appears to be writing to the flash, but I'm getting garbage out. Does the driver reqire the pins be aligned to a nibble, or just contiguous?
[martin@Dell xmmc]$ make clean
rm -f *.o *.elf *.a *.cog *.ecog *.binary
[martin@Dell xmmc]$ make
propeller-elf-gcc -mxmmc -Os -mfcache -o fibo.o -c fibo.c
propeller-elf-gcc -mxmmc -fno-exceptions -fno-rtti -o fibo.elf fibo.o
[martin@Dell xmmc]$ ll
total 56
-rw-rw-r--. 1 martin martin 886 Jan 22 10:45 fibo.c
-rw-rw-r--. 1 martin martin 888 Jan 19 00:43 fibo.c.orig
-rwxrwxr-x. 1 martin martin 38996 Jun 9 14:35 fibo.elf
-rw-rw-r--. 1 martin martin 2976 Jun 9 14:35 fibo.o
-rw-rw-r--. 1 martin martin 557 Dec 7 2011 Makefile
[martin@Dell xmmc]$ propeller-load -b ppusb-2-sqi -r -t fibo.elf
Propeller Version 1 on /dev/ttyUSB0
Loading the serial helper to hub memory
9528 bytes sent
Verifying RAM ... OK
Loading cache driver 'winbond_sqi_flash_cache.dat'
1732 bytes sent
Loading program image to flash
12624 bytes sent
Loading .xmmkernel
1724 bytes sent
[ Entering terminal mode. Type ESC or Control-C to exit. ]
�
Okay, good! Propeller-load appears to be writing to the flash, but I'm getting garbage out. Does the driver reqire the pins be aligned to a nibble, or just contiguous?
[martin@Dell xmmc]$ make clean
rm -f *.o *.elf *.a *.cog *.ecog *.binary
[martin@Dell xmmc]$ make
propeller-elf-gcc -mxmmc -Os -mfcache -o fibo.o -c fibo.c
propeller-elf-gcc -mxmmc -fno-exceptions -fno-rtti -o fibo.elf fibo.o
[martin@Dell xmmc]$ ll
total 56
-rw-rw-r--. 1 martin martin 886 Jan 22 10:45 fibo.c
-rw-rw-r--. 1 martin martin 888 Jan 19 00:43 fibo.c.orig
-rwxrwxr-x. 1 martin martin 38996 Jun 9 14:35 fibo.elf
-rw-rw-r--. 1 martin martin 2976 Jun 9 14:35 fibo.o
-rw-rw-r--. 1 martin martin 557 Dec 7 2011 Makefile
[martin@Dell xmmc]$ propeller-load -b ppusb-2-sqi -r -t fibo.elf
Propeller Version 1 on /dev/ttyUSB0
Loading the serial helper to hub memory
9528 bytes sent
Verifying RAM ... OK
Loading cache driver 'winbond_sqi_flash_cache.dat'
1732 bytes sent
Loading program image to flash
12624 bytes sent
Loading .xmmkernel
1724 bytes sent
[ Entering terminal mode. Type ESC or Control-C to exit. ]
�
I have quad SPI working on the Winbond, but only by adding 4.7k pull-up resistors on all six pins which seems like a horrible kluge. And even then data transfer is unreliable.
So using quadSPI Winbond flash on U12 will have to be a user hackable option. (Same chip in U9 w/ single SPI is 100%)
I have quad SPI working on the Winbond, but only by adding 4.7k pull-up resistors on all six pins which seems like a horrible kluge. And even then data transfer is unreliable.
So using quadSPI Winbond flash on U12 will have to be a user hackable option. (Same chip in U9 w/ single SPI is 100%)
I found it hard to get the QuadSPI Winbond chip working on a breadboard as well. Rayman's FlashPoint module with the SST QuadSPI chip worked well though.
FWIW, I have one pull up on the Chip Select pin according to the data sheet suggestion and have zero problems with either David's winbond driver or the ssf_cache driver.
One difference might be the way I have the chip connected.
Strike three for my point-to-point soldering skills. I ripped up the wires to try Jazzed's layout and apparently eliminated whatever was causing the instability. No errors now on any set of quad-SPI pins with no pull-ups necessary. ~2x speed gain with ebasic as well.
Comments
Try this assuming you're using the Winbond chip:
The MOSI pin is used as the base of a set of four D0-D3 pins. MISO value isn't really used but it makes the board definition the same if you decide to put a single-SPI chip in instead of the quad-SPI chip.
So using quadSPI Winbond flash on U12 will have to be a user hackable option. (Same chip in U9 w/ single SPI is 100%)
One difference might be the way I have the chip connected.
Propeller : Flash Pin
P00 : 5
P01 : 2
P02 : 3
P03 : 7
P26 : 6
P27 : 1
Sorry for all the "drama"...
Congrats.
Can you share a way to recreate your success? I was starting to play with it tonight with no success so far.
Thanks!!