Hello,
i am researching how to receive characters over the UART and when trying to follow the PDF and build I get the following error in notifications.c:
I have attached my project for reference.
Regards,
Adam Ambriz
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
i am researching how to receive characters over the UART and when trying to follow the PDF and build I get the following error in notifications.c:
I have attached my project for reference.
Regards,
Adam Ambriz
Anthony,
Thank you for your response. I include sci.h in notifications.c and the project built properly.
Now when I run it, I am prompted to press a key, but when I do, nothing happens. What should I be seeing?
I am using the terminal in CCS.
Thanks,
Adam A8420.SCI.zip
Adam,
It looks like you should see a message:
void main(void)
{
/* USER CODE BEGIN (3) */
_enable_IRQ();
sciInit();
sciSend(scilinREG,21,(unsigned char *)"Please press a key!\r\n");
sciReceive(scilinREG,1,(unsigned char *)&command);
while(1);
/* USER CODE END */
}
I don't see any loopback though. So probably it just waits to get a char from you and then stops at the while(1).
The send is interrupt driven it appears, but the ISR doesn't seem to have a loopback either.
If you don't see anything the first thing to do is check that the serial port settings of your board (COM#, baud rate, stop, parity) match the settings of your board. If your serial port is over the USB cable with the XDS100v2 then you can look in windows for the COM port that is tied to the XDS100v2. You might just have the wrong COM port #.
In CCS there's an icon which allows you to change the terminal settings, you just need to be disconnected when you change the seetings - then reconnect.
Last you need to have your terminal ready BEFORE you run the program. If not, the program will send that string and if you connect afterwards you won't see anything as far as I can tell.
Double Last - Don't try this test with the latest HalCoGen 3.08 release (put out Friday) because there are some typecasting issues ... you can see that from recent threads.