Part Number: TMS320F28027F
Other Parts Discussed in Thread: C2000WARE
Dear team:
Below is my program:
unsigned char Msg_Tx_Buf[10] = {0x55, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
interrupt void sciARxISR(void)
{
HAL_Obj *obj = (HAL_Obj *)halHandle;
float temp = 0;
unsigned char loop = 2;
Msg_Rx_Buf[ ++RX_Data_counter] = halHandle->sciAHandle->SCIRXBUF;
PIE_clearInt(obj->pieHandle,PIE_GroupNumber_9);
if((RX_Data_counter == 0) & (Msg_Rx_Buf[0] != 0xAA))
{
RX_Data_counter = 0;
return;
}
if((RX_Data_counter == 1) & (Msg_Rx_Buf[1] != 0x55))
{
RX_Data_counter = 0;
return;
}
if(RX_Data_counter >= 9)
{
//第一步:清零操作
RX_Data_counter = 0;
SCI_disableRxInt(halHandle->sciAHandle);
SCI_disableRx(halHandle->sciAHandle);
for( ; loop < 9; loop ++)
{
Rx_Num_Check += Msg_Rx_Buf[loop];
}
if((Msg_Rx_Buf[0] == 0xAA) & (Msg_Rx_Buf[1] == 0x55) & Msg_Rx_Buf[9] == (Rx_Num_Check & 0x00FF)) //检查校验和
{
Rx_Num_Check = 0;
Rx_Flag = 0;
SCI_TxMsg(Msg_Tx_Buf, 10);
}
SCI_enableRx(halHandle->sciAHandle);
SCI_enableRxInt(halHandle->sciAHandle);
}
} // end of sciARxISR() function
This is my interrupt program. This program receives ten data and then processes it. During debugging, it is found that it will be abnormal when receiving more than ten or less data. When sending more than ten data to the DSP at one time, the data from the host computer sent by the DSP is different from the data in the Msg_Tx_Buf. There is no operation on the Msg_Tx_Buf in the program.
When sending more than ten data for several times, the receiving interrupt can no longer enter, but other interrupts are normal. In other interrupts, the host computer can receive the sending data, and the received data is consistent with the content in Msg_Tx_Buf.
What causes this?
Best regards