Other Parts Discussed in Thread: C2000WARE
Hi,
My customer is developing SCI communication code in their firmware, but it doesn't work.
Could you provide your advise to solve the problem? The phenomena is described in below.
- F28377S communicates with other portion in the customer's system through SCI.
- F28377S send several packets to the other portion and receiver can receive the message.
- The receiver send packets to F28377S and RX pin waveform seems correct. Then "H" level is about 3.3V and "L" level is about 0V.
- Their fimware can note detect interrupt for RX and F28377S can't receive the message from the receiver.
- When loop back mode is enabled, interrupt flag is asserted and F28377S can receive the message from the receiver.
I attached their code for related to register setting. PLS see the attached temp.c file.
If you need more infromation to solve this, PLS let me know.
void init(void)
{
InitSysCtrl();
DINT;
InitPieCtrl();
IER = 0x0000;
IFR = 0x0000;
InitPieVectTable();
initGpio();
GPIO_SetupPinMux( 56 , GPIO_MUX_CPU1 , 6 ); //CF�J�[�h����iTxD�j
GPIO_SetupPinMux( 57 , GPIO_MUX_CPU1 , 6 ); //CF�J�[�h����iRxD�j��
GPIO_SetupPinOptions( 56 , GPIO_OUTPUT , GPIO_ASYNC ); //CF�J�[�h����iTxD�j
GPIO_SetupPinOptions( 57 , GPIO_INPUT , GPIO_PUSHPULL ); //CF�J�[�h����iRxD�j��
EALLOW; // This is needed to write to EALLOW protected registers
PieVectTable.SCIC_TX_INT = &scic_tx_isr;
PieVectTable.SCIC_RX_INT = &scic_rx_isr;
EDIS; // This is needed to disable write to EALLOW protected registers
ScicRegs.SCICCR.all = 0x0007; //8bit,Idle-line mode,no loop back,no parity,one stop bit
ScicRegs.SCICTL1.all = 0x0003; //TX,RX enable, internal SCK clk,ERR,SLEEP,TXWAKE disable
ScicRegs.SCICTL2.bit.TXINTENA = 1; //TX int disable
ScicRegs.SCICTL2.bit.RXBKINTENA = 1; //RX int enable
ScicRegs.SCIHBAUD.all = ((uint16_t)CF_SCI_PRD & 0xFF00U) >> 8U;
ScicRegs.SCILBAUD.all = (uint16_t)CF_SCI_PRD & 0x00FFU;
ScicRegs.SCIFFTX.all = 0xC022; //TX���荞�݂�FIFO��15�ȉ��Ŕ���
ScicRegs.SCIFFRX.all = 0x0022; //RX���荞�݂�FIFO��1�ȏ�Ŕ���
ScicRegs.SCIFFCT.all = 0x00;
ScicRegs.SCICTL1.all = 0x0023; //SCI�\�t�g�E�F�A���Z�b�g
ScicRegs.SCIFFTX.bit.TXFIFORESET = 1; //TX FIFO���Z�b�g
ScicRegs.SCIFFRX.bit.RXFIFORESET = 1; //RX FIFO���Z�b�g
PieCtrlRegs.PIECTRL.bit.ENPIE = 1; // Enable the PIE block
PieCtrlRegs.PIEIER8.bit.INTx5 = 1;
PieCtrlRegs.PIEIER8.bit.INTx6 = 1;
IER |= M_INT8;
EnableInterrupts();
EINT;
ERTM; // Enable Global realtime interrupt DBGM
}
Best Regards, Taki