3 Replies Latest reply on Jan 14, 2013 3:07 PM by AuKa_264411

    PSoC5 LP UART receiver with a RX buffer greater than 4 bytes


      I have a project that uses the UART. With the buffer set to 4 bytes it works fine, reading the status and the byte under polling software control (no address bits, interrupts or anything complicated). When I expand the RX buffer beyond the 4 bytes, my software stops "seeing" any data. In other words the RX_STS_FIFO_NOTEMPTY does not appear to be set when data is present at the Rx pin. I am unclear as to what I need to do to be able to read the buffer. I cannot find an example anywhere. The data sheet says "Buffer sizes greater than 4 bytes require the use of interrupts to handle moving the data from the receive FIFO into this buffer. The UART_GetChar() or UART_ReadRXData() functions get data from the correct source without any changes to your top-level firmware".  Am I supposed to be writing this interrupt driver? The implication to me is that it is added in the build process, otherwise if I am doing this myself why would I need to specify the size of the buffer for the component.


      In short, what do I need to do to get the UART to work with a buffer greater than 4 bytes?




      As a secondary question (and perhaps associated), the data sheet also says "When the RX buffer size is greater than 4 bytes, the Internal RX Interrupt ISR is automatically enabled and the RX-On Byte Received interrupt source is selected and disabled for use..." I find this a little confusing. Is the interrupt permanently enabled or disabled? Can you use it in the above interrupt driver?