- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!! I am receiving data from another microcontroller through psoc 5 uart using the following code. The received data is sent to console. It works but the conversion speed is too slow. It takes almost 1 second to get the data and send it to the console.
Is it possible to spped up this process?
thanks,
túlio
----------------------------------------------------------------------------------------------------------
#include "project.h"
#include <stdio.h>
uint8 rxData;
CY_ISR(isr_rx_handler){
/* Read data from the RX data register */
rxData = UART_RXDATA_REG; //ch = UART_GetChar();
/* Send data backward */
UART_TXDATA_REG = UART_GetByte();//rxData;
//UART_PutChar(ch);
}
int main(void)
{
isr_rx_StartEx(isr_rx_handler);
CyGlobalIntEnable; /* Enable global interrupts. */
UART_Start();
UART_PutString("iniciando: \r\n");
for(;;)
{
}
}
Solved! Go to Solution.
- Labels:
-
PSoC 5 Device Programming
-
PSoC 5LP
- Tags:
- software uart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello MaSi_3530151
What is the baud rate that you are using? The easiest way to speed up the communication is to increase the baud rate for both transmission from the other controller as well as to the console.
Apart from this, the current code is well optimized and further increase in speed cannot be achieved.
Would it be possible to switch from UART to a faster communication protocol for either the communication between controllers or to console? I2C and SPI provide much higher datarates compared to UART.
Thanks,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello MaSi_3530151
What is the baud rate that you are using? The easiest way to speed up the communication is to increase the baud rate for both transmission from the other controller as well as to the console.
Apart from this, the current code is well optimized and further increase in speed cannot be achieved.
Would it be possible to switch from UART to a faster communication protocol for either the communication between controllers or to console? I2C and SPI provide much higher datarates compared to UART.
Thanks,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Iim using 115200.
the process of sending data through tx is very fast,
but when receiving (getchar) the process is slow. something must be wrong.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Solved using SPI !! thanks