Hello,
i am using TMS570LS0432 . I want communicate SCI Rx in interrupt mode and transmits the received data to terminal for every 1 second.
For that
I enabled Rx INT and i am receiving data correctly from terminal to microcontroller.
For every 1 second transmission from micro-controller to terminal i have enable RTI INT of 100ms.and i am transmitting the data for every 1 second.
If i send data from terminal then i am able to receive data correctly and same i am able to transmit the correct data on terminal.but in case when i am not sending any data from terminal to micro-controller still i am receiving garbage data because every time code going in RX ISR even i am not sending any data from terminal.How can i avoid this issue is there any required to change in scisend() function.
Here is my code
char ReceivedChar[1]={0};
char count=0;
int main(void)
{
_enable_IRQ();
sciInit();
rtiinit();
rtiStartCounter(rtiCOUNTER_BLOCK0);
sciReceive(scilinREG, 1, &ReceivedChar[0]);
while(1)
{
if(count==10)
{
memset(Tx_buff, 0, sizeof(Tx_buff));
sprintf(Tx_buff,"\r\nSPEED_EST_RPM : %d\0",ReceivedChar[0]);
sciSend(scilinREG,strlen(Tx_buff),(uint8*)Tx_buff);
gioToggleBit(gioPORTA, 1);
count=0;
}
}
}
/*******************END of Main code******************/
void sciNotification(sciBASE_t *sci, uint32 flags)
{
sciReceive(sci, 1, &ReceivedChar[0]);
}
void rtiNotification(uint32_t notification)
{
if(notification==rtiNOTIFICATION_COMPARE0)
{
count++;
}
}
Thanks in advance..