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.

TMS570LS1224: MIBSPI Issue in TMS570

Part Number: TMS570LS1224
Other Parts Discussed in Thread: HALCOGEN

I had configured the MBSPI1 in the HalCogen GUI and used CCS for programming the TMS570. Even after configuring clock phase=1 in HalCogen, he clock signal is not delayed by half clock period (as you can see from the oscilloscope waveform). 

CPHA=1       CPOL=0

Please tell me why the TMS570 is not generating the signal properly. 

CODE:


/* USER CODE BEGIN (0) */
/* USER CODE END */

/* Include Files */

#include "sys_common.h"

/* USER CODE BEGIN (1) */
#include "mibspi.h"
/* USER CODE END */

/** @fn void main(void)
* @brief Application main function
* @note This function is empty by default.
*
* This function is called after startup.
* The user can use this function to implement the application.
*/

/* USER CODE BEGIN (2) */
/* USER CODE END */

int main(void)
{
/* USER CODE BEGIN (3) */
uint16_t txBuffer[] = {0X6800, 0X5600,0X0000}; //
uint16_t rxBuffer[2];

mibspiInit(); /*initialize the spi */

// mibspiEnableLoopback(mibspiREG1, Digital_Lbk);

mibspiSetData(mibspiREG1, 0, txBuffer);

mibspiTransfer(mibspiREG1, 0);

while (!(mibspiIsTransferComplete(mibspiREG1,0)))

mibspiGetData(mibspiREG1, 0, rxBuffer);


while(1);
/* USER CODE END */

return 0;
}