- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi, i am trying to send data from arduino mega to psoc 6 wifi bt via zigbee module. i want to see the data recieved on psoc on serial monitor. how should i configure two uarts? also i need to send the data received to cloud. what has to be done exactly?
Solved! Go to Solution.
- Labels:
-
UART
-
WICED Studio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I acknowledge the issue in UART configuration for PSOC in WICED.
You can use the attached code to work with UART. I have used the configuartions similar to modus in WICED and I am able to see UART prints on both the UARTs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just to want to make sure I understood your setup and question correctly.
You have an Arudino Mega Connected to a Zigbee Module, which sends data to another Zigbee Board connected to the UART of a PSoC 6. An you want to send the same data on the another PSoC 6 UART which in turn sends it to the PC.
Considering that you are using the latest version of WICED SDK, there are sample codes available in the 'apps' folder. You can find simple UART Example in the 'apps/snip/uart' folder and samples for Cloud Connectivity are available in 'apps/demo' folder.
Winston
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to send data from zigbee from arduino mega to zigbee connected to psoc6 and display this data on terminal. So i am trying to configure two uart ports. The default uart 5 i am using to display on terminal and i hv configured zigbee to another port. I did changes in my platform. C and platform.h to configure my uart pins. But i am not receiving data on the psoc.
I have already tried using the UART example in WICED. I still cant get the data on the tera term. Psoc is not receiving the data from zigbee.
I am attaching my code as well
#include "wiced.h"
void application_start()
{
uint8_t expected_data_size=20;
wiced_init();
#define RX_BUFFER_SIZE (2000)
wiced_ring_buffer_t rx_buffer;
char rx_data[RX_BUFFER_SIZE];
ring_buffer_init(&rx_buffer, rx_data, RX_BUFFER_SIZE);
wiced_uart_config_t uart_config =
{
.baud_rate =9600,
.parity = NO_PARITY,
.data_width= DATA_WIDTH_8BIT,
.stop_bits= STOP_BITS_1,
.flow_control = FLOW_CONTROL_DISABLED,
};
wiced_uart_config_t uart1_config =
{
.baud_rate =9600,
.parity = NO_PARITY,
.data_width= DATA_WIDTH_8BIT,
.stop_bits= STOP_BITS_1,
.flow_control = FLOW_CONTROL_DISABLED,
};
wiced_uart_init(WICED_UART_4,&uart_config , &rx_buffer);
wiced_uart_init(WICED_UART_6,&uart1_config , NULL);
while ( wiced_uart_receive_bytes(WICED_UART_4 &rx_data, &expected_data_size, WICED_NEVER_TIMEOUT ) == WICED_SUCCESS )
{
wiced_uart_transmit_bytes( WICED_UART_6, rx_data,RX_BUFFER_SIZE );
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content