Other Parts Discussed in Thread: MOTORWARE, C2000WARE, CONTROLSUITE
Hello,
I am trying to use the SPI B in Motorware Lab 3a at the F28069M-Launchxl with a MSP432401R. The MSP is the Masterdevice and the F28069M the Slave. The MSP Baud rate is set to 500000khz now try to set the F28069M also to this value but i don't know how? I set it to 0x7A120 but get wrong values. Now is the Baudrate when I execute the Programm 0x00AD6D.
void HAL_setupSpiB(HAL_Handle handle)
{
HAL_Obj *obj = (HAL_Obj *)handle;
SPI_reset(obj->spiBHandle);
SPI_disableLoopBack(obj->spiBHandle);
SPI_setMode(obj->spiBHandle,SPI_Mode_Slave);
SPI_setClkPhase(obj->spiBHandle, SPI_ClkPhase_Delayed);
SPI_setClkPolarity(obj->spiBHandle,SPI_ClkPolarity_OutputFallingEdge_InputRisingEdge);
SPI_disableTx(obj->spiBHandle);
// SPI_enableRxFifo(obj->spiBHandle);
// SPI_enableRxFifoInt(obj->spiBHandle);
// SPI_setRxFifoIntLevel(obj->spiBHandle, SPI_FifoLevel_2_Words);
// SPI_enableTxFifoEnh(obj->spiBHandle);
// SPI_enableTxFifo(obj->spiBHandle);
// SPI_setTxDelay(obj->spiBHandle,0x0018);
SPI_setBaudRate(obj->spiBHandle,(SPI_BaudRate_e)(0x7A120));
SPI_setCharLength(obj->spiBHandle,SPI_CharLength_8_Bits);
SPI_enableInt(obj->spiBHandle);
// SPI_setSuspend(obj->spiBHandle,SPI_TxSuspend_free);
SPI_setTriWire(obj->spiBHandle, SPI_TriWire_ThreeWire);
SPI_enable(obj->spiBHandle);
// SPI_resetRxFifo(obj->spiBHandle);
return;
} // end of HAL_setupSpiB() function