Attachments are accessible only for community members.
Apr 14, 2016
08:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 14, 2016
08:40 AM
I'm trying to write a function to handle the a GSM modem using AT commands and Uart (SCB mode).
Uart on SCB has RX and TX buffer 128 bytes each.
Unfortunately, my function not working properly.
This function reads 8-10 bytes instead of 128.
Sometimes also lost bytes.
There is no in PSoC Creator decent example how to use a uart with big buffers.
Please can you help me and show you how to write this function.
2 Replies
Apr 14, 2016
10:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 14, 2016
10:36 AM
You should avoid interfering with the internal UART interrupt. Instead poll in main()
while( SCB_SpiUartGetRxBufferSize())
{
buf_RX[i++] = SCB_SpiUartReadRxData();
look for a delimiter in the message received as \n or \r, then process the message and reset i
Bob
Attachments are accessible only for community members.
Apr 18, 2016
11:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 18, 2016
11:43 PM