multi use ssp0

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by leluno on Sun May 04 10:33:51 MST 2014

I have a spi-lcd on SSP0/1 and a sd-card on SSP0/0. Even if  disconnect the lcd from SSP0, the card does not work. properly. Where could be the problem

void deselect (void)
cs_sd_high;/* CS = H */
xchg_spi(0xFF);/* Dummy clock (force DO hi-z for multiple slave SPI) */
SSPxCR0 |= (1<<CPOL);
SSPxCR0 |= (1<<CPHA);

__set_PINSEL(1, 20, 0);// Attach SCK0 to I/O pad
__set_PINSEL(1, 23, 0);// Attach MISO0 to I/O pad
__set_PINSEL(1, 24, 0);// Attach MOSI0 to I/O pad

//SSP0CPSR = 2;//oder 2?