Use of Ring buffer in PSoC & PRoC BLE

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
user_1600091
Level 2
Level 2
First like received

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.
  •    
0 Likes
1 Solution
Anonymous
Not applicable

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.

View solution in original post

0 Likes
1 Reply
Anonymous
Not applicable

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.

0 Likes