1 Reply Latest reply on Apr 6, 2017 1:21 PM by e.pratt_1639216

    Use of Ring buffer in PSoC & PRoC BLE

    alper.koybasi_1600091

      Hi,

         

      I am learning PSoC Creator. I am using CY8CKIT-042 Development kit. I tried uart to ble app. There are some points that I don't understand.

         

      Uart_to_ble app ---HandleUartTxTraffic 

         
            
      • Is there any circular buffer? In this code using Timeout .
      •     
      • How does it works circular buffer in PSoC & PRoC BLE.
      •     
      • Is there a code sample of uart to ble made with ring buffer.
      •    
        • 1. Re: Use of Ring buffer in PSoC & PRoC BLE
          e.pratt_1639216

          1) Yes, there is a circular buffer. It is done within the "UART" component in the schematics file (Top of the project file tree on the left side of the editor, the file called "TopDesign" should contain the hardware components used in the program. Double-click on the "UART" component, and it should open up with a configuration, showing the TX buffer size which is a circular buffer).

             

          2) The component pushes data to the buffer through hardware interrupts, and reads them out using hardware interrupts, with software just handling the circular buffers (both read and write).

             

          3) I assume by "Ring buffer" that it is the same thing as "Circular buffer" (according to wikipedia). There should be multiple examples within the PSOC creator if you click file->new->project, choose your chip/kit/board, then select code example and pick either UART RX or UART TX to see the example project.

             

          Here is an application example with UART incorporated, but it might be for a different chip.