cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

Contributor II

Hello,

I have setup a PSOC6 project using CY8CKIT-062-WiFi-BT as my device. I have configured a digital PIN and assigned P0_3 to it. P0_3 maps to RED LED in RGB from schematics. I am able to blink the LED when used in for loop but not outside of it.

In main_cm4.c,

The following is working:

int main(void)

{

     for(;;)

     {

        Cy_GPIO_Write(LED_R_PORT, LED_R_NUM, 1);

        CyDelay(500);

        Cy_GPIO_Write(LED_R_PORT, LED_R_NUM, 0);

        CyDelay(500);

     }

}

But this is not turning the LED on.

int main(void)

{

     Cy_GPIO_Write(LED_R_PORT, LED_R_NUM, 1);

     for(;;)

     {

     }

}

Why?

The GPIO is configured as Digital output with no hardware connection. The initial drive state is low.

Thanks

Dheeraj

0 Likes
Reply
1 Solution
Esteemed Contributor II

All the user LEDs are active low, so a Cy_GPIO_Write(LED_R_PORT, LED_R_NUM, 0);  will turn it on.

Bob

View solution in original post

3 Replies
Esteemed Contributor II

All the user LEDs are active low, so a Cy_GPIO_Write(LED_R_PORT, LED_R_NUM, 0);  will turn it on.

Bob

View solution in original post

Contributor II

Oh okay. I didn't find active low symbol in the schematics. Can you point me to the docs where this information is present?

Thanks

Dheeraj

0 Likes
Reply
Esteemed Contributor II

When you installed the CY8CKIT-062 correctly there will be an entry for the complete description in C:\Program Files(x86)\Cypress\...

When you follow the ...\Hardware\... path there you will find a schematics PDF. Search for "user LED"

Happy coding

Bob

0 Likes
Reply
Top labels