Hi,
I have noticed a couple of things that I don't understand on the Piccolo SPI port and together, they are causing me grief:
1. The port is set up as a slave and receives data which is duely read out of the FIFO. At some point later the SPI is turned into a master by setting the SPICTL MASTER_SLAVE bit. Immediately this bit is set the port transmits the data it received earlier - at no point was data loaded into TX buffer and the transmiision is unasked for and unwanted. The only way I have found of getting round this is to hold the port in reset using the SPICCR SPISWRESET pin while the MASTER_SLAVE pin is set. This stops the rogue transmission but leads to the second problem:
2. When in reset and MASTER_SLAVE bit is set, the SPICLK line is driven low. SPRUG71b says that the clock should go to its inactive level (page 25). I have CLOCK_POLARITY set to 1, so the inactive level should surey be high?
Can anyone help me get round, or even just explain, these two things?
Cheers,
John.