LPC54114 SPI can transfer data, but SSEL keep high

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

LPC54114 SPI can transfer data, but SSEL keep high

722 Views
erich0604
Contributor I

I download these two example file from https://mcuxpresso.nxp.com/en/example-projects?uvid=187339 : 

spi_half_duplex_polling_master

spi_polling_b2b_transfer_master

but in both project, the SSEL port seems to keep high, even in transmiting data period.  I didn't connect the slave.

my initial setting are : (not changed)

void SPI_MasterGetDefaultConfig(spi_master_config_t *config)
{
assert(NULL != config);

/* Initializes the configure structure to zero. */
memset(config, 0, sizeof(*config));

config->enableLoopback = false;
config->enableMaster = true;
config->polarity = kSPI_ClockPolarityActiveHigh;//kSPI_ClockPolarityActiveHigh: 0 kSPI_ClockPolarityActiveLow :1
config->phase = kSPI_ClockPhaseFirstEdge; //kSPI_ClockPhaseFirstEdge : 0 kSPI_ClockPhaseSecondEdge :1
config->direction = kSPI_MsbFirst;
config->baudRate_Bps = 500000U;
config->dataWidth = kSPI_Data8Bits;
config->sselNum = kSPI_Ssel0;
config->txWatermark = kSPI_TxFifo0;
config->rxWatermark = kSPI_RxFifo1;
config->sselPol = kSPI_SpolActiveAllLow;
config->delayConfig.preDelay = 0U;
config->delayConfig.postDelay = 0U;
config->delayConfig.frameDelay = 0U;
config->delayConfig.transferDelay = 0U;
}

messageImage_1563170637349.jpg

Labels (2)
0 Kudos
2 Replies

606 Views
erich0604
Contributor I

sorry,  I found the problem. 

cause I initial SSEL0 for config->sselNum 

so according to AN12127, the pin assigned to SDA port. not the SSEL pin on board. 

0 Kudos

606 Views
FelipeGarcia
NXP Employee
NXP Employee

Hello,

 

Thanks for sharing your solution!

 

Regards,

Felipe

0 Kudos