Hi,
I'm using a 320F2801PZA and am having troubles getting the SPI-B peripheral to work. I'm using the GPIO24-27 pins for SPI-B, using it in master mode. I also have SPI-A configured exactly the same (on different pins!) and it works just fine, but SPI-B just sits there and does nothing. I have checked the clock enable to SPI-B in PCLKCR0 (already made that mistake) and the GPIO registers, and all is fine.
The output pins go into the correct initial state (SCLK low, MOSI low, nTE high) for the POL (0) and PHA (1) I'm using. In my software I write a word into SPI-A SPIDAT and then write the same word into the SPI-B SPIDAT. SPI-A correctly clocks out the word, but SPI-B does nothing. I've also checked using the SPITXBUF registers instead of SPIDAT just in case, but no difference. I'm not using the FIFOs, I have left the FIFO registers in their default conditions, which should leave them disabled.
Does the 2801 really have a SPI-B? I have been using the 2801 for several years without problems before, but as it happens I've never used SPI-B. I'm using 7740 as the base for the SPI-B registers, is that correct or is the documentation wrong?
Ideas?
Thanks,
Paul Withers