Here is my guess at what is going on.
The LPC1768 implements two SSP controllers, and one SPI controller. Controller SSP0 shares the same pins as the SPI controller. On page 401 of the User Manual, there is the following remark:
Quote:
Remark: SSP0 is intended to be used as an alternative for the SPI interface, which is
included as a legacy peripheral. Only one of these peripherals can be used at the any one
time.
The mbed library is no doubt using SSP0 and SSP1. You are trying to access the SPI port, and are not able to because SSP0 is already enabled. That would be why you don't see your speed and format bits show up when you read the SPI status register.
If you disable SSP0 and then remove its power and clock, then enable power and clock for the SPI controller, that may get you going. (You might find it helpful to check the code in the CMSIS driver library to see how the SPI and SSP initialization is handled.)
Hello, I have an IC that needs requires 8bit data transfers that are LSB first. I do not want to swap the order of the bits in a byte before I send it(not elegant).
On page 407 of the datasheet has a bit 6 called LSBF. I need to set this bit.
I have tried to use the spi object like normal (set speed and format CPHA = 1 CPOL = 1 ) and then set the bit via LPC_SPI->SPCR But it does not work. Also my speed and format bits don't show up when I read the SPCR register.
Jeff