|
The internal structure of the UART - implementation uses interrupts when you specify a buffer larger than 4 bytes (which is the size of the FIFO). These interrupts are called "internal". As you see, the Rx-OnByteReceived and Tx-OnFifoEmpty interrupt sources are greyed out when you use a buffer.
On the Rx-side the only interrupt-sources remain are dealing with errors or addresses
So when using buffered I/O you will have to poll the RX and TX-status to see what's going on
The advantage is that you may transfer your 7-byte message with a single API (UART_PutArray() ) to the UART which will handle the transfer.
There is an API to check the receive-buffer for the number bytes received.
To do-it-yourself:
In Schematic editor
your thoughts about the way the interrupts work looks quite right. To implement your own routines do the following:
Set the buffer-size back to 4 which will disable the internal interrupts
Select your wanted interrupt-source(s)
Connect two ISR-components to Rx/Tx interrupt terminals.
In main()
declare two routines with CY_ISR_PROTO (look into help -> Documentation -> System Reference -> System Ref. Guide)
define the two routines with CY_ISR
In initialization use ISR_StartEx(YourIsrRoutineName)
That's it.
Happy interrupting
Bob
|