cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 5, 3 & 1

Anonymous
Not applicable

 Hello,

   

I'm testing UART RX interrupt in PSoC3.

   

I set UART configuration as attatched files.

   

After this, I don't unserstand why UART_1_RX_INTERRUPT_ENABLED is not changed to (1u).

   

----------------------------------------------------------------------------

   

#define UART_1_RX_ENABLED                     (1u)
#define UART_1_TX_ENABLED                     (0u)
#define UART_1_HD_ENABLED                     (0u)
#define UART_1_RX_INTERRUPT_ENABLED           (0u)
#define UART_1_TX_INTERRUPT_ENABLED           (0u)
 

   

----------------------------------------------------------------------------

   

So, I changed UART_1_RX_INTERRUPT_ENABLED to (0u) and get the error message as below.

   

 - ERROR: .\Generated_Source\PSoC3\UART_1.c:342: 'UART_1_RXInternalInterrupt__INTC_NUMBER': undefined identifier
 - ERROR: .\Generated_Source\PSoC3\UART_1.c:365: 'UART_1_RXInternalInterrupt__INTC_NUMBER': undefined identifier

   

Sure, I know UART_1_RXInternalInterrupt__INTC_NUMBER is not defined.

   

 

   

How can I use UART RX interrupt?

   

I don't know.

   

 

   

 thnaks.

0 Likes
10 Replies
Bob_Marlowe
Expert II

The Rx interrupt is an internal interrupt used when you specify a buffer for receiving data.

   

To use your own interrupt you must

   

1st connect an interrupt component to the ry-interrupt pin of the UART

   

2nd Write an interrupt handler for your needs

   

3rd tie together and enable everything

   

 

   

See attached code, which you have to fill at your needs

   

 

   

Happy interrupting

   

Bob

0 Likes
Anonymous
Not applicable

I already tested the method you mentioned.

   

I tryed to use API ISR handler code.

   

 

   

 Thanks for your reply.

0 Likes
Bob_Marlowe
Expert II

Then increase the buffer size for the rx-buffer to greater than 4, then the interrupt is automatically enabled.

   

Bob

0 Likes
Anonymous
Not applicable

I changed the RX buffer size as you mentioned.

   

Interrupt is generated.

   

But, why isn't interrupt generaged in Buffer size - 4?

   

 

   

 thanks.

0 Likes
Anonymous
Not applicable

 because the buffer size bigger then 4 needs to use RAM to extend the internal 4 bytes. Therefore interrupt is used for this purpose.

0 Likes
Bob_Marlowe
Expert II

Yes, that's right. To go further into: there is a hardware 4-stage FiFo-buffer that is always used (that's where the 4 Bytes come from). Only when you exceed the FiFo-size the interrupt is used to maintain FiFo and buffer-functionality. Same applies to Tx as well.

   

Happy UARTing

   

Bob

0 Likes
Anonymous
Not applicable

 I am using UART (with hardware control) on Cypress Cy8-042 and have been encountering a lot of problems related to interruopts. My Project design is attached below. Error I get is : 

   

E1217: Failed to route all nets; unable to resove overuse

   

 

   

What do I do? Please guide me. I get the same error when I tie the isr_2 to rx_interrupt line.

0 Likes
ETRO_SSN583
Esteemed Contributor

You have a reset connection to module unterminated, should connect

   

it to something.

   

 

   

Best to post project so that all pertainent settings can be examined.

   

 

   

    

   

                    

   

“File”

   

“Create Workspace Bundle”

   

Upload with IE or Firefox, Chrome has issues.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

@SKH,

   

It would be better if you start a new thread as this one is already 2 years old.

0 Likes
Anonymous
Not applicable

 Thank you. I did start a new one! Hope someone checks the attachment and answers.

   

https://secure.cypress.com/?app=forum&id=4749&rID=95713

0 Likes