OK guys I did a little more investigating
Firstly I can't test with a blank sketch as I don't actually if my slave device has booted properly unless i send some i2c commands to it
However the first thing my sketch does is wait for 10secs while the slave boots up so I think that can be eliminated as the SPI lines are already set hi/low according to my logic analyser
When i said I am using the ICSP header to connect the SPI, that is because it is marked as such on the protoshield. On the Due it is the 6 pin connector near the centre and marked SPI. So that is the right one according to the image of the Due connectors posted above on this thread
I have now added an external tristate buffer to my Due, and I am controlling it via pin 7
At boot my sketch sets the tristate condition
If you look at the attached screenshot from my Logic16 (great toy by the way!) you can see
i2c SCL on chan 0
i2c SDA on Chan 1
MOSI, SCK, MISO and CS on 2 3 4 5 respectively. These are monitoring the actual SPI bus on output of my external Tristate buffer (connected directly to the slave SPI bus)
Channel 6 shows MOSI on the SPI header of the Due
Channel 7 shows SCK on the SPI header of the Due
The sample shows conditions from boot up
You can see Slave MOSI and Slave SCK are high and Due MOSI (chan 6) is high and Due SCK (Chan 7 is Low)
The first communication on i2c initialises the slave
Slave MOSI and Slave SCK go low
Then follows 18 commands on i2c, each one you can see the processor on the slave board communicates to it's onboard graphics chips via SPI
This is only working because I added an external tristate buffer on the SPI bus!
On the 19th i2c command (the one with the green arrow) I request permission to control the SPI from the slaves onboard processor
You can see it grants permission (purple arrow) and releases the SPI bus to me
After a bit more chatting on the i2c bus I remove the tristate and start loading flash ram via SPI (red arow)
You can see that when I am not communicating on SPI, (right near the end of the sample) that MOSI is high and SCK is low. However this is OK as I have control of the SPI bus
So that is proof of the problem - now how do I fix it other than adding external tristate hardware?
Best regards
Rich
Oh - PS
Even when I did all this, the damn slave will still not load the flash RAM. However as soon as I connect my scope probe to SCK on the slave bus (output from my tristate buffer) everying works perfectly!! What could be causing that?
I have also noticed that 3.3V on my Due is actually 3.8V which may also be causing a problem as this slave device seems very intollerant. Is that normal or is it faulty? I am powering Due via Programming USB port