AnsweredAssumed Answered

How can I use nhs3152's SPI interface?

Question asked by Li Liao on Apr 12, 2019
Latest reply on Apr 23, 2019 by Dries Moors

nhs3152lpcxpresso sdk

Hello, I want to use nhs3152's spi interface to communicate ADS1292R(from TI). But when I set the setting as User's guide, I found that the SPI driver isn't work as I hope. Here are my settings:

/* SSP initialization */
Init_SSP_PinMux();
Chip_SSP_Init(NSS_SSP);

ssp_format.frameFormat = SSP_FRAME_FORMAT_SPI;
ssp_format.bits = SSP_DATA_BITS;
ssp_format.clockMode = SSP_CLOCK_MODE0;
Chip_SSP_SetMaster(NSS_SSP, SSP_MODE_TEST);
Chip_SSP_SetFormat(NSS_SSP, ssp_format.bits, ssp_format.frameFormat, ssp_format.clockMode);
Chip_SSP_SetBitRate(NSS_SSP, 100000);

Buffer_Init();
/* Setup SSP buffer */
xf_setup.length = BUFFER_SIZE;
xf_setup.tx_data = Tx_Buf;
xf_setup.rx_data = Rx_Buf;
xf_setup.rx_cnt = xf_setup.tx_cnt = 0;

 

It would always run to a error condition which shows Overun.

Outcomes