3 Replies Latest reply on May 15, 2017 6:25 PM by userc_38651

    SCB UART Internal Interrupt access



      My goal is to store 16 byte message that comes from an ESP8266 module via UART (so data in AT command format). I am using a PSoC 4 Pioneer board, and my resource use requires that I use the SCB block for UART communication. The example code/project provided for working with the UART SCB block, seems to gather data one char at a time and isn't very helpful if you need to do other tasks. 


      The method that makes the most sense to me is to utilize the RX-FIFO-not-empty ISR (seen in the advanced tab on the UART configuration) when data is detected to store the RX buffer and check it for the message. However, when I change the RX buffer size to something large enough to grab the message in one go, the SCB block changes to an internal interrupt only mode. From what I have read this is basically because the resources are needed to stitch together the buffer from the 4 bit at a time FIFO.


      I am not sure how to trigger a custom ISR using CY_ISR_PROTO(),  (I think it would involve the UART_RX_FIFO_STATUS_REG somehow) The datasheet for refers to the function SCB_SetCustomInterruptHandler() but I am not sure that it wouldn't mess up the automatic functions required to move data from the rx FIFO into a large buffer. 


      Any help connecting the dots, or resources on internal interrupts with PSoC 4 would be appreciated.


      Also, storing the data from a buffer seems like a fairly common task, so if anyone can point me in the direction of a better/more efficient technique, or beginner friendly resource it would be much appreciated.