Hello,
I'm Juan Carlos, and I start to work with Launchpad Hercules the with TMS570LS0432.
I saw the video to work with SCI on the Launchpad, and the my project functioning correctly, but I can't understand the function with the line that mark in this code.
Why is necessary write this line? I understand that in the interrupt the MCU read the data in the SCI Rx, but in the example code, first the MCU read the data.
If I erase this line, the interrupt don't work.
void main(void)
{
/* USER CODE BEGIN (3) */
_enable_IRQ();
sciInit();
sciEnableNotification(scilinREG,SCI_RX_INT);
sciSend(scilinREG, 21, (unsigned char*)"Please press a key!\r\n");
sciReceive(scilinREG, 1, (unsigned char *)&command); //<- I can't understand this line
while(1);
/* USER CODE END */
}
/* USER CODE BEGIN (4) */
void sciNotification(sciBASE_t *sci, unsigned flags)
{
sciReceive(sci, 1, (unsigned char *)&command);
sciSend(sci, 1, (unsigned char*)&command);
}
/* USER CODE END */
void esmGroup1Notification(int bit)
{
return;
}
void esmGroup2Notification(int bit)
{
return;
}
Thanks

