I appreciate all the discussions and doc's on enabling serial terminal behavior between PC and PSoC 6 Pioneer Kits.
I am having issues in following the suggested sample project in KitProg2 User Guide, Doc. # 002-10738 Rev. *I and am wondering if I am missing anything.
The User guide project is based on PSoC 4 and there are some differences with the behavior for PSoC 6 Pioneer Kit programmed via (PSoC Creator 4.2 (220.127.116.111).
First is the configuration menus for the USB-UART now handles interrupts differently than shown in the user guide and I can not see that it offers a "none" setting. At first I assumed that "internal" would take care of the interrupt. Then I read information in the datasheet that suggested the "external" option with the pin unconnected might be right way to go. I was able to successfully build and program with either interrupt setting, but so far there is no sign of communication via this channel. I have a suspicion that I am not properly handling the interrupt and cm0p properly.
I let the Creator select the UART-RX and UART-TX pins automatically on generation of the application- it selected RX on pin P0 and TX on pin P0 for the PSoC 6 Pioneer Kits. All seems well there.
When I tried to use the KitProg2 User Guide code example in my main_cm0p.c I got warnings that UART_1_UartGetChar(); was not declared (see sample below). I looked in the UART_1.h and found UART_1_Get(); which built without issue. You can see both in the code below. I tried to include <stdlib.h> in case that was the source for missing definition, but had no luck.
With line 35 commented out the project builds and programs, but I do not get any text back from the PSoC 6 kit. I also do not get the red text string above when I hit reset.
- Additional info:
- I loaded PuTTY terminal and do get the local echo.
- Device Manager does see the KitProg2 USB-UART on COM5, so I opened a terminal session to it.
I infer that the USB-UART is specific and sufficient to connect the cm0p to the USB port without further connection on my part.
I guess my questions are :
- Why am I having trouble with the suggested code UART_1_UartGetChar(); and its cousins in my PSoC 6 project? (Was looking at UART_1.h, the right place to expect the headers?)
- Are the UART configuration differences are specific to PSoC 6 or PSoC Creator 4.2 ?
- What is the best way to set up the UART Configuration of interrupts relative to my PSoC 6 project?
- Should I be targeting mc0p or mc4p? (Actually I an unclear on why/when to use either or how to use both.)
Advice on any of these points would be helpful.