I have a psoc 5LP CY8CKIT-059
I would like to send AT commands throught Hyperterminal (TeraTerm) using USB port and then send them to a wifi module throught UART.
How could I manage this situation, because on the psoc I have only one UART port?Otherwise there are other possibilities to get the same result?
Solved! Go to Solution.
There are no Rx and Tx pins in a USBUART component, it is a USB interface and on the PC side the UART com-port is emulated.
UART component will have Rx & Tx pins and both can be used in a project.
Thank you for the answer,
but I didn't understand maybe I didn't explain in a good way what I'm trying to do or I didn't make the right question.
I want to send a message from my pc to one slave mcu throught a master mcu, I would like to send AT command.
To do this I need just one component,i.e UART, or I need two components,i.e UART and USBUART?
Thank you for elaborating. You will need a UART component and a USBUART component. And the firmware should take care or receiving data over USBUART from PC and sending those over the UART.
Guys I need your help again, since i'm trying to understand the USB_UART module I'm studying the code example and the datasheet, but I have some troubles with a part of the code
if (0u != USBUART_IsConfigurationChanged())
/* Initialize IN endpoints when device is configured. */
if (0u != USBUART_GetConfiguration())
/* Enumeration is done, enable OUT endpoint to receive data
* from host. */
I dont understand what is mean and why I have two use these two API USBUART_IsConfigurationChanged() and USBUART_GetConfiguration().
This function returns the clear-on-read configuration state. It is useful when the host sends double SET_CONFIGURATION requests with the same configuration number or changes alternate settings of the interface.
After configuration has been changed the OUT endpoints must be enabled and IN endpoint must be loaded with data to start communication with the host.
USBUART_GetConfiguration(): This function gets the current configuration of the USB device
Basically if the function USBUART_GetConfiguration() returns non zero value then that means the device is enumerated and hence the OUT EP has to be enabled. The API USBUART_CDC_Init() will take care of this. Win 7 OS could send double SET_CONFIGURATION requests with same configuration number. In this case user-level code should re-enable OUT endpoints after each request.
USBUART_IsConfigurationChanged() function should be used to detect that configuration has been changed from the PC. If it returns a nonzero value, the USBFS_GetConfiguration() API is can be used to get the configuration number. The snippet you have mentioned is for that objective.