- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I am currently working on a project with a PSOC 4200 BLE but I do not use the BLE part.
My Psoc should put a String to a HM-10 Module and then Receive an answer.
So I put a string over my UART to the HM-10. -> "AT"
The answer I am getting is "OK", which I was expecting.
But as soon as I change the buffer size over 4, which I need to because now I want to send 8 characters and receive around 12 to 14 characters.
I know I need an Interrupt for this but I don't know how to implement one because I don't get the difference between the internal and the external isr.
As well as I don't know if I need an isr on my tx because it is also greater than 4 byte.
I know there must be an easy solution to this but I just can't find it.
Is there anyone who ones how to handle this?
If needed I can upload my code.
Thanks for your help
Chris
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First, with PSoC 4 it is important to define which UART you're using. Is this the SCB UART or the UDB UART.
The SCB UART has a buffer of 8 bytes, and the UDB UART has a buffer of 4 bytes.
If you increase the buffer size, both will automatically use an internal ISR to do the management of the buffer for you. (Meaning you don't need to handle things.) If you're enabling other interrupts, you'll need an external (to the component) ISR to handle those things. You can read the datasheet for those details.
Long story short, you should be able to set your buffer size and go forward with your UART_PutString and it won't block. (You'll still need to handle UART_GetChar, but at least you won't lose the message.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First, with PSoC 4 it is important to define which UART you're using. Is this the SCB UART or the UDB UART.
The SCB UART has a buffer of 8 bytes, and the UDB UART has a buffer of 4 bytes.
If you increase the buffer size, both will automatically use an internal ISR to do the management of the buffer for you. (Meaning you don't need to handle things.) If you're enabling other interrupts, you'll need an external (to the component) ISR to handle those things. You can read the datasheet for those details.
Long story short, you should be able to set your buffer size and go forward with your UART_PutString and it won't block. (You'll still need to handle UART_GetChar, but at least you won't lose the message.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
chris,
Check this PSOC4 UART code example (receiving/sending command string from terminal)
(SCB mode)
http://www.cypress.com/comment/389231#comment-389231
And similar for UDB mode
http://origin-www.cypress.com/comment/235306#comment-235306
odissey1