CY8CKIT-042-BLE Trying Serial Write

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

cross mob
Anonymous
Not applicable

 I have the Pioneer Kit with the PSoC 4 BLE. I started with the SAR ADC with pre-amp example and removed everything but the UART. This is the code :

   

void main()

   

{

   

    uint8 i = 0;

   

     /* Start the Components */

   

    UART_Start();

   

        /* Enable global interrupts */

   

    CyGlobalIntEnable;

   

        for(;;)

   

    {

   

        UART_UartPutChar( i++);

   

        CyDelay( 1000u);

   

    }

   

}

   

Any thoughts on why I don't see anything on the PC's serial port? I'm using RealTerm. Arduino works fine if I use that..

0 Likes
6 Replies
Anonymous
Not applicable

 Hi,

   

 

   

Change the heap size to 0x400 in *.cydwr file and use P1.4 and P1.5 for UART RX and Uart TX(if you are using BLE pioneer kit)

   

 

   

Regards,

   

Vikas

0 Likes
Anonymous
Not applicable

Thanks Vikas!

   

Question : how could I have found that out myself? Is there a doc I should read before trying serial port stuff?

   

Thanks!

0 Likes
Anonymous
Not applicable

P1.4 P1.5 are connected to PSOC5LP on the board which is acting as USB-serial convertor.

   

 

   

Refer the pioneer kit schematics in Cy8Ckit-042 BLE kit contents.

   

 

   

You can use other pins for UART if you are using your own board.

   

 

   

Regards,

   

Vikas

0 Likes
Anonymous
Not applicable

 Hi,

   

      How about the heap size thing?

0 Likes
Anonymous
Not applicable

 You don't need to change the heap size for this to work I think.. You only need to increase the heap size if you are using dynamic memory allocation in your project (say malloc or printf etc.).

   

Can you check if the project works with heap set to 0.

0 Likes
Anonymous
Not applicable

Keep the heap size at the default value (you can check for default value by creating a new dummy project).

   

Just make sure that the pin mapping and baud rate configured properly.

   

 

   

You can also check the example project in Creator. See File > Example Projects > SCB_UartComm.

0 Likes