This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28069M-Q1: TMS320F28069M-Q1

Part Number: TMS320F28069M-Q1
Other Parts Discussed in Thread: MOTORWARE

Hi,

I try to use SPIA in a connection with an IMU but have no signal CS when I send message using SPI-Write fonction.

My configuration for the SPI is the following one in hal.c (I used motorware):

For the Pin configuration:

// SPI SDI TO IMU
GPIO_setMode(obj->gpioHandle,GPIO_Number_16,GPIO_16_Mode_SPISIMOA);
// SPI SDO TO IMU
GPIO_setMode(obj->gpioHandle,GPIO_Number_17,GPIO_17_Mode_SPISOMIA);
// SPI SCLK TO IMU
GPIO_setMode(obj->gpioHandle,GPIO_Number_56,GPIO_56_Mode_SPICLKA);
// SPI /SCS TO IMU
GPIO_setMode(obj->gpioHandle,GPIO_Number_19,GPIO_19_Mode_SPISTEA_NOT);

For the SPI config:

void HAL_setupSpiA(HAL_Handle handle)
{ //Update done by louis S on May 25 2021 to configure SPI A for IMU control
// the IMU is a LSM6DSM
HAL_Obj *obj = (HAL_Obj *)handle;
//Start with a Reset of the SPI
SPI_reset(obj->spiAHandle);
SPI_setMode(obj->spiAHandle,SPI_Mode_Master);
SPI_setCharLength(obj->spiAHandle,SPI_CharLength_16_Bits);
SPI_setClkPhase(obj->spiAHandle,SPI_ClkPhase_Normal);
SPI_setClkPolarity(obj->spiAHandle,SPI_ClkPolarity_OutputFallingEdge_InputRisingEdge);
SPI_setBaudRate(obj->spiAHandle,SPI_BaudRate_1_MBaud);
SPI_setTriWire(obj->spiAHandle,SPI_TriWire_NormalFourWire);
SPI_enableTx(obj->spiAHandle);
SPI_enableTxFifoEnh(obj->spiAHandle);
SPI_enableTxFifo(obj->spiAHandle);
SPI_setTxDelay(obj->spiAHandle,0);
SPI_clearTxFifoInt(obj->spiAHandle);
SPI_enableChannels(obj->spiAHandle);
SPI_enableRxFifo(obj->spiAHandle);
SPI_setSuspend(obj->spiAHandle,SPI_TxSuspend_free);
SPI_enable(obj->spiAHandle);
return;
} // end of HAL_setupSpiA() function

And I use the SPI Write function in nthe main loop just to test the signal before connection to the IMU with the following code:

SPI_write(handle->spiAHandle,data_to_send);
// send dummy message
SPI_write(handle->spiAHandle,0);

Could you help me to get the CS signal.

Regards

Louis