Hi Raymundo,
Actually, my above reply is just based on the polling mode.
Now answer your question in details.
Because the SSEL will be controlled by the SSP module, then this pin will pull up after each byte sending.
Now, if you want to control the SSEL pin freely, you can configure this pin as the GPIO, then use the software to control it.
I have modify the SSP code which can realize your function, for simply showing, I modify your demand like this:
SSEL on
send write enable (1 byte 0x11) command
SSEL off
SSEL on
send program command(0x21)
send address (2bytes: 0x31,0x32)
send data (2bytes: 0x41,0x42)
SSEL off
If you want to have different bytes, just change the number.
Then the test result wave from logic analyzer are like this:

zoom in:


Because I didn't add the SPI slave, the MISO don't have the data, but the Master polling control are sending the data which you want.
My polling function is like this:
static void appSSPTest_polling(void)
{
int key;
xf_setup.length = 1;
xf_setup.tx_data = Tx_Buf;
xf_setup.rx_data = Rx_Buf;
Tx_Buf[0]=0x11;
xf_setup.rx_cnt = xf_setup.tx_cnt = 0;
Chip_GPIO_SetPinState(LPC_GPIO_PORT, 7, 19, 0);
Chip_SSP_RWFrames_Blocking(LPC_SSP, &xf_setup);
Chip_GPIO_SetPinState(LPC_GPIO_PORT, 7, 19, 1);
if (Buffer_Verify() == 0) {
DEBUGOUT(sspPassedMenu);
}
else {
DEBUGOUT(sspFailedMenu);
}
xf_setup.length = 5;
xf_setup.tx_data = Tx_Buf;
xf_setup.rx_data = Rx_Buf;
Tx_Buf[0]=0x21;
Tx_Buf[1]=0x31;
Tx_Buf[2]=0x32;
Tx_Buf[3]=0x41;
Tx_Buf[4]=0x42;
xf_setup.rx_cnt = xf_setup.tx_cnt = 0;
Chip_GPIO_SetPinState(LPC_GPIO_PORT, 7, 19, 0);
Chip_SSP_RWFrames_Blocking(LPC_SSP, &xf_setup);
Chip_GPIO_SetPinState(LPC_GPIO_PORT, 7, 19, 1);
if (Buffer_Verify() == 0) {
DEBUGOUT(sspPassedMenu);
}
else {
DEBUGOUT(sspFailedMenu);
}
DEBUGOUT(sspTransferModeSel);
while (1) {
}
}
Board_SSP_Init(LPC_SSP_T *pSSP) function which you can find it in the lpc_board project, it is modified like this:
void Board_SSP_Init(LPC_SSP_T *pSSP)
{
if (pSSP == LPC_SSP0) {
Chip_SCU_PinMuxSet(0x3, 3, (SCU_PINIO_FAST | SCU_MODE_FUNC2));
Chip_SCU_PinMuxSet(0x3, 6, (SCU_PINIO_FAST | SCU_MODE_FUNC2));
Chip_SCU_PinMuxSet(0x3, 7, (SCU_MODE_INACT | SCU_MODE_INBUFF_EN | SCU_MODE_ZIF_DIS | SCU_MODE_FUNC2));
Chip_SCU_PinMuxSet(0x3, 8, (SCU_MODE_INACT | SCU_MODE_INBUFF_EN | SCU_MODE_ZIF_DIS | SCU_MODE_FUNC2));
}
else if (pSSP == LPC_SSP1) {
Chip_SCU_PinMuxSet(0xF, 4, (SCU_PINIO_FAST | SCU_MODE_FUNC0));
Chip_SCU_PinMuxSet(0xF, 5, (SCU_MODE_PULLUP| SCU_MODE_HIGHSPEEDSLEW_EN | SCU_MODE_INBUFF_EN | SCU_MODE_ZIF_DIS | SCU_MODE_FUNC4));
Chip_GPIO_SetPinDIROutput(LPC_GPIO_PORT, 7, 19);
Chip_GPIO_SetPinState(LPC_GPIO_PORT, 7, 19, 1);
Chip_SCU_PinMuxSet(0xF, 6, (SCU_MODE_INACT | SCU_MODE_INBUFF_EN | SCU_MODE_ZIF_DIS | SCU_MODE_FUNC2));
Chip_SCU_PinMuxSet(0xF, 7, (SCU_MODE_INACT | SCU_MODE_INBUFF_EN | SCU_MODE_ZIF_DIS | SCU_MODE_FUNC2));
}
else {
return;
}
}
For your reference, I also attached my LPCxpresso SSP project.
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------