- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have configured the UART for Buffered operation with a buffer size of 128 running at 57.6Kbps. Using UART_PutArray I have issues sending more than a few characters.
At 5 characters, they are all sent correctly, and 6 breaks it. It looks as if the problem is related to interrupts. As long as the UART_PutChar routine puts the character directly into the PSOC UART send data register the character are sent. If the UART_PutChar routine places the character into the buffer then the buffer continues to fill and none of the characters are sent. The UART_TxBufferWrite increments correctly and the UART_TxBuffer Read stays at zero.
The TX - On FIFO Empty interrupt is turned on and it seems like the interrupt is just not firing.
Any Ideas?
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just out of the blue: did you enable global interrupts?
Maybe you can post your project here (create a workspace bundle), so we can have a look at it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Enable Global Interrupts. Such a simple concept.
I've been writing Assembler and some C programs for 35 years and am once again humbled.
Thank you for your quick response.
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I extracted all that initialization stuff into a separate routine named InitializeHardware(). To be honest, more than once i forgot to call it in main().
You are not alone in the dark
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sometimes this crystal ball thingie on my desk really works
What also helps is that I amde this error more than once - this helps learning... Now I started to look, everytime I start a project, through the whole generated/provided code (especially main) and either delete the line or add a comment why I leave it in. This helps me preventing such mistakes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi PeterHouse,
Also, if you are using Interrupt on Rx or Tx, please ensure that the Interrupt is configured to "Level" triggered instead of "Rising" or "Derived". Since UART is a Datapath based component, the interrupt on FIFO's status will remain high till is is cleared. Configuring it as "rising" might result in missing of bytes.