Other Parts Discussed in Thread: CONTROLSUITE
void HAL_setupSciA(HAL_Handle handle)
{
HAL_Obj *obj = (HAL_Obj *)handle;
SCI_clearAllRegs(obj->sciAHandle); //clears all bits in following regs
SCI_enableChannels(obj->sciAHandle); //sets bit 15 in SCIFFTX
//SCI_enableTxFifoEnh(obj->sciAHandle); //sets bit 14 in SCIFFTX (enable FIFO operation)
SCI_enableTxFifo(obj->sciAHandle); //sets bit 13 in SCIFFTX
SCI_clearTxFifoInt(obj->sciAHandle); //clears bit 7 in SCIFFTX
SCI_setTxFifoIntLevel(obj->sciAHandle, SCI_FifoLevel_4_Words); //in SCIFFTX
SCI_enableTxFifoInt(obj->sciAHandle); //sets bit 5 in SCIFFTX
SCI_clearRxFifoOvf(obj->sciAHandle); //clears bit 14 in SCIFFRX
SCI_enableRxFifo(obj->sciAHandle); //sets bit 13 in SCIFFRX
SCI_clearRxFifoInt(obj->sciAHandle); //clears bit 6 in SCIFFRX
SCI_setRxFifoIntLevel(obj->sciAHandle, SCI_FifoLevel_1_Word); //in SCIFFRX
SCI_setNumStopBits(obj->sciAHandle, SCI_NumStopBits_One); //in SCICCR
SCI_disableParity(obj->sciAHandle); //clear bit 5 in SCICCR
SCI_disableLoopBack(obj->sciAHandle); //clear bit 4 in SCICCR
SCI_setMode(obj->sciAHandle,SCI_Mode_IdleLine); //clear bit 3 in SCICCR
SCI_setCharLength(obj->sciAHandle, SCI_CharLength_8_Bits); //bits 2-0 in SCICCR
SCI_disableRxErrorInt(obj->sciAHandle); //clear bit 6 in SCICTL1
SCI_disableTxWake(obj->sciAHandle); //clear bit 3 in SCICTL1
SCI_disableSleep(obj->sciAHandle); //clear bit 2 in SCICTL1
SCI_enableTx(obj->sciAHandle); //set bit 1 in SCICTL1
SCI_enableRx(obj->sciAHandle); //set bit 0 in SCICTL1
//SCI_enableTxInt(obj->sciAHandle); //set bit 1 in SCICTL2
SCI_enableRxInt(obj->sciAHandle); //set bit 0 in SCICTL2
SCI_setBaudRate(obj->sciAHandle,23); //set baud rate value to 115.2Kbaud (-?%)
SCI_enable(obj->sciAHandle); //set? bit 5 in SCICTL1
return;
} // end of HAL_setupSciA() function