SSP module: SSEL state

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SSP module: SSEL state

420 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by agustinS on Wed Nov 18 08:33:54 MST 2015
Hi everybody.

I am working with a LPC1769 in LPCXpresso.
I cant figure out if when I use one of the SSP modules I have to set the state of the SSEL signal myself or it changes automatically as does in the SPI module.

I think right now that I would prefer to do it myself. Can I do that if I set the corresponding pin as GPIO?

Thanks!
0 Kudos
4 Replies

396 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by agustinS on Thu Nov 19 12:41:36 MST 2015
Thanks!
I have to go deeper in pin muxing.
0 Kudos

396 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Nov 18 11:06:00 MST 2015

Quote: agustinS
But how I decide to set as SSP SSEL?



board.c:
/* Initialize pin muxing for SSP interface */
void Board_SSP_Init(LPC_SSP_T *pSSP)
{
if (pSSP == LPC_SSP1) {
/* Set up clock and muxing for SSP1 interface */
/*
 * Initialize SSP0 pins connect
 * P0.7: SCK
 * P0.6: SSEL
 * P0.8: MISO
 * P0.9: MOSI
 */
Chip_IOCON_PinMux(LPC_IOCON, 0, 7, IOCON_MODE_INACT, IOCON_FUNC2);
Chip_IOCON_PinMux(LPC_IOCON, 0, 6, IOCON_MODE_INACT, IOCON_FUNC2);
Chip_IOCON_PinMux(LPC_IOCON, 0, 8, IOCON_MODE_INACT, IOCON_FUNC2);
Chip_IOCON_PinMux(LPC_IOCON, 0, 9, IOCON_MODE_INACT, IOCON_FUNC2);
}
else {
/* Set up clock and muxing for SSP0 interface */
/*
 * Initialize SSP0 pins connect
 * P0.15: SCK
 * P0.16: SSEL
 * P0.17: MISO
 * P0.18: MOSI
 */
Chip_IOCON_PinMux(LPC_IOCON, 0, 15, IOCON_MODE_INACT, IOCON_FUNC2);
Chip_IOCON_PinMux(LPC_IOCON, 0, 16, IOCON_MODE_INACT, IOCON_FUNC2);
Chip_IOCON_PinMux(LPC_IOCON, 0, 17, IOCON_MODE_INACT, IOCON_FUNC2);
Chip_IOCON_PinMux(LPC_IOCON, 0, 18, IOCON_MODE_INACT, IOCON_FUNC2);
}
}


0 Kudos

396 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by agustinS on Wed Nov 18 09:51:51 MST 2015
Thanks mc!
But how I decide to set as SSP SSEL? I am a bit lost
I am using LPCOpen.
0 Kudos

396 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Wed Nov 18 08:43:30 MST 2015
Hi agustinS,
It will change automatically if set as SSP SSEL. You can also use it as a GPIO and toggle yourself.
0 Kudos